diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-09-30 15:12:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-02 16:10:29 -0400 |
commit | 8c1c58ec70ce45cd5c7866811e90df131e7a3005 (patch) | |
tree | 5843f7c4b3337c130f575a4fcb851eea9e23dca3 /drivers/net/ethernet/calxeda | |
parent | 6865d1e834be84ddd5808d93d5035b492346c64a (diff) | |
download | linux-8c1c58ec70ce45cd5c7866811e90df131e7a3005.tar.bz2 |
net: calxedaxgmac: fix clearing of old filter addresses
In commit 2ee68f621af280 (net: calxedaxgmac: fix various errors in
xgmac_set_rx_mode), a fix to clean-up old address entries was added.
However, the loop to zero out the entries failed to increment the register
address resulting in only 1 entry getting cleared. Fix this to correctly
use the loop index. Also, the end of the loop condition was off by 1 and
should have been <= rather than <.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/calxeda')
-rw-r--r-- | drivers/net/ethernet/calxeda/xgmac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c index 78d6d6b970e1..94358d234e73 100644 --- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c @@ -1342,8 +1342,8 @@ static void xgmac_set_rx_mode(struct net_device *dev) } out: - for (i = reg; i < XGMAC_MAX_FILTER_ADDR; i++) - xgmac_set_mac_addr(ioaddr, NULL, reg); + for (i = reg; i <= XGMAC_MAX_FILTER_ADDR; i++) + xgmac_set_mac_addr(ioaddr, NULL, i); for (i = 0; i < XGMAC_NUM_HASH; i++) writel(hash_filter[i], ioaddr + XGMAC_HASH(i)); |