[arswitch] fix up issues on the AR8327.

This correctly dumps the ethernet bridge contents on an AR8327 switch.

Tested:

* AP135 - QCA9550 + AR8327 ethernet switch:

# etherswitchcfg atu dump
 [0] c0:3f:d5:7e:6f:45: portmask 0x00000004
 [1] f6:b6:03:96:1e:ba: portmask 0x00000004
 [2] 00:03:7f:11:38:4f: portmask 0x00000040
# arp -na
? (192.168.3.170) at 00:03:7f:11:38:4f on arge0 permanent [ethernet]
? (192.168.3.12) at c0:3f:d5:7e:6f:45 on arge0 expires in 1188 seconds [ethernet]
? (192.168.3.1) at f6:b6:03:96:1e:ba on arge0 expires in 1186 seconds [ethernet]
This commit is contained in:
Adrian Chadd 2018-02-04 08:22:11 +00:00
parent 861a0b4808
commit c9f70b7b88
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328838
2 changed files with 7 additions and 7 deletions

View File

@ -1151,12 +1151,12 @@ ar8327_atu_fetch_table(struct arswitch_softc *sc, etherswitch_atu_entry_t *e,
return (-1);
/* MAC address */
e->es_macaddr[5] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR5);
e->es_macaddr[4] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR4);
e->es_macaddr[3] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR3);
e->es_macaddr[2] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR2);
e->es_macaddr[1] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR1);
e->es_macaddr[0] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR0);
e->es_macaddr[5] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR3);
e->es_macaddr[4] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR2);
e->es_macaddr[3] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR1);
e->es_macaddr[2] = MS(ret0, AR8327_ATU_DATA0_MAC_ADDR0);
e->es_macaddr[0] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR5);
e->es_macaddr[1] = MS(ret1, AR8327_ATU_DATA1_MAC_ADDR4);
/* Bitmask of ports this entry is for */
e->es_portmask = MS(ret1, AR8327_ATU_DATA1_DEST_PORT);

View File

@ -498,7 +498,7 @@
#define AR8327_ATU_DATA1_MAC_ADDR4 BITS(0, 8)
#define AR8327_ATU_DATA1_MAC_ADDR4_S 0
#define AR8327_ATU_DATA1_MAC_ADDR5 BITS(8, 8)
#define AR8327_ATU_DATA1_MAC_ADDR5_S 0
#define AR8327_ATU_DATA1_MAC_ADDR5_S 8
#define AR8327_ATU_DATA1_DEST_PORT BITS(16, 7)
#define AR8327_ATU_DATA1_DEST_PORT_S 16
#define AR8327_ATU_DATA1_CROSS_PORT_STATE_EN BIT(23)