developer | 0972627 | 2024-03-28 10:27:24 +0800 | [diff] [blame^] | 1 | diff --git a/switch_fun.c b/switch_fun.c |
| 2 | index 9e9f4fe..2082ba1 100644 |
| 3 | --- a/switch_fun.c |
| 4 | +++ b/switch_fun.c |
| 5 | @@ -1435,6 +1435,24 @@ static void table_dump_internal(int type) |
developer | 5dfa8b7 | 2022-11-03 11:33:07 +0800 | [diff] [blame] | 6 | printf("%03x: ", (value >> 16) & 0xfff); |
| 7 | reg_read(REG_ATRD_ADDR, &value2); |
developer | 0972627 | 2024-03-28 10:27:24 +0800 | [diff] [blame^] | 8 | j = (value2 >> 4) & 0xff; //r_port_map |
| 9 | + |
developer | 5dfa8b7 | 2022-11-03 11:33:07 +0800 | [diff] [blame] | 10 | + if(j & 0x01) |
| 11 | + printf("0"); |
| 12 | + else if (j & 0x02) |
developer | 0972627 | 2024-03-28 10:27:24 +0800 | [diff] [blame^] | 13 | + printf("1"); |
developer | 5dfa8b7 | 2022-11-03 11:33:07 +0800 | [diff] [blame] | 14 | + else if (j & 0x04) |
developer | 0972627 | 2024-03-28 10:27:24 +0800 | [diff] [blame^] | 15 | + printf("2"); |
developer | 5dfa8b7 | 2022-11-03 11:33:07 +0800 | [diff] [blame] | 16 | + else if (j & 0x08) |
| 17 | + printf("3"); |
| 18 | + else if (j & 0x10) |
| 19 | + printf("4"); |
| 20 | + else if (j & 0x20) |
| 21 | + printf("5"); |
| 22 | + else if (j & 0x40) |
| 23 | + printf("6"); |
| 24 | + else if (j & 0x80) |
| 25 | + printf("7"); |
developer | 0972627 | 2024-03-28 10:27:24 +0800 | [diff] [blame^] | 26 | + /* |
developer | 5dfa8b7 | 2022-11-03 11:33:07 +0800 | [diff] [blame] | 27 | printf("%c", (j & 0x01) ? '1' : '-'); |
| 28 | printf("%c", (j & 0x02) ? '1' : '-'); |
| 29 | printf("%c", (j & 0x04) ? '1' : '-'); |
developer | 0972627 | 2024-03-28 10:27:24 +0800 | [diff] [blame^] | 30 | @@ -1443,7 +1461,8 @@ static void table_dump_internal(int type) |
developer | 5dfa8b7 | 2022-11-03 11:33:07 +0800 | [diff] [blame] | 31 | printf("%c", (j & 0x20) ? '1' : '-'); |
| 32 | printf("%c", (j & 0x40) ? '1' : '-'); |
| 33 | printf("%c", (j & 0x80) ? '1' : '-'); |
| 34 | - |
| 35 | + */ |
| 36 | + printf(" "); |
| 37 | reg_read(REG_TSRA2_ADDR, &mac2); |
| 38 | |
developer | 0972627 | 2024-03-28 10:27:24 +0800 | [diff] [blame^] | 39 | printf(" %2d", (mac2 >> 12) & 0x7); //FID |
| 40 | diff --git a/switch_ioctl.h b/switch_ioctl.h |
| 41 | index dffe9c7..72cbee6 100644 |
| 42 | --- a/switch_ioctl.h |
| 43 | +++ b/switch_ioctl.h |
| 44 | @@ -5,8 +5,8 @@ |
| 45 | #ifndef SWITCH_IOCTL_H |
| 46 | #define SWITCH_IOCTL_H |
| 47 | |
| 48 | -#define ETH_DEVNAME "eth0" |
| 49 | -#define BR_DEVNAME "br-lan" |
| 50 | +#define ETH_DEVNAME "eth1" |
| 51 | +#define BR_DEVNAME "brlan0" |
| 52 | |
| 53 | #define RAETH_MII_READ 0x89F3 |
| 54 | #define RAETH_MII_WRITE 0x89F4 |