net: use helpers to access uc list V2
This patch introduces three macros to work with uc list from net drivers. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9010bc3364
commit
32e7bfc411
@@ -2139,7 +2139,7 @@ static void e1000_set_rx_mode(struct net_device *netdev)
|
||||
rctl |= E1000_RCTL_VFE;
|
||||
}
|
||||
|
||||
if (netdev->uc.count > rar_entries - 1) {
|
||||
if (netdev_uc_count(netdev) > rar_entries - 1) {
|
||||
rctl |= E1000_RCTL_UPE;
|
||||
} else if (!(netdev->flags & IFF_PROMISC)) {
|
||||
rctl &= ~E1000_RCTL_UPE;
|
||||
@@ -2162,7 +2162,7 @@ static void e1000_set_rx_mode(struct net_device *netdev)
|
||||
*/
|
||||
i = 1;
|
||||
if (use_uc)
|
||||
list_for_each_entry(ha, &netdev->uc.list, list) {
|
||||
netdev_for_each_uc_addr(ha, netdev) {
|
||||
if (i == rar_entries)
|
||||
break;
|
||||
e1000_rar_set(hw, ha->addr, i++);
|
||||
|
Reference in New Issue
Block a user