Loading drivers/net/bnx2.c +2 −3 Original line number Original line Diff line number Diff line Loading @@ -48,7 +48,6 @@ #include <linux/cache.h> #include <linux/cache.h> #include <linux/firmware.h> #include <linux/firmware.h> #include <linux/log2.h> #include <linux/log2.h> #include <linux/list.h> #if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE) #if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE) #define BCM_CNIC 1 #define BCM_CNIC 1 Loading Loading @@ -3579,14 +3578,14 @@ bnx2_set_rx_mode(struct net_device *dev) sort_mode |= BNX2_RPM_SORT_USER0_MC_HSH_EN; sort_mode |= BNX2_RPM_SORT_USER0_MC_HSH_EN; } } if (dev->uc.count > BNX2_MAX_UNICAST_ADDRESSES) { if (netdev_uc_count(dev) > BNX2_MAX_UNICAST_ADDRESSES) { rx_mode |= BNX2_EMAC_RX_MODE_PROMISCUOUS; rx_mode |= BNX2_EMAC_RX_MODE_PROMISCUOUS; sort_mode |= BNX2_RPM_SORT_USER0_PROM_EN | sort_mode |= BNX2_RPM_SORT_USER0_PROM_EN | BNX2_RPM_SORT_USER0_PROM_VLAN; BNX2_RPM_SORT_USER0_PROM_VLAN; } else if (!(dev->flags & IFF_PROMISC)) { } else if (!(dev->flags & IFF_PROMISC)) { /* Add all entries into to the match filter list */ /* Add all entries into to the match filter list */ i = 0; i = 0; list_for_each_entry(ha, &dev->uc.list, list) { netdev_for_each_uc_addr(ha, dev) { bnx2_set_mac_addr(bp, ha->addr, bnx2_set_mac_addr(bp, ha->addr, i + BNX2_START_UNICAST_ADDRESS_INDEX); i + BNX2_START_UNICAST_ADDRESS_INDEX); sort_mode |= (1 << sort_mode |= (1 << Loading drivers/net/e1000/e1000_main.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2139,7 +2139,7 @@ static void e1000_set_rx_mode(struct net_device *netdev) rctl |= E1000_RCTL_VFE; rctl |= E1000_RCTL_VFE; } } if (netdev->uc.count > rar_entries - 1) { if (netdev_uc_count(netdev) > rar_entries - 1) { rctl |= E1000_RCTL_UPE; rctl |= E1000_RCTL_UPE; } else if (!(netdev->flags & IFF_PROMISC)) { } else if (!(netdev->flags & IFF_PROMISC)) { rctl &= ~E1000_RCTL_UPE; rctl &= ~E1000_RCTL_UPE; Loading @@ -2162,7 +2162,7 @@ static void e1000_set_rx_mode(struct net_device *netdev) */ */ i = 1; i = 1; if (use_uc) if (use_uc) list_for_each_entry(ha, &netdev->uc.list, list) { netdev_for_each_uc_addr(ha, netdev) { if (i == rar_entries) if (i == rar_entries) break; break; e1000_rar_set(hw, ha->addr, i++); e1000_rar_set(hw, ha->addr, i++); Loading drivers/net/igb/igb_main.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -2905,12 +2905,13 @@ static int igb_write_uc_addr_list(struct net_device *netdev) int count = 0; int count = 0; /* return ENOMEM indicating insufficient memory for addresses */ /* return ENOMEM indicating insufficient memory for addresses */ if (netdev->uc.count > rar_entries) if (netdev_uc_count(netdev) > rar_entries) return -ENOMEM; return -ENOMEM; if (netdev->uc.count && rar_entries) { if (!netdev_uc_empty(netdev) && rar_entries) { struct netdev_hw_addr *ha; struct netdev_hw_addr *ha; list_for_each_entry(ha, &netdev->uc.list, list) { netdev_for_each_uc_addr(ha, netdev) { if (!rar_entries) if (!rar_entries) break; break; igb_rar_set_qsel(adapter, ha->addr, igb_rar_set_qsel(adapter, ha->addr, Loading drivers/net/ixgbe/ixgbe_common.c +3 −4 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,6 @@ #include <linux/pci.h> #include <linux/pci.h> #include <linux/delay.h> #include <linux/delay.h> #include <linux/sched.h> #include <linux/sched.h> #include <linux/list.h> #include <linux/netdevice.h> #include <linux/netdevice.h> #include "ixgbe.h" #include "ixgbe.h" Loading Loading @@ -1347,7 +1346,7 @@ static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq) /** /** * ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses * ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses * @hw: pointer to hardware structure * @hw: pointer to hardware structure * @uc_list: the list of new addresses * @netdev: pointer to net device structure * * * The given list replaces any existing list. Clears the secondary addrs from * The given list replaces any existing list. Clears the secondary addrs from * receive address registers. Uses unused receive address registers for the * receive address registers. Uses unused receive address registers for the Loading @@ -1357,7 +1356,7 @@ static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq) * manually putting the device into promiscuous mode. * manually putting the device into promiscuous mode. **/ **/ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, struct list_head *uc_list) struct net_device *netdev) { { u32 i; u32 i; u32 old_promisc_setting = hw->addr_ctrl.overflow_promisc; u32 old_promisc_setting = hw->addr_ctrl.overflow_promisc; Loading @@ -1381,7 +1380,7 @@ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, } } /* Add the new addresses */ /* Add the new addresses */ list_for_each_entry(ha, uc_list, list) { netdev_for_each_uc_addr(ha, netdev) { hw_dbg(hw, " Adding the secondary addresses:\n"); hw_dbg(hw, " Adding the secondary addresses:\n"); ixgbe_add_uc_addr(hw, ha->addr, 0); ixgbe_add_uc_addr(hw, ha->addr, 0); } } Loading drivers/net/ixgbe/ixgbe_common.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -60,7 +60,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, u32 mc_addr_count, u32 mc_addr_count, ixgbe_mc_addr_itr func); ixgbe_mc_addr_itr func); s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, struct list_head *uc_list); struct net_device *netdev); s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); Loading Loading
drivers/net/bnx2.c +2 −3 Original line number Original line Diff line number Diff line Loading @@ -48,7 +48,6 @@ #include <linux/cache.h> #include <linux/cache.h> #include <linux/firmware.h> #include <linux/firmware.h> #include <linux/log2.h> #include <linux/log2.h> #include <linux/list.h> #if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE) #if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE) #define BCM_CNIC 1 #define BCM_CNIC 1 Loading Loading @@ -3579,14 +3578,14 @@ bnx2_set_rx_mode(struct net_device *dev) sort_mode |= BNX2_RPM_SORT_USER0_MC_HSH_EN; sort_mode |= BNX2_RPM_SORT_USER0_MC_HSH_EN; } } if (dev->uc.count > BNX2_MAX_UNICAST_ADDRESSES) { if (netdev_uc_count(dev) > BNX2_MAX_UNICAST_ADDRESSES) { rx_mode |= BNX2_EMAC_RX_MODE_PROMISCUOUS; rx_mode |= BNX2_EMAC_RX_MODE_PROMISCUOUS; sort_mode |= BNX2_RPM_SORT_USER0_PROM_EN | sort_mode |= BNX2_RPM_SORT_USER0_PROM_EN | BNX2_RPM_SORT_USER0_PROM_VLAN; BNX2_RPM_SORT_USER0_PROM_VLAN; } else if (!(dev->flags & IFF_PROMISC)) { } else if (!(dev->flags & IFF_PROMISC)) { /* Add all entries into to the match filter list */ /* Add all entries into to the match filter list */ i = 0; i = 0; list_for_each_entry(ha, &dev->uc.list, list) { netdev_for_each_uc_addr(ha, dev) { bnx2_set_mac_addr(bp, ha->addr, bnx2_set_mac_addr(bp, ha->addr, i + BNX2_START_UNICAST_ADDRESS_INDEX); i + BNX2_START_UNICAST_ADDRESS_INDEX); sort_mode |= (1 << sort_mode |= (1 << Loading
drivers/net/e1000/e1000_main.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2139,7 +2139,7 @@ static void e1000_set_rx_mode(struct net_device *netdev) rctl |= E1000_RCTL_VFE; rctl |= E1000_RCTL_VFE; } } if (netdev->uc.count > rar_entries - 1) { if (netdev_uc_count(netdev) > rar_entries - 1) { rctl |= E1000_RCTL_UPE; rctl |= E1000_RCTL_UPE; } else if (!(netdev->flags & IFF_PROMISC)) { } else if (!(netdev->flags & IFF_PROMISC)) { rctl &= ~E1000_RCTL_UPE; rctl &= ~E1000_RCTL_UPE; Loading @@ -2162,7 +2162,7 @@ static void e1000_set_rx_mode(struct net_device *netdev) */ */ i = 1; i = 1; if (use_uc) if (use_uc) list_for_each_entry(ha, &netdev->uc.list, list) { netdev_for_each_uc_addr(ha, netdev) { if (i == rar_entries) if (i == rar_entries) break; break; e1000_rar_set(hw, ha->addr, i++); e1000_rar_set(hw, ha->addr, i++); Loading
drivers/net/igb/igb_main.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -2905,12 +2905,13 @@ static int igb_write_uc_addr_list(struct net_device *netdev) int count = 0; int count = 0; /* return ENOMEM indicating insufficient memory for addresses */ /* return ENOMEM indicating insufficient memory for addresses */ if (netdev->uc.count > rar_entries) if (netdev_uc_count(netdev) > rar_entries) return -ENOMEM; return -ENOMEM; if (netdev->uc.count && rar_entries) { if (!netdev_uc_empty(netdev) && rar_entries) { struct netdev_hw_addr *ha; struct netdev_hw_addr *ha; list_for_each_entry(ha, &netdev->uc.list, list) { netdev_for_each_uc_addr(ha, netdev) { if (!rar_entries) if (!rar_entries) break; break; igb_rar_set_qsel(adapter, ha->addr, igb_rar_set_qsel(adapter, ha->addr, Loading
drivers/net/ixgbe/ixgbe_common.c +3 −4 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,6 @@ #include <linux/pci.h> #include <linux/pci.h> #include <linux/delay.h> #include <linux/delay.h> #include <linux/sched.h> #include <linux/sched.h> #include <linux/list.h> #include <linux/netdevice.h> #include <linux/netdevice.h> #include "ixgbe.h" #include "ixgbe.h" Loading Loading @@ -1347,7 +1346,7 @@ static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq) /** /** * ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses * ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses * @hw: pointer to hardware structure * @hw: pointer to hardware structure * @uc_list: the list of new addresses * @netdev: pointer to net device structure * * * The given list replaces any existing list. Clears the secondary addrs from * The given list replaces any existing list. Clears the secondary addrs from * receive address registers. Uses unused receive address registers for the * receive address registers. Uses unused receive address registers for the Loading @@ -1357,7 +1356,7 @@ static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq) * manually putting the device into promiscuous mode. * manually putting the device into promiscuous mode. **/ **/ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, struct list_head *uc_list) struct net_device *netdev) { { u32 i; u32 i; u32 old_promisc_setting = hw->addr_ctrl.overflow_promisc; u32 old_promisc_setting = hw->addr_ctrl.overflow_promisc; Loading @@ -1381,7 +1380,7 @@ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, } } /* Add the new addresses */ /* Add the new addresses */ list_for_each_entry(ha, uc_list, list) { netdev_for_each_uc_addr(ha, netdev) { hw_dbg(hw, " Adding the secondary addresses:\n"); hw_dbg(hw, " Adding the secondary addresses:\n"); ixgbe_add_uc_addr(hw, ha->addr, 0); ixgbe_add_uc_addr(hw, ha->addr, 0); } } Loading
drivers/net/ixgbe/ixgbe_common.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -60,7 +60,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, u32 mc_addr_count, u32 mc_addr_count, ixgbe_mc_addr_itr func); ixgbe_mc_addr_itr func); s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, struct list_head *uc_list); struct net_device *netdev); s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); Loading