diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2015-09-05 22:07:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-09 07:27:35 +0200 |
commit | 39797a279d62972cd914ef580fdfacb13e508bf8 (patch) | |
tree | b5717d7b9977c92a9f5ffe3a21876b0985ef62a4 /net/bridge/br_vlan.c | |
parent | device property: Don't overwrite addr when failing in device_get_mac_address (diff) | |
download | linux-39797a279d62972cd914ef580fdfacb13e508bf8.tar.xz linux-39797a279d62972cd914ef580fdfacb13e508bf8.zip |
net: dsa: bcm_sf2: Fix ageing conditions and operation
The comparison check between cur_hw_state and hw_state is currently
invalid because cur_hw_state is right shifted by G_MISTP_SHIFT, while
hw_state is not, so we end-up comparing bits 2:0 with bits 7:5, which is
going to cause an additional aging to occur. Fix this by not shifting
cur_hw_state while reading it, but instead, mask the value with the
appropriately shitfted bitmask.
The other problem with the fast-ageing process is that we did not set
the EN_AGE_DYNAMIC bit to request the ageing to occur for dynamically
learned MAC addresses. Finally, write back 0 to the FAST_AGE_CTRL
register to avoid leaving spurious bits sets from one operation to the
other.
Fixes: 12f460f23423 ("net: dsa: bcm_sf2: add HW bridging support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_vlan.c')
0 files changed, 0 insertions, 0 deletions