Skip to content

Commit

Permalink
net: calxedaxgmac: fix clearing of old filter addresses
Browse files Browse the repository at this point in the history
In commit 2ee68f6 (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>
  • Loading branch information
Rob Herring authored and David S. Miller committed Oct 2, 2013
1 parent 6865d1e commit 8c1c58e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/calxeda/xgmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 8c1c58e

Please sign in to comment.