net: refactor multicast/unicast address list
Subsystems (21)
Johannes Berg
maintainerRFC 1/1 net: refactor multicast/unicast address list
I'm trying to use address lists without netdevs, but as a first step I thought it would be good to reduce the amount duplicated code between unicast and multicast lists.
After introducing a new 'struct address_list', we can unify a lot between these. The next step will probably be exporting the __dev_addr_sync and __dev_addr_unsync functions so I can use them without a netdev, but this cleanup can stand on its own.
---
Also reduces the number of exported symbols by 4.
arch/xtensa/platforms/iss/network.c | 2 drivers/infiniband/hw/nes/nes_nic.c | 4 drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 2 drivers/media/dvb/dvb-core/dvb_net.c | 10 - drivers/net/3c501.c | 2 drivers/net/3c505.c | 8 - drivers/net/3c509.c | 8 - drivers/net/3c515.c | 2 drivers/net/3c523.c | 6 drivers/net/3c527.c | 12 - drivers/net/3c59x.c | 2 drivers/net/7990.c | 4 drivers/net/8139cp.c | 4 drivers/net/8139too.c | 4 drivers/net/82596.c | 10 - drivers/net/a2065.c | 4 drivers/net/acenic.c | 2 drivers/net/amd8111e.c | 10 - drivers/net/appletalk/ltpc.c | 2 drivers/net/ariadne.c | 2 drivers/net/arm/am79c961a.c | 2 drivers/net/arm/at91_ether.c | 6 drivers/net/arm/ether3.c | 2 drivers/net/arm/ixp4xx_eth.c | 4 drivers/net/arm/ks8695net.c | 6 drivers/net/at1700.c | 6 drivers/net/atarilance.c | 2 drivers/net/atl1c/atl1c_main.c | 2 drivers/net/atl1e/atl1e_main.c | 2 drivers/net/atlx/atl2.c | 2 drivers/net/atlx/atlx.c | 2 drivers/net/atp.c | 6 drivers/net/au1000_eth.c | 4 drivers/net/b44.c | 6 drivers/net/benet/be_main.c | 2 drivers/net/bfin_mac.c | 6 drivers/net/bmac.c | 12 - drivers/net/bnx2.c | 8 - drivers/net/bnx2x_main.c | 10 - drivers/net/bonding/bond_main.c | 16 +- drivers/net/cassini.c | 2 drivers/net/chelsio/common.h | 4 drivers/net/chelsio/cxgb2.c | 2 drivers/net/cpmac.c | 2 drivers/net/cris/eth_v10.c | 4 drivers/net/cs89x0.c | 2 drivers/net/cxgb3/common.h | 2 drivers/net/cxgb3/cxgb3_main.c | 4 drivers/net/de620.c | 2 drivers/net/declance.c | 4 drivers/net/defxx.c | 6 drivers/net/depca.c | 4 drivers/net/dl2k.c | 6 drivers/net/dm9000.c | 4 drivers/net/e100.c | 8 - drivers/net/e1000/e1000_main.c | 6 drivers/net/e1000e/netdev.c | 8 - drivers/net/eepro.c | 16 +- drivers/net/eexpress.c | 8 - drivers/net/ehea/ehea_main.c | 6 drivers/net/enc28j60.c | 2 drivers/net/enic/enic_main.c | 6 drivers/net/epic100.c | 6 drivers/net/eth16i.c | 2 drivers/net/ethoc.c | 2 drivers/net/ewrk3.c | 4 drivers/net/fealnx.c | 4 drivers/net/fec.c | 4 drivers/net/fec_mpc52xx.c | 4 drivers/net/forcedeth.c | 4 drivers/net/fs_enet/mac-fcc.c | 4 drivers/net/fs_enet/mac-fec.c | 4 drivers/net/fs_enet/mac-scc.c | 4 drivers/net/gianfar.c | 4 drivers/net/hamachi.c | 6 drivers/net/hp100.c | 6 drivers/net/ibm_newemac/core.c | 8 - drivers/net/ibmlana.c | 2 drivers/net/ibmveth.c | 6 drivers/net/igb/igb_main.c | 8 - drivers/net/igbvf/netdev.c | 8 - drivers/net/ioc3-eth.c | 6 drivers/net/ipg.c | 6 drivers/net/isa-skeleton.c | 6 drivers/net/iseries_veth.c | 6 drivers/net/ixgb/ixgb_main.c | 8 - drivers/net/ixgbe/ixgbe_main.c | 8 - drivers/net/jme.c | 4 drivers/net/korina.c | 8 - drivers/net/lance.c | 2 drivers/net/lib82596.c | 10 - drivers/net/lib8390.c | 6 drivers/net/lp486e.c | 12 - drivers/net/mac89x0.c | 2 drivers/net/macb.c | 6 drivers/net/mace.c | 4 drivers/net/macmace.c | 4 drivers/net/mlx4/en_netdev.c | 2 drivers/net/mv643xx_eth.c | 4 drivers/net/myri10ge/myri10ge.c | 2 drivers/net/natsemi.c | 4 drivers/net/netxen/netxen_nic_hw.c | 14 - drivers/net/ni5010.c | 2 drivers/net/ni52.c | 4 drivers/net/ni65.c | 2 drivers/net/niu.c | 10 - drivers/net/ns83820.c | 2 drivers/net/pci-skeleton.c | 4 drivers/net/pcmcia/3c574_cs.c | 2 drivers/net/pcmcia/3c589_cs.c | 2 drivers/net/pcmcia/axnet_cs.c | 6 drivers/net/pcmcia/fmvj18x_cs.c | 6 drivers/net/pcmcia/nmclan_cs.c | 16 +- drivers/net/pcmcia/smc91c92_cs.c | 4 drivers/net/pcmcia/xirc2ps_cs.c | 10 - drivers/net/pcnet32.c | 4 drivers/net/ps3_gelic_net.c | 4 drivers/net/qlge/qlge_main.c | 6 drivers/net/r6040.c | 12 - drivers/net/r8169.c | 4 drivers/net/s2io.c | 8 - drivers/net/sb1250-mac.c | 2 drivers/net/sc92031.c | 4 drivers/net/sfc/efx.c | 4 drivers/net/sgiseeq.c | 2 drivers/net/sis190.c | 4 drivers/net/sis900.c | 6 drivers/net/skfp/skfddi.c | 8 - drivers/net/skge.c | 10 - drivers/net/sky2.c | 6 drivers/net/smc911x.c | 8 - drivers/net/smc9194.c | 4 drivers/net/smc91x.c | 8 - drivers/net/smsc911x.c | 8 - drivers/net/smsc9420.c | 4 drivers/net/sonic.c | 8 - drivers/net/spider_net.c | 2 drivers/net/starfire.c | 8 - drivers/net/sun3_82586.c | 4 drivers/net/sun3lance.c | 2 drivers/net/sunbmac.c | 6 drivers/net/sundance.c | 6 drivers/net/sungem.c | 6 drivers/net/sunhme.c | 12 - drivers/net/sunlance.c | 4 drivers/net/sunqe.c | 6 drivers/net/sunvnet.c | 2 drivers/net/tc35815.c | 8 - drivers/net/tehuti.c | 6 drivers/net/tg3.c | 4 drivers/net/tlan.c | 4 drivers/net/tokenring/3c359.c | 2 drivers/net/tokenring/ibmtr.c | 4 drivers/net/tokenring/lanstreamer.c | 2 drivers/net/tokenring/olympic.c | 2 drivers/net/tokenring/tms380tr.c | 4 drivers/net/tsi108_eth.c | 4 drivers/net/tulip/de2104x.c | 8 - drivers/net/tulip/de4x5.c | 8 - drivers/net/tulip/dmfe.c | 18 +- drivers/net/tulip/tulip_core.c | 12 - drivers/net/tulip/uli526x.c | 12 - drivers/net/tulip/winbond-840.c | 4 drivers/net/typhoon.c | 6 drivers/net/ucc_geth.c | 4 drivers/net/usb/asix.c | 16 +- drivers/net/usb/catc.c | 2 drivers/net/usb/dm9601.c | 8 - drivers/net/usb/kaweth.c | 2 drivers/net/usb/mcs7830.c | 8 - drivers/net/usb/pegasus.c | 2 drivers/net/usb/rtl8150.c | 2 drivers/net/usb/smsc95xx.c | 8 - drivers/net/via-rhine.c | 4 drivers/net/via-velocity.c | 4 drivers/net/virtio_net.c | 20 +- drivers/net/vxge/vxge-main.c | 6 drivers/net/wireless/airo.c | 2 drivers/net/wireless/arlan-main.c | 4 drivers/net/wireless/libertas/main.c | 2 drivers/net/wireless/netwave_cs.c | 8 - drivers/net/wireless/orinoco/main.c | 6 drivers/net/wireless/ray_cs.c | 4 drivers/net/wireless/rndis_wlan.c | 8 - drivers/net/wireless/wavelan.c | 14 - drivers/net/wireless/wavelan_cs.c | 16 +- drivers/net/wireless/zd1201.c | 8 - drivers/net/yellowfin.c | 6 drivers/net/znet.c | 2 drivers/s390/net/qeth_l2_main.c | 4 drivers/staging/et131x/et131x_netdev.c | 14 - drivers/staging/slicoss/slicoss.c | 4 drivers/staging/sxg/sxg.c | 4 include/linux/netdevice.h | 143 +++++++++++++++++-- net/bluetooth/bnep/netdev.c | 6 net/core/dev.c | 180 +++++++++---------------- net/core/dev_mcast.c | 96 ------------- net/irda/irlan/irlan_eth.c | 4 net/mac80211/main.c | 4 net/mac80211/scan.c | 8 - 200 files changed, 743 insertions(+), 778 deletions(-)
include/linux/netdevice.h +125 -18
@@ -200,6 +200,11 @@ struct dev_addr_listint da_gusers; }; +struct address_list { +struct dev_addr_list *list; +int count; +}; +/* * We tag multicasts with these structures. */
@@ -748,11 +753,9 @@ struct net_deviceunsigned short dev_id;/* for shared network cards */ spinlock_t addr_list_lock; -struct dev_addr_list *uc_list;/* Secondary unicast mac addresses */ -int uc_count;/* Number of installed ucasts */ -int uc_promisc; -struct dev_addr_list *mc_list;/* Multicast mac addresses */ -int mc_count;/* Number of installed mcasts */ +struct address_list uc;/* secondary unicast mac addresses */ +int uc_promisc;/* Multicast mac addresses */ +struct address_list mc;unsigned int promiscuity;unsigned int allmulti;
@@ -1792,24 +1795,128 @@ extern int register_netdev(struct net_dextern void unregister_netdev (struct net_device *dev);/* Functions used for secondary unicast and multicast support */ extern void dev_set_rx_mode (struct net_device *dev); -extern void __dev_set_rx_mode (struct net_device *dev); -extern int dev_unicast_delete (struct net_device *dev,void *addr,int alen); -extern int dev_unicast_add (struct net_device *dev,void *addr,int alen); -extern int dev_unicast_sync (struct net_device *to,struct net_device *from); -extern void dev_unicast_unsync (struct net_device *to,struct net_device *from); -extern int dev_mc_delete (struct net_device *dev,void *addr,int alen,int all); -extern int dev_mc_add (struct net_device *dev,void *addr,int alen,int newonly); -extern int dev_mc_sync (struct net_device *to,struct net_device *from); -extern void dev_mc_unsync (struct net_device *to,struct net_device *from); -extern int __dev_addr_delete (struct dev_addr_list **list,int *count,void *addr,int alen,int all); -extern int __dev_addr_add (struct dev_addr_list **list,int *count,void *addr,int alen,int newonly); -extern int __dev_addr_sync (struct dev_addr_list **to,int *to_count,struct dev_addr_list **from,int *from_count); -extern void __dev_addr_unsync (struct dev_addr_list **to,int *to_count,struct dev_addr_list **from,int *from_count);extern int dev_set_promiscuity (struct net_device *dev,int inc);extern int dev_set_allmulti (struct net_device *dev,int inc);extern void netdev_state_change (struct net_device *dev);extern void netdev_bonding_change (struct net_device *dev);extern void netdev_features_change (struct net_device *dev); + +int dev_addr_add (struct net_device *dev,struct address_list *alist, +void *addr,int alen,int glbl); +int dev_addr_delete (struct net_device *dev,struct address_list *alist, +void *addr,int alen,int glbl); +int dev_addr_sync (struct net_device *todev,struct address_list *to, +struct address_list *from); +void dev_addr_unsync (struct net_device *todev,struct net_device *fromdev, +struct address_list *to,struct address_list *from); + +static inline int dev_mc_delete (struct net_device *dev,void *addr, +int alen,int glbl) +{ +return dev_addr_delete (dev, &dev->mc, addr, alen, glbl); +} + +static inline int dev_mc_add (struct net_device *dev,void *addr, +int alen,int glbl) +{ +return dev_addr_add (dev, &dev->mc, addr, alen, glbl); +} + +/** +* dev_mc_sync - Synchronize device's multicast list to another device +* @to: destination device +* @from: source device +* +* Add newly added addresses to the destination device and release +* addresses that have no users left. The source device must be +* locked by netif_tx_lock_bh. +* +* This function is intended to be called from the dev->set_multicast_list +* or dev->set_rx_mode function of layered software devices. +*/ +static inline int dev_mc_sync (struct net_device *to,struct net_device *from) +{ +return dev_addr_sync (to, &to->mc, &from->mc); +} + +/** +* dev_mc_unsync - Remove synchronized addresses from the destination +* device +* @to: destination device +* @from: source device +* +* Remove all addresses that were added to the destination device by +* dev_mc_sync(). This function is intended to be called from the +* dev->stop function of layered software devices. +*/ +static inline void dev_mc_unsync (struct net_device *to,struct net_device *from) +{ +dev_addr_unsync (to, from, &to->mc, &from->mc); +} + +/** +* dev_unicast_delete - Release secondary unicast address. +* @dev: device +* @addr: address to delete +* @alen: length of @addr +* +* Release reference to a secondary unicast address and remove it +* from the device if the reference count drops to zero. +* +* The caller must hold the rtnl_mutex. +*/ +static inline int dev_unicast_delete (struct net_device *dev,void *addr,int alen) +{ +return dev_addr_delete (dev, &dev->uc, addr, alen,0 ); +} + +/** +* dev_unicast_add - add a secondary unicast address +* @dev: device +* @addr: address to add +* @alen: length of @addr +* +* Add a secondary unicast address to the device or increase +* the reference count if it already exists. +* +* The caller must hold the rtnl_mutex. +*/ +static inline int dev_unicast_add (struct net_device *dev,void *addr,int alen) +{ +return dev_addr_add (dev, &dev->uc, addr, alen,0 ); +} + +/** +* dev_unicast_sync - Synchronize device's unicast list to another device +* @to: destination device +* @from: source device +* +* Add newly added addresses to the destination device and release +* addresses that have no users left. The source device must be +* locked by netif_tx_lock_bh. +* +* This function is intended to be called from the dev->set_rx_mode +* function of layered software devices. +*/ +static inline int dev_unicast_sync (struct net_device *to,struct net_device *from) +{ +return dev_addr_sync (to, &to->uc, &from->uc); +} + +/** +* dev_unicast_unsync - Remove synchronized addresses from the destination device +* @to: destination device +* @from: source device +* +* Remove all addresses that were added to the destination device by +* dev_unicast_sync(). This function is intended to be called from the +* dev->stop function of layered software devices. +*/ +static inline void dev_unicast_unsync (struct net_device *to,struct net_device *from) +{ +dev_addr_unsync (to, from, &to->uc, &from->uc); +} +/* Load a device via the kmod */ extern void dev_load (struct net *net,const char *name);extern void dev_mcast_init (void );
net/bluetooth/bnep/netdev.c +3 -3
@@ -64,7 +64,7 @@ static void bnep_net_set_mc_list(structstruct sk_buff *skb;int size; -BT_DBG ("%s mc_count %d" , dev->name, dev->mc_count); +BT_DBG ("%s mc_count %d" , dev->name, dev->mc.count); size =sizeof (*r) + (BNEP_MAX_MULTICAST_FILTERS +1 ) *ETH_ALEN *2 ; skb =alloc_skb (size,GFP_ATOMIC );
@@ -87,7 +87,7 @@ static void bnep_net_set_mc_list(structmemcpy (__skb_put (skb,ETH_ALEN ), dev->broadcast,ETH_ALEN ); r->len =htons (ETH_ALEN *2 ); }else { -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;int i, len = skb->len;if (dev->flags &IFF_BROADCAST ) {
@@ -97,7 +97,7 @@ static void bnep_net_set_mc_list(struct/* FIXME: We should group addresses here. */ -for (i =0 ; i < dev->mc_count && i <BNEP_MAX_MULTICAST_FILTERS ; i++) { +for (i =0 ; i < dev->mc.count && i <BNEP_MAX_MULTICAST_FILTERS ; i++) {memcpy (__skb_put (skb,ETH_ALEN ), dmi->dmi_addr,ETH_ALEN );memcpy (__skb_put (skb,ETH_ALEN ), dmi->dmi_addr,ETH_ALEN ); dmi = dmi->next;
net/core/dev.c +66 -114
275 lines not on this page · raw message
net/core/dev_mcast.c +1 -95
111 lines not on this page · raw message
net/irda/irlan/irlan_eth.c +2 -2
@@ -318,14 +318,14 @@ static void irlan_eth_set_multicast_list/* Enable promiscuous mode */ IRDA_WARNING ("Promiscuous mode not implemented by IrLAN!\n" ); } -else if ((dev->flags &IFF_ALLMULTI ) || dev->mc_count >HW_MAX_ADDRS ) { +else if ((dev->flags &IFF_ALLMULTI ) || dev->mc.count >HW_MAX_ADDRS ) {/* Disable promiscuous mode, use normal mode. */ IRDA_DEBUG (4 ,"%s(), Setting multicast filter\n" , __func__ );/* hardware_set_filter(NULL); */ irlan_set_multicast_filter (self, TRUE); } -else if (dev->mc_count) { +else if (dev->mc.count) {IRDA_DEBUG (4 ,"%s(), Setting multicast filter\n" , __func__ );/* Walk the address list, and load the filter */ /* hardware_set_filter(dev->mc_list); */
net/mac80211/main.c +2 -2
@@ -83,8 +83,8 @@ void ieee80211_configure_filter(struct i new_flags |= (1 <<31 );drv_configure_filter (local, changed_flags, &new_flags, - local->mdev->mc_count, - local->mdev->mc_list); + local->mdev->mc.count, + local->mdev->mc.list);WARN_ON (new_flags & (1 <<31 ));
net/mac80211/scan.c +4 -4
@@ -312,8 +312,8 @@ void ieee80211_scan_completed(struct iee local->filter_flags &= ~FIF_BCN_PRBRESP_PROMISC ;drv_configure_filter (local,FIF_BCN_PRBRESP_PROMISC , &local->filter_flags, - local->mdev->mc_count, - local->mdev->mc_list); + local->mdev->mc.count, + local->mdev->mc.list);netif_addr_unlock (local->mdev);netif_tx_unlock_bh (local->mdev);
@@ -399,8 +399,8 @@ static int ieee80211_start_sw_scan(struc local->filter_flags |=FIF_BCN_PRBRESP_PROMISC ;drv_configure_filter (local,FIF_BCN_PRBRESP_PROMISC , &local->filter_flags, - local->mdev->mc_count, - local->mdev->mc_list); + local->mdev->mc.count, + local->mdev->mc.list);netif_addr_unlock_bh (local->mdev);/* TODO: start scan as soon as all nullfunc frames are ACKed */
drivers/infiniband/hw/nes/nes_nic.c +2 -2
@@ -862,10 +862,10 @@ static void nes_netdev_set_multicast_lis }nes_debug (NES_DBG_NIC_RX ,"Number of MC entries = %d, Promiscous = %d, All Multicast = %d.\n" , - netdev->mc_count, !!(netdev->flags &IFF_PROMISC ), + netdev->mc.count, !!(netdev->flags &IFF_PROMISC ), !!(netdev->flags &IFF_ALLMULTI ));if (!mc_all_on) { - multicast_addr = netdev->mc_list; + multicast_addr = netdev->mc.list; perfect_filter_register_address =NES_IDX_PERFECT_FILTER_LOW + pft_entries_preallocated *0x8 ; for (mc_index = 0; mc_index < max_pft_entries_avaiable;
drivers/infiniband/ulp/ipoib/ipoib_multicast.c +1 -1
@@ -788,7 +788,7 @@ void ipoib_mcast_restart_task(struct worclear_bit (IPOIB_MCAST_FLAG_FOUND , &mcast->flags);/* Mark all of the entries that are found or don't exist */ -for (mclist = dev->mc_list; mclist; mclist = mclist->next) { +for (mclist = dev->mc.list; mclist; mclist = mclist->next) {union ib_gid mgid;memcpy (mgid.raw, mclist->dmi_addr +4 ,sizeof mgid);
drivers/media/dvb/dvb-core/dvb_net.c +5 -5
@@ -1140,18 +1140,18 @@ static void wq_set_multicast_list (struc }else if ((dev->flags &IFF_ALLMULTI )) {dprintk ("%s: allmulti mode\n" , dev->name); priv->rx_mode =RX_MODE_ALL_MULTI ; - }else if (dev->mc_count) { + }else if (dev->mc.count) {int mci;struct dev_mc_list *mc;dprintk ("%s: set_mc_list, %d entries\n" , - dev->name, dev->mc_count); + dev->name, dev->mc.count); priv->rx_mode =RX_MODE_MULTI ; priv->multi_num =0 ; -for (mci =0 , mc=dev->mc_list; - mci < dev->mc_count; +for (mci =0 , mc=dev->mc.list; + mci < dev->mc.count; mc = mc->next, mci++) {dvb_set_mc_filter (dev, mc); }
@@ -1238,7 +1238,7 @@ static void dvb_net_setup(struct net_dev dev->header_ops = &dvb_header_ops; dev->netdev_ops = &dvb_netdev_ops; dev->mtu =4096 ; - dev->mc_count =0 ; + dev->mc.count =0 ; dev->flags |=IFF_NOARP ; }
drivers/net/3c501.c +1 -1
@@ -819,7 +819,7 @@ static void set_multicast_list(struct neif (dev->flags &IFF_PROMISC ) {outb (RX_PROM ,RX_CMD );inb (RX_STATUS ); - }else if (dev->mc_list || dev->flags &IFF_ALLMULTI ) { + }else if (dev->mc.list || dev->flags &IFF_ALLMULTI ) {/* Multicast or all multicast is the same */ outb (RX_MULT ,RX_CMD );inb (RX_STATUS );/* Clear status. */
drivers/net/3c505.c +4 -4
@@ -1208,7 +1208,7 @@ static int elp_close(struct net_device *static void elp_set_mc_list (struct net_device *dev) {elp_device *adapter =netdev_priv (dev); -struct dev_mc_list *dmi = dev->mc_list; +struct dev_addr_list *dmi = dev->mc.list;int i;unsigned long flags;
@@ -1221,8 +1221,8 @@ static void elp_set_mc_list(struct net_d/* send a "load multicast list" command to the board, max 10 addrs/cmd */ /* if num_addrs==0 the list will be cleared */ adapter->tx_pcb.command =CMD_LOAD_MULTICAST_LIST ; - adapter->tx_pcb.length =6 * dev->mc_count; -for (i =0 ; i < dev->mc_count; i++) { + adapter->tx_pcb.length =6 * dev->mc.count; +for (i =0 ; i < dev->mc.count; i++) {memcpy (adapter->tx_pcb.data.multicast[i], dmi->dmi_addr,6 ); dmi = dmi->next; }
@@ -1236,7 +1236,7 @@ static void elp_set_mc_list(struct net_dTIMEOUT_MSG (__LINE__); } } -if (dev->mc_count) +if (dev->mc.count) adapter->tx_pcb.data.configure =NO_LOOPBACK |RECV_BROAD |RECV_MULTI ;else /* num_addrs == 0 */ adapter->tx_pcb.data.configure =NO_LOOPBACK |RECV_BROAD ;
drivers/net/3c509.c +4 -4
@@ -1116,9 +1116,9 @@ set_multicast_list(struct net_device *deif (el3_debug >1 ) {static int old; -if (old != dev->mc_count) { - old = dev->mc_count; -printk ("%s: Setting Rx mode to %d addresses.\n" , dev->name, dev->mc_count); +if (old != dev->mc.count) { + old = dev->mc.count; +printk ("%s: Setting Rx mode to %d addresses.\n" , dev->name, dev->mc.count); } }spin_lock_irqsave (&lp->lock, flags);
@@ -1126,7 +1126,7 @@ set_multicast_list(struct net_device *deoutw (SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm, ioaddr +EL3_CMD ); } -else if (dev->mc_count || (dev->flags&IFF_ALLMULTI )) { +else if (dev->mc.count || (dev->flags&IFF_ALLMULTI )) {outw (SetRxFilter | RxStation | RxMulticast | RxBroadcast, ioaddr +EL3_CMD ); }else
drivers/net/3c515.c +1 -1
@@ -1537,7 +1537,7 @@ static void set_rx_mode(struct net_devicprintk ("%s: Setting promiscuous mode.\n" , dev->name); new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm; - }else if ((dev->mc_list) || (dev->flags &IFF_ALLMULTI )) { + }else if ((dev->mc.list) || (dev->flags &IFF_ALLMULTI )) { new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast; }else new_mode = SetRxFilter | RxStation | RxBroadcast;
drivers/net/3c523.c +3 -3
@@ -625,8 +625,8 @@ static int init586(struct net_device *devolatile struct iasetup_cmd_struct *ias_cmd;volatile struct tdr_cmd_struct *tdr_cmd;volatile struct mcsetup_cmd_struct *mc_cmd; -struct dev_mc_list *dmi = dev->mc_list; -int num_addrs = dev->mc_count; +struct dev_mc_list *dmi = dev->mc.list; +int num_addrs = dev->mc.count; ptr = (void *) ((char *) p->scb +sizeof (struct scb_struct ));
@@ -770,7 +770,7 @@ static int init586(struct net_device *de* Multicast setup */ -if (dev->mc_count) { +if (dev->mc.count) {/* I don't understand this: do we really need memory after the init? */ int len = ((char *) p->iscp - (char *) ptr -8 ) /6 ;if (len <=0 ) {
drivers/net/3c527.c +6 -6
@@ -1528,14 +1528,14 @@ static void do_mc32_set_multicast_list(sif ((dev->flags&IFF_PROMISC ) || (dev->flags&IFF_ALLMULTI ) || - dev->mc_count >10 ) + dev->mc.count >10 )/* Enable promiscuous mode */ filt |=1 ; -else if (dev->mc_count) +else if (dev->mc.count) {unsigned char block[62 ];unsigned char *bp; -struct dev_mc_list *dmc=dev->mc_list; +struct dev_mc_list *dmc=dev->mc.list;int i;
@@ -1544,16 +1544,16 @@ static void do_mc32_set_multicast_list(sif (!lp->mc_list_valid) { block[1 ]=0 ; - block[0 ]=dev->mc_count; + block[0 ]=dev->mc.count; bp=block+2 ; -for (i=0 ;i<dev->mc_count;i++) +for (i=0 ;i<dev->mclcount;i++) {memcpy (bp, dmc->dmi_addr,6 ); bp+=6 ; dmc=dmc->next; } -if (mc32_command_nowait (dev,2 , block,2 +6 *dev->mc_count)==-1 ) +if (mc32_command_nowait (dev,2 , block,2 +6 *dev->mclcount)==-1 ) { lp->mc_reload_wait =1 ;return ;
drivers/net/3c59x.c +1 -1
@@ -2972,7 +2972,7 @@ static void set_rx_mode(struct net_devicif (vortex_debug >3 )printk (KERN_NOTICE "%s: Setting promiscuous mode.\n" , dev->name); new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm; - }else if ((dev->mc_list) || (dev->flags &IFF_ALLMULTI )) { + }else if ((dev->mc.list) || (dev->flags &IFF_ALLMULTI )) { new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast; }else new_mode = SetRxFilter | RxStation | RxBroadcast;
drivers/net/7990.c +2 -2
@@ -595,7 +595,7 @@ static void lance_load_multicast (structstruct lance_private *lp =netdev_priv (dev);volatile struct lance_init_block *ib = lp->init_block;volatile u16 *mcast_table = (u16 *)&ib->filter; -struct dev_mc_list *dmi=dev->mc_list; +struct dev_mc_list *dmi=dev->mc.list;char *addrs;int i;u32 crc;
@@ -611,7 +611,7 @@ static void lance_load_multicast (struct ib->filter [1 ] =0 ;/* Add addresses */ -for (i =0 ; i < dev->mc_count; i++){ +for (i =0 ; i < dev->mc.count; i++){ addrs = dmi->dmi_addr; dmi = dmi->next;
drivers/net/8139cp.c +2 -2
@@ -912,7 +912,7 @@ static void __cp_set_rx_mode (struct net AcceptBroadcast | AcceptMulticast | AcceptMyPhys | AcceptAllPhys; mc_filter[1 ] = mc_filter[0 ] =0xffffffff ; - }else if ((dev->mc_count > multicast_filter_limit) + }else if ((dev->mc.count > multicast_filter_limit) || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -921,7 +921,7 @@ static void __cp_set_rx_mode (struct netstruct dev_mc_list *mclist; rx_mode = AcceptBroadcast | AcceptMyPhys; mc_filter[1 ] = mc_filter[0 ] =0 ; -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {int bit_nr =ether_crc (ETH_ALEN , mclist->dmi_addr) >>26 ;
drivers/net/8139too.c +2 -2
@@ -2536,7 +2536,7 @@ static void __set_rx_mode (struct net_de AcceptBroadcast | AcceptMulticast | AcceptMyPhys | AcceptAllPhys; mc_filter[1 ] = mc_filter[0 ] =0xffffffff ; - }else if ((dev->mc_count > multicast_filter_limit) + }else if ((dev->mc.count > multicast_filter_limit) || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -2545,7 +2545,7 @@ static void __set_rx_mode (struct net_destruct dev_mc_list *mclist; rx_mode = AcceptBroadcast | AcceptMyPhys; mc_filter[1 ] = mc_filter[0 ] =0 ; -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {int bit_nr =ether_crc (ETH_ALEN , mclist->dmi_addr) >>26 ;
drivers/net/82596.c +5 -5
@@ -1506,7 +1506,7 @@ static void set_multicast_list(struct neint config =0 , cnt;DEB (DEB_MULTI ,printk (KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n" , - dev->name, dev->mc_count, + dev->name, dev->mc.count, dev->flags &IFF_PROMISC ?"ON" :"OFF" , dev->flags &IFF_ALLMULTI ?"ON" :"OFF" ));
@@ -1534,7 +1534,7 @@ static void set_multicast_list(struct nei596_add_cmd (dev, &lp->cf_cmd.cmd); } - cnt = dev->mc_count; + cnt = dev->mc.count;if (cnt >MAX_MC_CNT ) { cnt =MAX_MC_CNT ;
@@ -1542,7 +1542,7 @@ static void set_multicast_list(struct ne dev->name, cnt); } -if (dev->mc_count >0 ) { +if (dev->mc.count >0 ) {struct dev_mc_list *dmi;unsigned char *cp;struct mc_cmd *cmd;
@@ -1551,9 +1551,9 @@ static void set_multicast_list(struct nereturn ; cmd = &lp->mc_cmd; cmd->cmd.command = CmdMulticastList; - cmd->mc_cnt = dev->mc_count *6 ; + cmd->mc_cnt = dev->mc.count *6 ; cp = cmd->mc_addrs; -for (dmi = dev->mc_list; cnt && dmi !=NULL ; dmi = dmi->next, cnt--, cp +=6 ) { +for (dmi = dev->mc.list; cnt && dmi !=NULL ; dmi = dmi->next, cnt--, cp +=6 ) {memcpy (cp, dmi->dmi_addr,6 );if (i596_debug >1 ) DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %pM\n",
drivers/net/a2065.c +2 -2
@@ -610,7 +610,7 @@ static void lance_load_multicast (structstruct lance_private *lp =netdev_priv (dev);volatile struct lance_init_block *ib = lp->init_block;volatile u16 *mcast_table = (u16 *)&ib->filter; -struct dev_mc_list *dmi=dev->mc_list; +struct dev_mc_list *dmi=dev->mc.list;char *addrs;int i;u32 crc;
@@ -626,7 +626,7 @@ static void lance_load_multicast (struct ib->filter [1 ] =0 ;/* Add addresses */ -for (i =0 ; i < dev->mc_count; i++){ +for (i =0 ; i < dev->mc.count; i++){ addrs = dmi->dmi_addr; dmi = dmi->next;
drivers/net/acenic.c +1 -1
@@ -2844,7 +2844,7 @@ static void ace_set_multicast_list(struc* set the entire multicast list at a time and keeping track of * it here is going to be messy. */ -if ((dev->mc_count) && !(ap->mcast_all)) { +if ((dev->mc.count) && !(ap->mcast_all)) { cmd.evt =C_SET_MULTICAST_MODE ; cmd.code =C_C_MCAST_ENABLE ; cmd.idx =0 ;
drivers/net/amd8111e.c +5 -5
@@ -1387,15 +1387,15 @@ static void amd8111e_set_multicast_list( }else writel (PROM , lp->mmio +CMD2 ); -if (dev->flags &IFF_ALLMULTI || dev->mc_count >MAX_FILTER_SIZE ){ +if (dev->flags &IFF_ALLMULTI || dev->mc.count >MAX_FILTER_SIZE ){/* get all multicast packet */ mc_filter[1 ] = mc_filter[0 ] =0xffffffff ; - lp->mc_list = dev->mc_list; + lp->mc_list = dev->mc.list; lp->options |=OPTION_MULTICAST_ENABLE ;amd8111e_writeq (*(u64 *)mc_filter,lp->mmio +LADRF );return ; } -if ( dev->mc_count ==0 ){ +if ( dev->mc.count ==0 ){/* get only own packets */ mc_filter[1 ] = mc_filter[0 ] =0 ; lp->mc_list =NULL ;
@@ -1407,9 +1407,9 @@ static void amd8111e_set_multicast_list( }/* load all the multicast addresses in the logic filter */ lp->options |=OPTION_MULTICAST_ENABLE ; - lp->mc_list = dev->mc_list; + lp->mc_list = dev->mc.list; mc_filter[1 ] = mc_filter[0 ] =0 ; -for (i =0 , mc_ptr = dev->mc_list; mc_ptr && i < dev->mc_count; +for (i =0 , mc_ptr = dev->mc.list; mc_ptr && i < dev->mc.count; i++, mc_ptr = mc_ptr->next) { bit_num = (ether_crc_le (ETH_ALEN , mc_ptr->dmi_addr) >>26 ) &0x3f ; mc_filter[bit_num >>5 ] |=1 << (bit_num &31 );
drivers/net/appletalk/ltpc.c +1 -1
@@ -1125,7 +1125,7 @@ struct net_device * __init ltpc_probe(voprintk (KERN_INFO "Apple/Farallon LocalTalk-PC card at %03x, DMA%d. Using polled mode.\n" ,io,dma); dev->netdev_ops = <pc_netdev; - dev->mc_list =NULL ; + dev->mc.list =NULL ; dev->base_addr = io; dev->irq = irq; dev->dma = dma;
drivers/net/ariadne.c +1 -1
@@ -819,7 +819,7 @@ static void set_multicast_list(struct ne lance->RDP =PROM ;/* Set promiscuous mode */ }else {short multicast_table[4 ]; -int num_addrs = dev->mc_count; +int num_addrs = dev->mc.count;int i;/* We don't use the multicast table, but rely on upper-layer filtering. */ memset(multicast_table, (num_addrs == 0) ? 0 : -1,
drivers/net/arm/am79c961a.c +1 -1
@@ -387,7 +387,7 @@ static void am79c961_setmulticastlist (smemset (multi_hash,0x00 ,sizeof (multi_hash)); -for (dmi = dev->mc_list; dmi; dmi = dmi->next) +for (dmi = dev->mc.list; dmi; dmi = dmi->next)am79c961_mc_hash (dmi, multi_hash); }
drivers/net/arm/at91_ether.c +3 -3
@@ -562,8 +562,8 @@ static void at91ether_sethashtable(struc mc_filter[0 ] = mc_filter[1 ] =0 ; - curr = dev->mc_list; -for (i =0 ; i < dev->mc_count; i++, curr = curr->next) { + curr = dev->mc.list; +for (i =0 ; i < dev->mc.count; i++, curr = curr->next) {if (!curr)break ;/* unexpected end of list */ bitnr =hash_get_index (curr->dmi_addr);
@@ -592,7 +592,7 @@ static void at91ether_set_multicast_listat91_emac_write (AT91_EMAC_HSH ,-1 );at91_emac_write (AT91_EMAC_HSL ,-1 ); cfg |=AT91_EMAC_MTI ; - }else if (dev->mc_count >0 ) {/* Enable specific multicasts */ + }else if (dev->mc.count >0 ) {/* Enable specific multicasts */ at91ether_sethashtable (dev); cfg |=AT91_EMAC_MTI ; }else if (dev->flags & (~IFF_ALLMULTI )) {/* Disable all multicast mode */
drivers/net/arm/ether3.c +1 -1
@@ -463,7 +463,7 @@ static void ether3_setmulticastlist(struif (dev->flags &IFF_PROMISC ) {/* promiscuous mode */ priv (dev)->regs.config1 |=CFG1_RECVPROMISC ; - }else if (dev->flags &IFF_ALLMULTI || dev->mc_count) { + }else if (dev->flags &IFF_ALLMULTI || dev->mc.count) {priv (dev)->regs.config1 |=CFG1_RECVSPECBRMULTI ; }else priv (dev)->regs.config1 |=CFG1_RECVSPECBROAD ;
drivers/net/arm/ixp4xx_eth.c +2 -2
@@ -733,9 +733,9 @@ static int eth_xmit(struct sk_buff *skb,static void eth_set_mcast_list (struct net_device *dev) {struct port *port =netdev_priv (dev); -struct dev_mc_list *mclist = dev->mc_list; +struct dev_mc_list *mclist = dev->mc.list;u8 diffs[ETH_ALEN ], *addr; -int cnt = dev->mc_count, i; +int cnt = dev->mc.count, i;if ((dev->flags &IFF_PROMISC ) || !mclist || !cnt) { __raw_writel(DEFAULT_RX_CNTRL0 & ~RX_CNTRL0_ADDR_FLTR_EN,
drivers/net/arm/ks8695net.c +3 -3
@@ -1127,7 +1127,7 @@ ks8695_set_multicast(struct net_device *if (ndev->flags &IFF_ALLMULTI ) {/* enable all multicast mode */ ctrl |=DRXC_RM ; - }else if (ndev->mc_count >KS8695_NR_ADDRESSES ) { + }else if (ndev->mc.count >KS8695_NR_ADDRESSES ) {/* more specific multicast addresses than can be * handled in hardware */
@@ -1135,8 +1135,8 @@ ks8695_set_multicast(struct net_device * }else {/* enable specific multicasts */ ctrl &= ~DRXC_RM ; -ks8695_init_partial_multicast (ksp, ndev->mc_list, - ndev->mc_count); +ks8695_init_partial_multicast (ksp, ndev->mc.list, + ndev->mc.count); }ks8695_writereg (ksp,KS8695_DRXC , ctrl);
drivers/net/at1700.c +3 -3
@@ -837,12 +837,12 @@ set_rx_mode(struct net_device *dev)if (dev->flags &IFF_PROMISC ) {memset (mc_filter,0xff ,sizeof (mc_filter));outb (3 , ioaddr +RX_MODE );/* Enable promiscuous mode */ - }else if (dev->mc_count >MC_FILTERBREAK + }else if (dev->mc.count >MC_FILTERBREAK || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ memset (mc_filter,0xff ,sizeof (mc_filter));outb (2 , ioaddr +RX_MODE );/* Use normal mode. */ - }else if (dev->mc_count ==0 ) { + }else if (dev->mc.count ==0 ) {memset (mc_filter,0x00 ,sizeof (mc_filter));outb (1 , ioaddr +RX_MODE );/* Ignore almost all multicasts. */ }else {
@@ -850,7 +850,7 @@ set_rx_mode(struct net_device *dev)int i;memset (mc_filter,0 ,sizeof (mc_filter)); -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {unsigned int bit =ether_crc_le (ETH_ALEN , mclist->dmi_addr) >>26 ;
drivers/net/atarilance.c +1 -1
@@ -1097,7 +1097,7 @@ static void set_multicast_list( struct nREGA (CSR15 ) =0x8000 ;/* Set promiscuous mode */ }else {short multicast_table[4 ]; -int num_addrs = dev->mc_count; +int num_addrs = dev->mc.count;int i;/* We don't use the multicast table, but rely on upper-layer * filtering. */
drivers/net/atl1c/atl1c_main.c +1 -1
@@ -355,7 +355,7 @@ static void atl1c_set_multi(struct net_dAT_WRITE_REG_ARRAY (hw,REG_RX_HASH_TABLE ,1 ,0 );/* comoute mc addresses' hash value ,and put it into hash table */ -for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { +for (mc_ptr = netdev->mc.list; mc_ptr; mc_ptr = mc_ptr->next) { hash_value =atl1c_hash_mc_addr (hw, mc_ptr->dmi_addr);atl1c_hash_set (hw, hash_value); }
drivers/net/atl1e/atl1e_main.c +1 -1
@@ -311,7 +311,7 @@ static void atl1e_set_multi(struct net_dAT_WRITE_REG_ARRAY (hw,REG_RX_HASH_TABLE ,1 ,0 );/* comoute mc addresses' hash value ,and put it into hash table */ -for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { +for (mc_ptr = netdev->mc.list; mc_ptr; mc_ptr = mc_ptr->next) { hash_value =atl1e_hash_mc_addr (hw, mc_ptr->dmi_addr);atl1e_hash_set (hw, hash_value); }
drivers/net/atlx/atl2.c +1 -1
@@ -157,7 +157,7 @@ static void atl2_set_multi(struct net_deATL2_WRITE_REG_ARRAY (hw,REG_RX_HASH_TABLE ,1 ,0 );/* comoute mc addresses' hash value ,and put it into hash table */ -for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { +for (mc_ptr = netdev->mc.list; mc_ptr; mc_ptr = mc_ptr->next) { hash_value =atl2_hash_mc_addr (hw, mc_ptr->dmi_addr);atl2_hash_set (hw, hash_value); }
drivers/net/atlx/atlx.c +1 -1
@@ -144,7 +144,7 @@ static void atlx_set_multi(struct net_deiowrite32 (0 , (hw->hw_addr +REG_RX_HASH_TABLE ) + (1 <<2 ));/* compute mc addresses' hash value ,and put it into hash table */ -for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { +for (mc_ptr = netdev->mc.list; mc_ptr; mc_ptr = mc_ptr->next) { hash_value =atlx_hash_mc_addr (hw, mc_ptr->dmi_addr);atlx_hash_set (hw, hash_value); }
drivers/net/atp.c +3 -3
@@ -859,7 +859,7 @@ static void set_rx_mode_8002(struct net_struct net_local *lp =netdev_priv (dev);long ioaddr = dev->base_addr; -if (dev->mc_count >0 || (dev->flags & (IFF_ALLMULTI |IFF_PROMISC ))) +if (dev->mc.count >0 || (dev->flags & (IFF_ALLMULTI |IFF_PROMISC ))) lp->addr_mode = CMR2h_PROMISC;else lp->addr_mode = CMR2h_Normal;
@@ -875,7 +875,7 @@ static void set_rx_mode_8012(struct net_if (dev->flags &IFF_PROMISC ) {/* Set promiscuous. */ new_mode = CMR2h_PROMISC; - }else if ((dev->mc_count >1000 ) || (dev->flags &IFF_ALLMULTI )) { + }else if ((dev->mc.count >1000 ) || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ memset (mc_filter,0xff ,sizeof (mc_filter)); new_mode = CMR2h_Normal;
@@ -883,7 +883,7 @@ static void set_rx_mode_8012(struct net_struct dev_mc_list *mclist;memset (mc_filter,0 ,sizeof (mc_filter)); -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {int filterbit =ether_crc_le (ETH_ALEN , mclist->dmi_addr) &0x3f ;
drivers/net/au1000_eth.c +2 -2
@@ -1014,7 +1014,7 @@ static void au1000_multicast_list(structif (dev->flags &IFF_PROMISC ) {/* Set promiscuous. */ aup->mac->control |=MAC_PROMISCUOUS ; }else if ((dev->flags &IFF_ALLMULTI ) || - dev->mc_count >MULTICAST_FILTER_LIMIT ) { + dev->mc.count >MULTICAST_FILTER_LIMIT ) { aup->mac->control |=MAC_PASS_ALL_MULTI ; aup->mac->control &= ~MAC_PROMISCUOUS ;printk (KERN_INFO "%s: Pass all multicast\n" , dev->name);
@@ -1024,7 +1024,7 @@ static void au1000_multicast_list(structu32 mc_filter[2 ];/* Multicast hash filter */ mc_filter[1 ] = mc_filter[0 ] =0 ; -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {set_bit (ether_crc (ETH_ALEN , mclist->dmi_addr)>>26 , (long *)mc_filter);
drivers/net/b44.c +3 -3
@@ -1691,8 +1691,8 @@ static int __b44_load_mcast(struct b44 *struct dev_mc_list *mclist;int i, num_ents; - num_ents =min_t (int, dev->mc_count,B44_MCAST_TABLE_SIZE ); - mclist = dev->mc_list; + num_ents =min_t (int, dev->mc.count,B44_MCAST_TABLE_SIZE ); + mclist = dev->mc.list;for (i =0 ; mclist && i < num_ents; i++, mclist = mclist->next) {__b44_cam_write (bp, mclist->dmi_addr, i +1 ); }
@@ -1716,7 +1716,7 @@ static void __b44_set_rx_mode(struct net__b44_set_mac_addr (bp);if ((dev->flags &IFF_ALLMULTI ) || - (dev->mc_count >B44_MCAST_TABLE_SIZE )) + (dev->mc.count >B44_MCAST_TABLE_SIZE )) val |=RXCONFIG_ALLMULTI ;else i =__b44_load_mcast (bp, dev);
drivers/net/benet/be_main.c +1 -1
@@ -576,7 +576,7 @@ static void be_set_multicast_filter(strureturn ; } -for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { +for (mc_ptr = netdev->mc.list; mc_ptr; mc_ptr = mc_ptr->next) {memcpy (&mac_addr[i][0 ], mc_ptr->dmi_addr,ETH_ALEN );if (++i >=32 ) { be_cmd_mcast_mac_set(&adapter->ctrl,
drivers/net/bfin_mac.c +3 -3
@@ -863,14 +863,14 @@ static void bfin_mac_timeout(struct net_static void bfin_mac_multicast_hash (struct net_device *dev) {u32 emac_hashhi, emac_hashlo; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;char *addrs;int i;u32 crc; emac_hashhi = emac_hashlo =0 ; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) { addrs = dmi->dmi_addr; dmi = dmi->next;
@@ -913,7 +913,7 @@ static void bfin_mac_set_multicast_list( sysctl =bfin_read_EMAC_OPMODE (); sysctl |=PAM ;bfin_write_EMAC_OPMODE (sysctl); - }else if (dev->mc_count) { + }else if (dev->mc.count) {/* set up multicast hash table */ sysctl =bfin_read_EMAC_OPMODE (); sysctl |=HM ;
drivers/net/bmac.c +6 -6
@@ -972,7 +972,7 @@ static void bmac_set_multicast(struct ne {struct dev_mc_list *dmi;struct bmac_data *bp =netdev_priv (dev); -int num_addrs = dev->mc_count; +int num_addrs = dev->mc.count;unsigned short rx_cfg;int i;
@@ -981,7 +981,7 @@ static void bmac_set_multicast(struct neXXDEBUG (("bmac: enter bmac_set_multicast, n_addrs=%d\n" , num_addrs)); -if ((dev->flags &IFF_ALLMULTI ) || (dev->mc_count >64 )) { +if ((dev->flags &IFF_ALLMULTI ) || (dev->mc.count >64 )) {for (i=0 ; i<4 ; i++) bp->hash_table_mask[i] =0xffff ;bmac_update_hash_table_mask (dev, bp); rx_cfg =bmac_rx_on (dev,1 ,0 );
@@ -999,7 +999,7 @@ static void bmac_set_multicast(struct ne rx_cfg =bmac_rx_on (dev,0 ,0 );XXDEBUG (("bmac: multi disabled, rx_cfg=%#08x\n" , rx_cfg)); }else { -for (dmi=dev->mc_list; dmi!=NULL ; dmi=dmi->next) +for (dmi=dev->mc.list; dmi!=NULL ; dmi=dmi->next)bmac_addhash (bp, dmi->dmi_addr);bmac_update_hash_table_mask (dev, bp); rx_cfg =bmac_rx_on (dev,1 ,0 );
@@ -1014,13 +1014,13 @@ static void bmac_set_multicast(struct nestatic void bmac_set_multicast (struct net_device *dev) { -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;char *addrs;int i;unsigned short rx_cfg;u32 crc; -if ((dev->flags &IFF_ALLMULTI ) || (dev->mc_count >64 )) { +if ((dev->flags &IFF_ALLMULTI ) || (dev->mc.count >64 )) {bmwrite (dev,BHASH0 ,0xffff );bmwrite (dev,BHASH1 ,0xffff );bmwrite (dev,BHASH2 ,0xffff );
@@ -1038,7 +1038,7 @@ static void bmac_set_multicast(struct nefor (i =0 ; i <4 ; i++) hash_table[i] =0 ; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) { addrs = dmi->dmi_addr; dmi = dmi->next;
drivers/net/bnx2.c +4 -4
@@ -3349,7 +3349,7 @@ bnx2_set_rx_mode(struct net_device *dev)memset (mc_filter,0 ,4 *NUM_MC_HASH_REGISTERS ); -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) { crc =ether_crc_le (ETH_ALEN , mclist->dmi_addr);
@@ -3368,15 +3368,15 @@ bnx2_set_rx_mode(struct net_device *dev) } uc_ptr =NULL ; -if (dev->uc_count >BNX2_MAX_UNICAST_ADDRESSES ) { +if (dev->uc.count >BNX2_MAX_UNICAST_ADDRESSES ) { rx_mode |=BNX2_EMAC_RX_MODE_PROMISCUOUS ; sort_mode |=BNX2_RPM_SORT_USER0_PROM_EN |BNX2_RPM_SORT_USER0_PROM_VLAN ; }else if (!(dev->flags &IFF_PROMISC )) { - uc_ptr = dev->uc_list; + uc_ptr = dev->uc.list;/* Add all entries into to the match filter list */ -for (i =0 ; i < dev->uc_count; i++) { +for (i =0 ; i < dev->uc.count; i++) {bnx2_set_mac_addr (bp, uc_ptr->da_addr, i +BNX2_START_UNICAST_ADDRESS_INDEX ); sort_mode |= (1 <<
drivers/net/bnx2x_main.c +5 -5
@@ -10655,7 +10655,7 @@ static void bnx2x_set_rx_mode(struct net rx_mode =BNX2X_RX_MODE_PROMISC ; else if ((dev->flags & IFF_ALLMULTI) || - ((dev->mc_count > BNX2X_MAX_MULTICAST) && CHIP_IS_E1(bp))) + ((dev->mc.count > BNX2X_MAX_MULTICAST) && CHIP_IS_E1(bp))) rx_mode = BNX2X_RX_MODE_ALLMULTI; else { /* some multicasts */
@@ -10665,8 +10665,8 @@ static void bnx2x_set_rx_mode(struct netstruct mac_configuration_cmd *config =bnx2x_sp (bp, mcast_config); -for (i =0 , mclist = dev->mc_list; - mclist && (i < dev->mc_count); +for (i =0 , mclist = dev->mc.list; + mclist && (i < dev->mc.count); i++, mclist = mclist->next) { config->config_table[i].
@@ -10733,8 +10733,8 @@ static void bnx2x_set_rx_mode(struct netmemset (mc_filter,0 ,4 *MC_HASH_SIZE ); -for (i =0 , mclist = dev->mc_list; - mclist && (i < dev->mc_count); +for (i =0 , mclist = dev->mc.list; + mclist && (i < dev->mc.count); i++, mclist = mclist->next) { DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n",
drivers/net/bonding/bond_main.c +8 -8
@@ -872,7 +872,7 @@ static void bond_resend_igmp_join_requesrcu_read_lock (); in_dev =__in_dev_get_rcu (bond->dev);if (in_dev) { -for (im = in_dev->mc_list; im; im = im->next) { +for (im = in_dev->mc.list; im; im = im->next) {ip_mc_rejoin_group (im); } }
@@ -931,7 +931,7 @@ static void bond_mc_list_flush(struct nestruct bonding *bond =netdev_priv (bond_dev);struct dev_mc_list *dmi; -for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) { +for (dmi = bond_dev->mc.list; dmi; dmi = dmi->next) {dev_mc_delete (slave_dev, dmi->dmi_addr, dmi->dmi_addrlen,0 ); }
@@ -970,7 +970,7 @@ static void bond_mc_swap(struct bondingdev_set_allmulti (old_active->dev,-1 ); } -for (dmi = bond->dev->mc_list; dmi; dmi = dmi->next) { +for (dmi = bond->dev->mc.list; dmi; dmi = dmi->next) {dev_mc_delete (old_active->dev, dmi->dmi_addr, dmi->dmi_addrlen,0 ); } }
@@ -985,7 +985,7 @@ static void bond_mc_swap(struct bondingdev_set_allmulti (new_active->dev,1 ); } -for (dmi = bond->dev->mc_list; dmi; dmi = dmi->next) { +for (dmi = bond->dev->mc.list; dmi; dmi = dmi->next) {dev_mc_add (new_active->dev, dmi->dmi_addr, dmi->dmi_addrlen,0 ); }bond_resend_igmp_join_requests (bond);
@@ -1578,7 +1578,7 @@ int bond_enslave(struct net_device *bondnetif_addr_lock_bh (bond_dev);/* upload master's mc_list to new slave */ -for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) { +for (dmi = bond_dev->mc.list; dmi; dmi = dmi->next) {dev_mc_add (slave_dev, dmi->dmi_addr, dmi->dmi_addrlen,0 ); }netif_addr_unlock_bh (bond_dev);
@@ -4067,7 +4067,7 @@ static void bond_set_multicast_list(stru bond->flags = bond_dev->flags;/* looking for addresses to add to slaves' mc list */ -for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) { +for (dmi = bond_dev->mc.list; dmi; dmi = dmi->next) {if (!bond_mc_list_find_dmi (dmi, bond->mc_list)) {bond_mc_add (bond, dmi->dmi_addr, dmi->dmi_addrlen); }
@@ -4075,14 +4075,14 @@ static void bond_set_multicast_list(stru/* looking for addresses to delete from slaves' list */ for (dmi = bond->mc_list; dmi; dmi = dmi->next) { -if (!bond_mc_list_find_dmi (dmi, bond_dev->mc_list)) { +if (!bond_mc_list_find_dmi (dmi, bond_dev->mc.list)) {bond_mc_delete (bond, dmi->dmi_addr, dmi->dmi_addrlen); } }/* save master's multicast list */ bond_mc_list_destroy (bond); -bond_mc_list_copy (bond_dev->mc_list, bond,GFP_ATOMIC ); +bond_mc_list_copy (bond_dev->mc.list, bond,GFP_ATOMIC );read_unlock (&bond->lock); }
drivers/net/cassini.c +1 -1
@@ -3016,7 +3016,7 @@ static u32 cas_setup_multicast(struct ca }else {u16 hash_table[16 ];u32 crc; -struct dev_mc_list *dmi = cp->dev->mc_list; +struct dev_mc_list *dmi = cp->dev->mc.list;int i;/* use the alternate mac address registers for the
drivers/net/chelsio/common.h +2 -2
@@ -97,13 +97,13 @@ struct t1_rx_mode {#define t1_rx_mode_promisc (rm) (rm->dev->flags & IFF_PROMISC)#define t1_rx_mode_allmulti (rm) (rm->dev->flags & IFF_ALLMULTI) -#define t1_rx_mode_mc_cnt (rm) (rm->dev->mc_count) +#define t1_rx_mode_mc_cnt (rm) (rm->dev->mc.count)static inline u8 *t1_get_next_mcaddr (struct t1_rx_mode *rm) {u8 *addr =NULL ; -if (rm->idx++ < rm->dev->mc_count) { +if (rm->idx++ < rm->dev->mc.count) { addr = rm->list->dmi_addr; rm->list = rm->list->next; }
drivers/net/chelsio/cxgb2.c +1 -1
@@ -126,7 +126,7 @@ static void t1_set_rxmode(struct net_dev rm.dev = dev; rm.idx =0 ; - rm.list = dev->mc_list; + rm.list = dev->mc.list; mac->ops->set_rx_mode (mac, &rm); }
drivers/net/cpmac.c +1 -1
@@ -340,7 +340,7 @@ static void cpmac_set_multicast_list(str* cpmac uses some strange mac address hashing * (not crc32) */ -for (i =0 , iter = dev->mc_list; i < dev->mc_count; +for (i =0 , iter = dev->mc.list; i < dev->mc.count; i++, iter = iter->next) { bit =0 ; tmp = iter->dmi_addr[0 ];
drivers/net/cris/eth_v10.c +2 -2
@@ -1550,7 +1550,7 @@ static void set_multicast_list(struct net_device *dev) {struct net_local *lp =netdev_priv (dev); -int num_addr = dev->mc_count; +int num_addr = dev->mc.count;unsigned long int lo_bits;unsigned long int hi_bits;
@@ -1582,7 +1582,7 @@ set_multicast_list(struct net_device *de }else {/* MC mode, receive normal and MC packets */ char hash_ix; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;int i;char *baddr;
drivers/net/cs89x0.c +1 -1
@@ -1788,7 +1788,7 @@ static void set_multicast_list(struct ne { lp->rx_mode =RX_ALL_ACCEPT ; } - else if((dev->flags&IFF_ALLMULTI)||dev->mc_list) + else if((dev->flags&IFF_ALLMULTI)||dev->mc.list) {/* The multicast-accept list is initialized to accept-all, and we rely on higher-level filtering for now. */
drivers/net/cxgb3/common.h +1 -1
@@ -85,7 +85,7 @@ static inline u8 *t3_get_next_mcaddr(str {u8 *addr =NULL ; -if (rm->mclist && rm->idx < rm->dev->mc_count) { +if (rm->mclist && rm->idx < rm->dev->mc.count) { addr = rm->mclist->dmi_addr; rm->mclist = rm->mclist->next; rm->idx++;
drivers/net/cxgb3/cxgb3_main.c +2 -2
@@ -297,7 +297,7 @@ static void cxgb_set_rxmode(struct net_dstruct t3_rx_mode rm;struct port_info *pi =netdev_priv (dev); -init_rx_mode (&rm, dev, dev->mc_list); +init_rx_mode (&rm, dev, dev->mc.list);t3_mac_set_rx_mode (&pi->mac, &rm); }
@@ -313,7 +313,7 @@ static void link_start(struct net_devicestruct port_info *pi =netdev_priv (dev);struct cmac *mac = &pi->mac; -init_rx_mode (&rm, dev, dev->mc_list); +init_rx_mode (&rm, dev, dev->mc.list);t3_mac_reset (mac);t3_mac_set_mtu (mac, dev->mtu);t3_mac_set_address (mac,0 , dev->dev_addr);
drivers/net/de620.c +1 -1
@@ -486,7 +486,7 @@ static int de620_close(struct net_devicestatic void de620_set_multicast_list (struct net_device *dev) { -if (dev->mc_count || dev->flags&(IFF_ALLMULTI |IFF_PROMISC )) +if (dev->mc.count || dev->flags&(IFF_ALLMULTI |IFF_PROMISC )) {/* Enable promiscuous mode */ de620_set_register (dev,W_TCR , (TCR_DEF & ~RXPBM ) |RXALL ); }
drivers/net/declance.c +2 -2
@@ -935,7 +935,7 @@ static void lance_load_multicast(struct {struct lance_private *lp =netdev_priv (dev);volatile u16 *ib = (volatile u16 *)dev->mem_start; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;char *addrs;int i;u32 crc;
@@ -955,7 +955,7 @@ static void lance_load_multicast(struct *lib_ptr (ib, filter[3 ], lp->type) =0 ;/* Add addresses */ -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) { addrs = dmi->dmi_addr; dmi = dmi->next;
drivers/net/defxx.c +3 -3
@@ -2229,7 +2229,7 @@ static void dfx_ctl_set_multicast_list(s* perfect filtering will be used. */ -if (dev->mc_count > (PI_CMD_ADDR_FILTER_K_SIZE - bp->uc_count)) +if (dev->mc.count > (PI_CMD_ADDR_FILTER_K_SIZE - bp->uc_count)) { bp->group_prom =PI_FSTATE_K_PASS ;/* Enable LLC group prom mode */ bp->mc_count =0 ;/* Don't add mc addrs to CAM */
@@ -2237,12 +2237,12 @@ static void dfx_ctl_set_multicast_list(selse { bp->group_prom =PI_FSTATE_K_BLOCK ;/* Disable LLC group prom mode */ - bp->mc_count = dev->mc_count;/* Add mc addrs to CAM */ + bp->mc_count = dev->mc.count;/* Add mc addrs to CAM */ }/* Copy addresses to multicast address table, then update adapter CAM */ - dmi = dev->mc_list;/* point to first multicast addr */ + dmi = dev->mc.list;/* point to first multicast addr */ for (i=0 ; i < bp->mc_count; i++) {memcpy (&bp->mc_table[i*FDDI_K_ALEN ], dmi->dmi_addr,FDDI_K_ALEN );
drivers/net/depca.c +2 -2
@@ -1269,7 +1269,7 @@ static void set_multicast_list(struct nestatic void SetMulticastFilter (struct net_device *dev) {struct depca_private *lp =netdev_priv (dev); -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;char *addrs;int i, j, bit, byte;u16 hashcode;
@@ -1284,7 +1284,7 @@ static void SetMulticastFilter(struct ne lp->init_block.mcast_table[i] =0 ; }/* Add multicast addresses */ -for (i =0 ; i < dev->mc_count; i++) {/* for each address in the list */ +for (i =0 ; i < dev->mc.count; i++) {/* for each address in the list */ addrs = dmi->dmi_addr; dmi = dmi->next;if ((*addrs &0x01 ) ==1 ) {/* multicast address? */
drivers/net/dl2k.c +3 -3
@@ -1133,17 +1133,17 @@ set_multicast (struct net_device *dev)/* Receive all frames promiscuously. */ rx_mode = ReceiveAllFrames; }else if ((dev->flags &IFF_ALLMULTI ) || - (dev->mc_count > multicast_filter_limit)) { + (dev->mc.count > multicast_filter_limit)) {/* Receive broadcast and multicast frames */ rx_mode = ReceiveBroadcast | ReceiveMulticast | ReceiveUnicast; - }else if (dev->mc_count >0 ) { + }else if (dev->mc.count >0 ) {int i;struct dev_mc_list *mclist;/* Receive broadcast frames and multicast frames filtering by Hashtable */ rx_mode = ReceiveBroadcast | ReceiveMulticastHash | ReceiveUnicast; -for (i=0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i=0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist=mclist->next) {int bit, index =0 ;
drivers/net/dm9000.c +2 -2
@@ -627,8 +627,8 @@ static void dm9000_hash_table(struct net_device *dev) {board_info_t *db =netdev_priv (dev); -struct dev_mc_list *mcptr = dev->mc_list; -int mc_cnt = dev->mc_count; +struct dev_mc_list *mcptr = dev->mc.list; +int mc_cnt = dev->mc.count;int i, oft;u32 hash_val;u16 hash_table[4 ];
drivers/net/e100.c +4 -4
@@ -1375,8 +1375,8 @@ static int e100_hw_init(struct nic *nic)static void e100_multi (struct nic *nic,struct cb *cb,struct sk_buff *skb) {struct net_device *netdev = nic->netdev; -struct dev_mc_list *list = netdev->mc_list; -u16 i, count =min (netdev->mc_count,E100_MAX_MULTICAST_ADDRS ); +struct dev_mc_list *list = netdev->mc.list; +u16 i, count =min (netdev->mc.count,E100_MAX_MULTICAST_ADDRS ); cb->command =cpu_to_le16 (cb_multi); cb->u.multi.count =cpu_to_le16 (count *ETH_ALEN );
@@ -1390,7 +1390,7 @@ static void e100_set_multicast_list(strustruct nic *nic =netdev_priv (netdev);DPRINTK (HW ,DEBUG ,"mc_count=%d, flags=0x%04X\n" , - netdev->mc_count, netdev->flags); + netdev->mc.count, netdev->flags);if (netdev->flags &IFF_PROMISC ) nic->flags |= promiscuous;
@@ -1398,7 +1398,7 @@ static void e100_set_multicast_list(stru nic->flags &= ~promiscuous;if (netdev->flags &IFF_ALLMULTI || - netdev->mc_count >E100_MAX_MULTICAST_ADDRS ) + netdev->mc.count >E100_MAX_MULTICAST_ADDRS ) nic->flags |= multicast_all;else nic->flags &= ~multicast_all;
drivers/net/e1000/e1000_main.c +3 -3
@@ -2367,11 +2367,11 @@ static void e1000_set_rx_mode(struct net } uc_ptr =NULL ; -if (netdev->uc_count > rar_entries -1 ) { +if (netdev->uc.count > rar_entries -1 ) { rctl |=E1000_RCTL_UPE ; }else if (!(netdev->flags &IFF_PROMISC )) { rctl &= ~E1000_RCTL_UPE ; - uc_ptr = netdev->uc_list; + uc_ptr = netdev->uc.list; }ew32 (RCTL , rctl);
@@ -2389,7 +2389,7 @@ static void e1000_set_rx_mode(struct net* if there are not 14 addresses, go ahead and clear the filters * -- with 82571 controllers only 0-13 entries are filled here */ - mc_ptr = netdev->mc_list; + mc_ptr = netdev->mc.list;for (i =1 ; i < rar_entries; i++) {if (uc_ptr) {
drivers/net/e1000e/netdev.c +4 -4
@@ -2572,15 +2572,15 @@ static void e1000_set_multi(struct net_dew32 (RCTL , rctl); -if (netdev->mc_count) { - mta_list =kmalloc (netdev->mc_count *6 ,GFP_ATOMIC ); +if (netdev->mc.count) { + mta_list =kmalloc (netdev->mc.count *6 ,GFP_ATOMIC );if (!mta_list)return ;/* prepare a packed array of only addresses. */ - mc_ptr = netdev->mc_list; + mc_ptr = netdev->mc.list; -for (i =0 ; i < netdev->mc_count; i++) { +for (i =0 ; i < netdev->mc.count; i++) {if (!mc_ptr)break ; memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
drivers/net/eepro.c +8 -8
@@ -1285,9 +1285,9 @@ set_multicast_list(struct net_device *destruct eepro_local *lp =netdev_priv (dev);short ioaddr = dev->base_addr;unsigned short mode; -struct dev_mc_list *dmi=dev->mc_list; +struct dev_mc_list *dmi=dev->mc.list; -if (dev->flags&(IFF_ALLMULTI |IFF_PROMISC ) || dev->mc_count >63 ) +if (dev->flags&(IFF_ALLMULTI |IFF_PROMISC ) || dev->mc.count >63 ) {eepro_sw2bank2 (ioaddr);/* be CAREFUL, BANK 2 now */ mode =inb (ioaddr +REG2 );
@@ -1297,7 +1297,7 @@ set_multicast_list(struct net_device *deeepro_sw2bank0 (ioaddr);/* Return to BANK 0 now */ } -else if (dev->mc_count==0 ) +else if (dev->mc.count==0 ) {eepro_sw2bank2 (ioaddr);/* be CAREFUL, BANK 2 now */ mode =inb (ioaddr +REG2 );
@@ -1327,9 +1327,9 @@ set_multicast_list(struct net_device *deoutw (MC_SETUP , ioaddr +IO_PORT );outw (0 , ioaddr +IO_PORT );outw (0 , ioaddr +IO_PORT ); -outw (6 *(dev->mc_count +1 ), ioaddr +IO_PORT ); +outw (6 *(dev->mc.count +1 ), ioaddr +IO_PORT ); -for (i =0 ; i < dev->mc_count; i++) +for (i =0 ; i < dev->mc.count; i++) { eaddrs=(unsigned short *)dmi->dmi_addr; dmi=dmi->next;
@@ -1346,7 +1346,7 @@ set_multicast_list(struct net_device *deoutb (MC_SETUP , ioaddr);/* Update the transmit queue */ - i = lp->tx_end +XMT_HEADER +6 *(dev->mc_count +1 ); + i = lp->tx_end +XMT_HEADER +6 *(dev->mc.count +1 );if (lp->tx_start != lp->tx_end) {
@@ -1378,8 +1378,8 @@ set_multicast_list(struct net_device *debreak ; }else if ((i &0x0f ) ==0x03 ) {/* MC-Done */ printk (KERN_DEBUG "%s: set Rx mode to %d address%s.\n" , - dev->name, dev->mc_count, - dev->mc_count >1 ?"es" :"" ); + dev->name, dev->mc.count, + dev->mc.count >1 ?"es" :"" );break ; } }
drivers/net/eexpress.c +4 -4
@@ -1577,7 +1577,7 @@ static void eexp_setup_filter(struct net {struct dev_mc_list *dmi;unsigned short ioaddr = dev->base_addr; -int count = dev->mc_count; +int count = dev->mc.count;int i;if (count >8 ) { printk(KERN_INFO "%s: too many multicast addresses (%d)\n",
@@ -1587,7 +1587,7 @@ static void eexp_setup_filter(struct netoutw (CONF_NR_MULTICAST & ~31 , ioaddr+SM_PTR );outw (6 *count, ioaddr+SHADOW (CONF_NR_MULTICAST )); -for (i =0 , dmi = dev->mc_list; i < count; i++, dmi = dmi->next) { +for (i =0 , dmi = dev->mc.list; i < count; i++, dmi = dmi->next) {unsigned short *data;if (!dmi) {printk (KERN_INFO "%s: too few multicast addresses\n" , dev->name);
@@ -1626,9 +1626,9 @@ eexp_set_multicast(struct net_device *de }if (!(dev->flags &IFF_PROMISC )) {eexp_setup_filter (dev); -if (lp->old_mc_count != dev->mc_count) { +if (lp->old_mc_count != dev->mc.count) { kick =1 ; - lp->old_mc_count = dev->mc_count; + lp->old_mc_count = dev->mc.count; } }if (kick) {
drivers/net/ehea/ehea_main.c +3 -3
@@ -1977,7 +1977,7 @@ static void ehea_set_multicast_list(stru }ehea_allmulti (dev,0 ); -if (dev->mc_count) { +if (dev->mc.count) { ret =ehea_drop_multicast_list (dev);if (ret) {/* Dropping the current multicast list failed.
@@ -1986,14 +1986,14 @@ static void ehea_set_multicast_list(struehea_allmulti (dev,1 ); } -if (dev->mc_count > port->adapter->max_mc_mac) { +if (dev->mc.count > port->adapter->max_mc_mac) {ehea_info ("Mcast registration limit reached (0x%llx). " "Use ALLMULTI!" , port->adapter->max_mc_mac); goto out; } -for (i =0 , k_mcl_entry = dev->mc_list; i < dev->mc_count; i++, +for (i =0 , k_mcl_entry = dev->mc.list; i < dev->mc.count; i++, k_mcl_entry = k_mcl_entry->next)ehea_add_multicast_entry (port, k_mcl_entry->dmi_addr);
drivers/net/enc28j60.c +1 -1
@@ -1412,7 +1412,7 @@ static void enc28j60_set_multicast_list(if (netif_msg_link (priv))dev_info (&dev->dev,"promiscuous mode\n" ); priv->rxfilter =RXFILTER_PROMISC ; - }else if ((dev->flags &IFF_ALLMULTI ) || dev->mc_count) { + }else if ((dev->flags &IFF_ALLMULTI ) || dev->mc.count) {if (netif_msg_link (priv))dev_info (&dev->dev,"%smulticast mode\n" , (dev->flags &IFF_ALLMULTI ) ?"all-" :"" );
drivers/net/enic/enic_main.c +3 -3
@@ -713,15 +713,15 @@ static int enic_set_mac_addr(struct net_static void enic_set_multicast_list (struct net_device *netdev) {struct enic *enic =netdev_priv (netdev); -struct dev_mc_list *list = netdev->mc_list; +struct dev_mc_list *list = netdev->mc.list;int directed =1 ;int multicast = (netdev->flags &IFF_MULTICAST ) ?1 :0 ;int broadcast = (netdev->flags &IFF_BROADCAST ) ?1 :0 ;int promisc = (netdev->flags &IFF_PROMISC ) ?1 :0 ;int allmulti = (netdev->flags &IFF_ALLMULTI ) || - (netdev->mc_count >ENIC_MULTICAST_PERFECT_FILTERS ); + (netdev->mc.count >ENIC_MULTICAST_PERFECT_FILTERS );u8 mc_addr[ENIC_MULTICAST_PERFECT_FILTERS ][ETH_ALEN ]; -unsigned int mc_count = netdev->mc_count; +unsigned int mc_count = netdev->mc.count;unsigned int i, j;if (mc_count >ENIC_MULTICAST_PERFECT_FILTERS )
drivers/net/epic100.c +3 -3
@@ -1390,20 +1390,20 @@ static void set_rx_mode(struct net_devicoutl (0x002C , ioaddr + RxCtrl);/* Unconditionally log net taps. */ memset (mc_filter,0xff ,sizeof (mc_filter)); - }else if ((dev->mc_count >0 ) || (dev->flags &IFF_ALLMULTI )) { + }else if ((dev->mc.count >0 ) || (dev->flags &IFF_ALLMULTI )) {/* There is apparently a chip bug, so the multicast filter is never enabled. */ /* Too many to filter perfectly -- accept all multicasts. */ memset (mc_filter,0xff ,sizeof (mc_filter));outl (0x000C , ioaddr + RxCtrl); - }else if (dev->mc_count ==0 ) { + }else if (dev->mc.count ==0 ) {outl (0x0004 , ioaddr + RxCtrl);return ; }else {/* Never executed, for now. */ struct dev_mc_list *mclist;memset (mc_filter,0 ,sizeof (mc_filter)); -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {unsigned int bit_nr =ether_crc_le (ETH_ALEN , mclist->dmi_addr) &0x3f ;
drivers/net/eth16i.c +1 -1
@@ -1359,7 +1359,7 @@ static void eth16i_multicast(struct net_ {int ioaddr = dev->base_addr; -if (dev->mc_count || dev->flags&(IFF_ALLMULTI |IFF_PROMISC )) +if (dev->mc.count || dev->flags&(IFF_ALLMULTI |IFF_PROMISC )) {outb (3 , ioaddr +RECEIVE_MODE_REG ); }else {
drivers/net/ethoc.c +1 -1
@@ -772,7 +772,7 @@ static void ethoc_set_multicast_list(str hash[0 ] =0xffffffff ; hash[1 ] =0xffffffff ; }else { -for (mc = dev->mc_list; mc; mc = mc->next) { +for (mc = dev->mc.list; mc; mc = mc->next) {u32 crc =ether_crc (mc->dmi_addrlen, mc->dmi_addr);int bit = (crc >>26 ) &0x3f ; hash[bit >>5 ] |=1 << (bit &0x1f );
drivers/net/ewrk3.c +2 -2
@@ -1168,7 +1168,7 @@ static void set_multicast_list(struct nestatic void SetMulticastFilter (struct net_device *dev) {struct ewrk3_private *lp =netdev_priv (dev); -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;u_long iobase = dev->base_addr;int i;char *addrs, bit, byte;
@@ -1212,7 +1212,7 @@ static void SetMulticastFilter(struct ne }/* Update table */ -for (i =0 ; i < dev->mc_count; i++) {/* for each address in the list */ +for (i =0 ; i < dev->mc.count; i++) {/* for each address in the list */ addrs = dmi->dmi_addr; dmi = dmi->next;if ((*addrs &0x01 ) ==1 ) {/* multicast address? */
drivers/net/fealnx.c +2 -2
@@ -1782,7 +1782,7 @@ static void __set_rx_mode(struct net_devif (dev->flags &IFF_PROMISC ) {/* Set promiscuous. */ memset (mc_filter,0xff ,sizeof (mc_filter)); rx_mode =CR_W_PROM |CR_W_AB |CR_W_AM ; - }else if ((dev->mc_count > multicast_filter_limit) + }else if ((dev->mc.count > multicast_filter_limit) || (dev->flags &IFF_ALLMULTI )) {/* Too many to match, or accept all multicasts. */ memset (mc_filter,0xff ,sizeof (mc_filter));
@@ -1792,7 +1792,7 @@ static void __set_rx_mode(struct net_devint i;memset (mc_filter,0 ,sizeof (mc_filter)); -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {unsigned int bit; bit = (ether_crc (ETH_ALEN , mclist->dmi_addr) >>26 ) ^0x3F ;
drivers/net/fec.c +2 -2
@@ -1610,9 +1610,9 @@ static void set_multicast_list(struct ne ep->fec_grp_hash_table_high =0 ; ep->fec_grp_hash_table_low =0 ; - dmi = dev->mc_list; + dmi = dev->mc.list; -for (j =0 ; j < dev->mc_count; j++, dmi = dmi->next) +for (j =0 ; j < dev->mc.count; j++, dmi = dmi->next) {/* Only support group multicast for now. */
drivers/net/fec_mpc52xx.c +2 -2
@@ -635,8 +635,8 @@ static void mpc52xx_fec_set_multicast_liu32 gaddr1 =0x00000000 ;u32 gaddr2 =0x00000000 ; - dmi = dev->mc_list; -for (i=0 ; i<dev->mc_count; i++) { + dmi = dev->mc.list; +for (i=0 ; i<dev->mc.count; i++) { crc =ether_crc_le (6 , dmi->dmi_addr) >>26 ;if (crc >=32 ) gaddr1 |=1 << (crc-32 );
drivers/net/forcedeth.c +2 -2
@@ -3077,7 +3077,7 @@ static void nv_set_multicast(struct net_ }else { pff |=NVREG_PFF_MYADDR ; -if (dev->flags &IFF_ALLMULTI || dev->mc_list) { +if (dev->flags &IFF_ALLMULTI || dev->mc.list) {u32 alwaysOff[2 ];u32 alwaysOn[2 ];
@@ -3087,7 +3087,7 @@ static void nv_set_multicast(struct net_ }else {struct dev_mc_list *walk; - walk = dev->mc_list; + walk = dev->mc.list;while (walk !=NULL ) {u32 a, b; a =le32_to_cpu (*(__le32 *) walk->dmi_addr);
drivers/net/fs_enet/mac-fcc.c +2 -2
@@ -218,7 +218,7 @@ static void set_multicast_finish(struct/* if all multi or too many multicasts; just enable all */ if ((dev->flags &IFF_ALLMULTI ) !=0 || - dev->mc_count >FCC_MAX_MULTICAST_ADDRS ) { + dev->mc.count >FCC_MAX_MULTICAST_ADDRS ) {W32 (ep, fen_gaddrh,0xffffffff );W32 (ep, fen_gaddrl,0xffffffff );
@@ -235,7 +235,7 @@ static void set_multicast_list(struct neif ((dev->flags &IFF_PROMISC ) ==0 ) {set_multicast_start (dev); -for (pmc = dev->mc_list; pmc !=NULL ; pmc = pmc->next) +for (pmc = dev->mc.list; pmc !=NULL ; pmc = pmc->next)set_multicast_one (dev, pmc->dmi_addr);set_multicast_finish (dev); }else
drivers/net/fs_enet/mac-fec.c +2 -2
@@ -220,7 +220,7 @@ static void set_multicast_finish(struct/* if all multi or too many multicasts; just enable all */ if ((dev->flags &IFF_ALLMULTI ) !=0 || - dev->mc_count >FEC_MAX_MULTICAST_ADDRS ) { + dev->mc.count >FEC_MAX_MULTICAST_ADDRS ) { fep->fec.hthi =0xffffffffU ; fep->fec.htlo =0xffffffffU ; }
@@ -236,7 +236,7 @@ static void set_multicast_list(struct neif ((dev->flags &IFF_PROMISC ) ==0 ) {set_multicast_start (dev); -for (pmc = dev->mc_list; pmc !=NULL ; pmc = pmc->next) +for (pmc = dev->mc.list; pmc !=NULL ; pmc = pmc->next)set_multicast_one (dev, pmc->dmi_addr);set_multicast_finish (dev); }else
drivers/net/fs_enet/mac-scc.c +2 -2
@@ -213,7 +213,7 @@ static void set_multicast_finish(struct/* if all multi or too many multicasts; just enable all */ if ((dev->flags &IFF_ALLMULTI ) !=0 || - dev->mc_count >SCC_MAX_MULTICAST_ADDRS ) { + dev->mc.count >SCC_MAX_MULTICAST_ADDRS ) {W16 (ep, sen_gaddr1,0xffff );W16 (ep, sen_gaddr2,0xffff );
@@ -228,7 +228,7 @@ static void set_multicast_list(struct neif ((dev->flags &IFF_PROMISC ) ==0 ) {set_multicast_start (dev); -for (pmc = dev->mc_list; pmc !=NULL ; pmc = pmc->next) +for (pmc = dev->mc.list; pmc !=NULL ; pmc = pmc->next)set_multicast_one (dev, pmc->dmi_addr);set_multicast_finish (dev); }else
drivers/net/gianfar.c +2 -2
@@ -2196,11 +2196,11 @@ static void gfar_set_multi(struct net_de em_num =0 ; } -if (dev->mc_count ==0 ) +if (dev->mc.count ==0 )return ;/* Parse the list, and set the appropriate bits */ -for (mc_ptr = dev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { +for (mc_ptr = dev->mc.list; mc_ptr; mc_ptr = mc_ptr->next) {if (idx < em_num) {gfar_set_mac_for_addr (dev, idx, mc_ptr->dmi_addr);
drivers/net/hamachi.c +3 -3
@@ -1849,13 +1849,13 @@ static void set_rx_mode(struct net_devicif (dev->flags &IFF_PROMISC ) {/* Set promiscuous. */ writew (0x000F , ioaddr + AddrMode); - }else if ((dev->mc_count >63 ) || (dev->flags &IFF_ALLMULTI )) { + }else if ((dev->mc.count >63 ) || (dev->flags &IFF_ALLMULTI )) {/* Too many to match, or accept all multicasts. */ writew (0x000B , ioaddr + AddrMode); - }else if (dev->mc_count >0 ) {/* Must use the CAM filter. */ + }else if (dev->mc.count >0 ) {/* Must use the CAM filter. */ struct dev_mc_list *mclist;int i; -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {writel (*(u32 *)(mclist->dmi_addr), ioaddr +0x100 + i*8 ); writel(0x20000 | (*(u16*)&mclist->dmi_addr[4]),
drivers/net/hp100.c +3 -3
@@ -2087,7 +2087,7 @@ static void hp100_set_multicast_list(str lp->mac2_mode =HP100_MAC2MODE6 ;/* promiscuous mode = get all good */ lp->mac1_mode =HP100_MAC1MODE6 ;/* packets on the net */ memset (&lp->hash_bytes,0xff ,8 ); - }else if (dev->mc_count || (dev->flags &IFF_ALLMULTI )) { + }else if (dev->mc.count || (dev->flags &IFF_ALLMULTI )) { lp->mac2_mode =HP100_MAC2MODE5 ;/* multicast mode = get packets for */ lp->mac1_mode =HP100_MAC1MODE5 ;/* me, broadcasts and all multicasts */ #ifdef HP100_MULTICAST_FILTER /* doesn't work!!! */
@@ -2101,9 +2101,9 @@ static void hp100_set_multicast_list(strmemset (&lp->hash_bytes,0x00 ,8 );#ifdef HP100_DEBUG -printk ("hp100: %s: computing hash filter - mc_count = %i\n" , dev->name, dev->mc_count); +printk ("hp100: %s: computing hash filter - mc_count = %i\n" , dev->name, dev->mc.count);#endif -for (i =0 , dmi = dev->mc_list; i < dev->mc_count; i++, dmi = dmi->next) { +for (i =0 , dmi = dev->mc.list; i < dev->mc.count; i++, dmi = dmi->next) { addrs = dmi->dmi_addr;if ((*addrs &0x01 ) ==0x01 ) {/* multicast address? */ #ifdef HP100_DEBUG
drivers/net/ibm_newemac/core.c +4 -4
@@ -390,11 +390,11 @@ static void emac_hash_mc(struct emac_insstruct dev_mc_list *dmi;int i; -DBG (dev,"hash_mc %d" NL , dev->ndev->mc_count); +DBG (dev,"hash_mc %d" NL , dev->ndev->mc.count);memset (gaht_temp,0 ,sizeof (gaht_temp)); -for (dmi = dev->ndev->mc_list; dmi; dmi = dmi->next) { +for (dmi = dev->ndev->mc.list; dmi; dmi = dmi->next) {int slot, reg, mask;DBG2 (dev,"mc %pM" NL , dmi->dmi_addr);
@@ -424,9 +424,9 @@ static inline u32 emac_iff2rmr(struct neif (ndev->flags &IFF_PROMISC ) r |=EMAC_RMR_PME ;else if (ndev->flags &IFF_ALLMULTI || - (ndev->mc_count >EMAC_XAHT_SLOTS (dev))) + (ndev->mc.count >EMAC_XAHT_SLOTS (dev))) r |=EMAC_RMR_PMME ; -else if (ndev->mc_count >0 ) +else if (ndev->mc.count >0 ) r |=EMAC_RMR_MAE ;return r;
drivers/net/ibmlana.c +1 -1
@@ -419,7 +419,7 @@ static void InitBoard(struct net_device/* start putting the multicast addresses into the CAM list. Stop if it is full. */ -for (mcptr = dev->mc_list; mcptr !=NULL ; mcptr = mcptr->next) { +for (mcptr = dev->mc.list; mcptr !=NULL ; mcptr = mcptr->next) {putcam (cams, &camcnt, mcptr->dmi_addr);if (camcnt ==16 )break ;
drivers/net/ibmveth.c +3 -3
@@ -1061,7 +1061,7 @@ static void ibmveth_set_multicast_list(sstruct ibmveth_adapter *adapter =netdev_priv (netdev);unsigned long lpar_rc; -if ((netdev->flags &IFF_PROMISC ) || (netdev->mc_count > adapter->mcastFilterSize)) { +if ((netdev->flags &IFF_PROMISC ) || (netdev->mc.count > adapter->mcastFilterSize)) { lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, IbmVethMcastEnableRecv | IbmVethMcastDisableFiltering,
@@ -1070,7 +1070,7 @@ static void ibmveth_set_multicast_list(sibmveth_error_printk ("h_multicast_ctrl rc=%ld when entering promisc mode\n" , lpar_rc); } }else { -struct dev_mc_list *mclist = netdev->mc_list; +struct dev_mc_list *mclist = netdev->mc.list;int i;/* clear the filter table & disable filtering */ lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
@@ -1082,7 +1082,7 @@ static void ibmveth_set_multicast_list(sibmveth_error_printk ("h_multicast_ctrl rc=%ld when attempting to clear filter table\n" , lpar_rc); }/* add the addresses to the filter table */ -for (i =0 ; i < netdev->mc_count; ++i, mclist = mclist->next) { +for (i =0 ; i < netdev->mc.count; ++i, mclist = mclist->next) {// add the multicast address to the filter table unsigned long mcast_addr =0 ;memcpy (((char *)&mcast_addr)+2 , mclist->dmi_addr,6 );
drivers/net/igb/igb_main.c +4 -4
@@ -2523,8 +2523,8 @@ static void igb_set_multi(struct net_dev }wr32 (E1000_RCTL , rctl); -if (netdev->mc_count) { - mta_list =kzalloc (netdev->mc_count *6 ,GFP_ATOMIC ); +if (netdev->mc.count) { + mta_list =kzalloc (netdev->mc.count *6 ,GFP_ATOMIC );if (!mta_list) {dev_err (&adapter->pdev->dev,"failed to allocate multicast filter list\n" );
@@ -2533,9 +2533,9 @@ static void igb_set_multi(struct net_dev }/* The shared function expects a packed array of only addresses. */ - mc_ptr = netdev->mc_list; + mc_ptr = netdev->mc.list; -for (i =0 ; i < netdev->mc_count; i++) { +for (i =0 ; i < netdev->mc.count; i++) {if (!mc_ptr)break ;memcpy (mta_list + (i*ETH_ALEN ), mc_ptr->dmi_addr,ETH_ALEN );
drivers/net/igbvf/netdev.c +4 -4
@@ -1402,8 +1402,8 @@ static void igbvf_set_multi(struct net_du8 *mta_list =NULL ;int i; -if (netdev->mc_count) { - mta_list =kmalloc (netdev->mc_count *6 ,GFP_ATOMIC ); +if (netdev->mc.count) { + mta_list =kmalloc (netdev->mc.count *6 ,GFP_ATOMIC );if (!mta_list) {dev_err (&adapter->pdev->dev,"failed to allocate multicast filter list\n" );
@@ -1412,9 +1412,9 @@ static void igbvf_set_multi(struct net_d }/* prepare a packed array of only addresses. */ - mc_ptr = netdev->mc_list; + mc_ptr = netdev->mc.list; -for (i =0 ; i < netdev->mc_count; i++) { +for (i =0 ; i < netdev->mc.count; i++) {if (!mc_ptr)break ; memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
drivers/net/ioc3-eth.c +3 -3
@@ -1664,7 +1664,7 @@ static int ioc3_ioctl(struct net_devicestatic void ioc3_set_multicast_list (struct net_device *dev) { -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;struct ioc3_private *ip =netdev_priv (dev);struct ioc3 *ioc3 = ip->regs;u64 ehar =0 ;
@@ -1681,14 +1681,14 @@ static void ioc3_set_multicast_list(struioc3_w_emcr (ip->emcr);/* Clear promiscuous. */ (void )ioc3_r_emcr (); -if ((dev->flags &IFF_ALLMULTI ) || (dev->mc_count >64 )) { +if ((dev->flags &IFF_ALLMULTI ) || (dev->mc.count >64 )) {/* Too many for hashing to make sense or we want all multicast packets anyway, so skip computing all the hashes and just accept all packets. */ ip->ehar_h =0xffffffff ; ip->ehar_l =0xffffffff ; }else { -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) {char *addr = dmi->dmi_addr; dmi = dmi->next;
drivers/net/ipg.c +3 -3
@@ -585,11 +585,11 @@ static void ipg_nic_set_multicast_list(s receivemode =IPG_RM_RECEIVEALLFRAMES ; }else if ((dev->flags &IFF_ALLMULTI ) || ((dev->flags &IFF_MULTICAST ) && - (dev->mc_count >IPG_MULTICAST_HASHTABLE_SIZE ))) { + (dev->mc.count >IPG_MULTICAST_HASHTABLE_SIZE ))) {/* NIC to be configured to receive all multicast * frames. */ receivemode |=IPG_RM_RECEIVEMULTICAST ; - }else if ((dev->flags &IFF_MULTICAST ) && (dev->mc_count >0 )) { + }else if ((dev->flags &IFF_MULTICAST ) && (dev->mc.count >0 )) {/* NIC to be configured to receive selected * multicast addresses. */ receivemode |=IPG_RM_RECEIVEMULTICASTHASH ;
@@ -610,7 +610,7 @@ static void ipg_nic_set_multicast_list(s hashtable[1 ] =0x00000000 ;/* Cycle through all multicast addresses to filter. */ -for (mc_list_ptr = dev->mc_list; +for (mc_list_ptr = dev->mc.list; mc_list_ptr !=NULL ; mc_list_ptr = mc_list_ptr->next) {/* Calculate CRC result for each multicast address. */ hashindex = crc32_le(0xffffffff, mc_list_ptr->dmi_addr,
drivers/net/isa-skeleton.c +3 -3
@@ -654,17 +654,17 @@ set_multicast_list(struct net_device *de/* Enable promiscuous mode */ outw (MULTICAST |PROMISC , ioaddr); } -else if ((dev->flags&IFF_ALLMULTI ) || dev->mc_count >HW_MAX_ADDRS ) +else if ((dev->flags&IFF_ALLMULTI ) || dev->mc.count >HW_MAX_ADDRS ) {/* Disable promiscuous mode, use normal mode. */ hardware_set_filter (NULL );outw (MULTICAST , ioaddr); } -else if (dev->mc_count) +else if (dev->mc.count) {/* Walk the address list, and load the filter */ -hardware_set_filter (dev->mc_list); +hardware_set_filter (dev->mc.list);outw (MULTICAST , ioaddr); }
drivers/net/iseries_veth.c +3 -3
@@ -958,10 +958,10 @@ static void veth_set_multicast_list(struwrite_lock_irqsave (&port->mcast_gate, flags);if ((dev->flags &IFF_PROMISC ) || (dev->flags &IFF_ALLMULTI ) || - (dev->mc_count >VETH_MAX_MCAST )) { + (dev->mc.count >VETH_MAX_MCAST )) { port->promiscuous =1 ; }else { -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;int i; port->promiscuous =0 ;
@@ -969,7 +969,7 @@ static void veth_set_multicast_list(stru/* Update table */ port->num_mcast =0 ; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) {u8 *addr = dmi->dmi_addr;u64 xaddr =0 ;
drivers/net/ixgb/ixgb_main.c +4 -4
@@ -1064,7 +1064,7 @@ ixgb_set_multi(struct net_device *netdev rctl |=IXGB_RCTL_VFE ; } -if (netdev->mc_count >IXGB_MAX_NUM_MULTICAST_ADDRESSES ) { +if (netdev->mc.count >IXGB_MAX_NUM_MULTICAST_ADDRESSES ) { rctl |=IXGB_RCTL_MPE ;IXGB_WRITE_REG (hw,RCTL , rctl); }else {
@@ -1073,13 +1073,13 @@ ixgb_set_multi(struct net_device *netdevIXGB_WRITE_REG (hw,RCTL , rctl); -for (i =0 , mc_ptr = netdev->mc_list; +for (i =0 , mc_ptr = netdev->mc.list; mc_ptr; i++, mc_ptr = mc_ptr->next)memcpy (&mta[i *IXGB_ETH_LENGTH_OF_ADDRESS ], mc_ptr->dmi_addr,IXGB_ETH_LENGTH_OF_ADDRESS ); -ixgb_mc_addr_list_update (hw, mta, netdev->mc_count,0 ); +ixgb_mc_addr_list_update (hw, mta, netdev->mc.count,0 ); } }
@@ -1593,7 +1593,7 @@ ixgb_update_stats(struct ixgb_adapter *areturn ;if ((netdev->flags &IFF_PROMISC ) || (netdev->flags &IFF_ALLMULTI ) || - (netdev->mc_count >IXGB_MAX_NUM_MULTICAST_ADDRESSES )) { + (netdev->mc.count >IXGB_MAX_NUM_MULTICAST_ADDRESSES )) {u64 multi =IXGB_READ_REG (&adapter->hw,MPRCL );u32 bcast_l =IXGB_READ_REG (&adapter->hw,BPRCL );u32 bcast_h =IXGB_READ_REG (&adapter->hw,BPRCH );
drivers/net/ixgbe/ixgbe_main.c +4 -4
@@ -2015,16 +2015,16 @@ static void ixgbe_set_rx_mode(struct netIXGBE_WRITE_REG (hw,IXGBE_VLNCTRL , vlnctrl);/* reprogram secondary unicast list */ - addr_count = netdev->uc_count; + addr_count = netdev->uc.count;if (addr_count) - addr_list = netdev->uc_list->dmi_addr; + addr_list = netdev->uc.list->dmi_addr; hw->mac.ops.update_uc_addr_list (hw, addr_list, addr_count, ixgbe_addr_list_itr);/* reprogram multicast list */ - addr_count = netdev->mc_count; + addr_count = netdev->mc.count;if (addr_count) - addr_list = netdev->mc_list->dmi_addr; + addr_list = netdev->mc.list->dmi_addr; hw->mac.ops.update_mc_addr_list (hw, addr_list, addr_count, ixgbe_addr_list_itr); }
drivers/net/jme.c +2 -2
@@ -1995,8 +1995,8 @@ jme_set_multi(struct net_device *netdev)int bit_nr; jme->reg_rxmcs |=RXMCS_MULFRAME |RXMCS_MULFILTERED ; -for (i =0 , mclist = netdev->mc_list; - mclist && i < netdev->mc_count; +for (i =0 , mclist = netdev->mc.list; + mclist && i < netdev->mc.count; ++i, mclist = mclist->next) { bit_nr =ether_crc (ETH_ALEN , mclist->dmi_addr) &0x3F ;
drivers/net/korina.c +4 -4
@@ -484,7 +484,7 @@ static void korina_multicast_list(struct {struct korina_private *lp =netdev_priv (dev);unsigned long flags; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;u32 recognise =ETH_ARC_AB ;/* always accept broadcasts */ int i;
@@ -492,19 +492,19 @@ static void korina_multicast_list(structif (dev->flags &IFF_PROMISC ) recognise |=ETH_ARC_PRO ; -else if ((dev->flags &IFF_ALLMULTI ) || (dev->mc_count >4 )) +else if ((dev->flags &IFF_ALLMULTI ) || (dev->mc.count >4 ))/* All multicast and broadcast */ recognise |=ETH_ARC_AM ;/* Build the hash table */ -if (dev->mc_count >4 ) { +if (dev->mc.count >4 ) {u16 hash_table[4 ];u32 crc;for (i =0 ; i <4 ; i++) hash_table[i] =0 ; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) {char *addrs = dmi->dmi_addr; dmi = dmi->next;
drivers/net/lance.c +1 -1
@@ -1286,7 +1286,7 @@ static void set_multicast_list(struct ne }else {short multicast_table[4 ];int i; -int num_addrs=dev->mc_count; +int num_addrs=dev->mc.count;if (dev->flags&IFF_ALLMULTI ) num_addrs=1 ;/* FIXIT: We don't use the multicast table, but rely on upper-layer filtering. */
drivers/net/lib82596.c +5 -5
@@ -1342,7 +1342,7 @@ static void set_multicast_list(struct neDEB (DEB_MULTI ,printk (KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n" , - dev->name, dev->mc_count, + dev->name, dev->mc.count, dev->flags &IFF_PROMISC ?"ON" :"OFF" , dev->flags &IFF_ALLMULTI ?"ON" :"OFF" ));
@@ -1378,23 +1378,23 @@ static void set_multicast_list(struct ne } } - cnt = dev->mc_count; + cnt = dev->mc.count;if (cnt >MAX_MC_CNT ) { cnt =MAX_MC_CNT ;printk (KERN_NOTICE "%s: Only %d multicast addresses supported" , dev->name, cnt); } -if (dev->mc_count >0 ) { +if (dev->mc.count >0 ) {struct dev_mc_list *dmi;unsigned char *cp;struct mc_cmd *cmd; cmd = &dma->mc_cmd; cmd->cmd.command =SWAP16 (CmdMulticastList); - cmd->mc_cnt =SWAP16 (dev->mc_count *6 ); + cmd->mc_cnt =SWAP16 (dev->mc.count *6 ); cp = cmd->mc_addrs; -for (dmi = dev->mc_list; +for (dmi = dev->mc.list; cnt && dmi !=NULL ; dmi = dmi->next, cnt--, cp +=6 ) {memcpy (cp, dmi->dmi_addr,6 );
drivers/net/lib8390.c +3 -3
@@ -906,7 +906,7 @@ static inline void make_mc_bits(u8 *bits {struct dev_mc_list *dmi; -for (dmi=dev->mc_list; dmi; dmi=dmi->next) +for (dmi=dev->mc.list; dmi; dmi=dmi->next) {u32 crc;if (dmi->dmi_addrlen !=ETH_ALEN )
@@ -940,7 +940,7 @@ static void do_set_multicast_list(structif (!(dev->flags&(IFF_PROMISC |IFF_ALLMULTI ))) {memset (ei_local->mcfilter,0 ,8 ); -if (dev->mc_list) +if (dev->mc.list)make_mc_bits (ei_local->mcfilter, dev); }else
@@ -974,7 +974,7 @@ static void do_set_multicast_list(structif (dev->flags&IFF_PROMISC )ei_outb_p (E8390_RXCONFIG |0x18 , e8390_base +EN0_RXCR ); -else if (dev->flags&IFF_ALLMULTI || dev->mc_list) +else if (dev->flags&IFF_ALLMULTI || dev->mc.list)ei_outb_p (E8390_RXCONFIG |0x08 , e8390_base +EN0_RXCR );else ei_outb_p (E8390_RXCONFIG , e8390_base +EN0_RXCR );
drivers/net/lp486e.c +6 -6
@@ -1253,20 +1253,20 @@ static void set_multicast_list(struct neif (i596_debug >1 )printk ("%s: set multicast list %d\n" , - dev->name, dev->mc_count); + dev->name, dev->mc.count); -if (dev->mc_count >0 ) { +if (dev->mc.count >0 ) {struct dev_mc_list *dmi;char *cp; - cmd =kmalloc (sizeof (struct i596_cmd )+2 +dev->mc_count*6 ,GFP_ATOMIC ); + cmd =kmalloc (sizeof (struct i596_cmd )+2 +dev->mc.count*6 ,GFP_ATOMIC );if (cmd ==NULL ) {printk (KERN_ERR "%s: set_multicast Memory squeeze.\n" , dev->name);return ; } cmd->command = CmdMulticastList; - *((unsigned short *) (cmd +1 )) = dev->mc_count *6 ; + *((unsigned short *) (cmd +1 )) = dev->mc.count *6 ; cp = ((char *)(cmd +1 ))+2 ; -for (dmi = dev->mc_list; dmi !=NULL ; dmi = dmi->next) { +for (dmi = dev->mc.list; dmi !=NULL ; dmi = dmi->next) {memcpy (cp, dmi,6 ); cp +=6 ; }
@@ -1277,7 +1277,7 @@ static void set_multicast_list(struct neif (lp->set_conf.pa_next !=I596_NULL ) {return ; } -if (dev->mc_count ==0 && !(dev->flags & (IFF_PROMISC |IFF_ALLMULTI ))) { +if (dev->mc.count ==0 && !(dev->flags & (IFF_PROMISC |IFF_ALLMULTI ))) { lp->i596_config[8 ] &= ~0x01 ; }else { lp->i596_config[8 ] |=0x01 ;
drivers/net/mac89x0.c +1 -1
@@ -571,7 +571,7 @@ static void set_multicast_list(struct ne { lp->rx_mode =RX_ALL_ACCEPT ; } - else if((dev->flags&IFF_ALLMULTI)||dev->mc_list) + else if((dev->flags&IFF_ALLMULTI)||dev->mc.list) {/* The multicast-accept list is initialized to accept-all, and we rely on higher-level filtering for now. */
drivers/net/macb.c +3 -3
@@ -884,8 +884,8 @@ static void macb_sethashtable(struct net mc_filter[0 ] = mc_filter[1 ] =0 ; - curr = dev->mc_list; -for (i =0 ; i < dev->mc_count; i++, curr = curr->next) { + curr = dev->mc.list; +for (i =0 ; i < dev->mc.count; i++, curr = curr->next) {if (!curr)break ;/* unexpected end of list */ bitnr =hash_get_index (curr->dmi_addr);
@@ -918,7 +918,7 @@ static void macb_set_rx_mode(struct net_macb_writel (bp,HRB ,-1 );macb_writel (bp,HRT ,-1 ); cfg |=MACB_BIT (NCFGR_MTI ); - }else if (dev->mc_count >0 ) { + }else if (dev->mc.count >0 ) {/* Enable specific multicasts */ macb_sethashtable (dev); cfg |=MACB_BIT (NCFGR_MTI );
drivers/net/mace.c +2 -2
@@ -592,7 +592,7 @@ static void mace_set_multicast(struct ne mp->maccc |=PROM ; }else {unsigned char multicast_filter[8 ]; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;if (dev->flags &IFF_ALLMULTI ) {for (i =0 ; i <8 ; i++)
@@ -600,7 +600,7 @@ static void mace_set_multicast(struct ne }else {for (i =0 ; i <8 ; i++) multicast_filter[i] =0 ; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) { crc =ether_crc_le (6 , dmi->dmi_addr); j = crc >>26 ;/* bit number in multicast_filter */ multicast_filter[j >>3 ] |=1 << (j &7 );
drivers/net/macmace.c +2 -2
@@ -503,7 +503,7 @@ static void mace_set_multicast(struct ne mb->maccc |=PROM ; }else {unsigned char multicast_filter[8 ]; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;if (dev->flags &IFF_ALLMULTI ) {for (i =0 ; i <8 ; i++) {
@@ -512,7 +512,7 @@ static void mace_set_multicast(struct ne }else {for (i =0 ; i <8 ; i++) multicast_filter[i] =0 ; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) { crc =ether_crc_le (6 , dmi->dmi_addr); j = crc >>26 ;/* bit number in multicast_filter */ multicast_filter[j >>3 ] |=1 << (j &7 );
drivers/net/mlx4/en_netdev.c +1 -1
@@ -179,7 +179,7 @@ static void mlx4_en_cache_mclist(structstruct dev_mc_list *tmp;struct dev_mc_list *plist =NULL ; -for (mclist = dev->mc_list; mclist; mclist = mclist->next) { +for (mclist = dev->mc.list; mclist; mclist = mclist->next) { tmp =kmalloc (sizeof (struct dev_mc_list ),GFP_ATOMIC );if (!tmp) {mlx4_err (mdev,"failed to allocate multicast list\n" );
drivers/net/mv643xx_eth.c +2 -2
@@ -1730,7 +1730,7 @@ static u32 uc_addr_filter_mask(struct nereturn 0 ; nibbles =1 << (dev->dev_addr[5 ] &0x0f ); -for (uc_ptr = dev->uc_list; uc_ptr !=NULL ; uc_ptr = uc_ptr->next) { +for (uc_ptr = dev->uc.list; uc_ptr !=NULL ; uc_ptr = uc_ptr->next) {if (memcmp (dev->dev_addr, uc_ptr->da_addr,5 ))return 0 ;if ((dev->dev_addr[5 ] ^ uc_ptr->da_addr[5 ]) &0xf0 )
@@ -1830,7 +1830,7 @@ oom:memset (mc_spec,0 ,0x100 );memset (mc_other,0 ,0x100 ); -for (addr = dev->mc_list; addr !=NULL ; addr = addr->next) { +for (addr = dev->mc.list; addr !=NULL ; addr = addr->next) {u8 *a = addr->da_addr;u32 *table;int entry;
drivers/net/myri10ge/myri10ge.c +1 -1
@@ -3024,7 +3024,7 @@ static void myri10ge_set_multicast_list( }/* Walk the multicast list, and add each address */ -for (mc_list = dev->mc_list; mc_list !=NULL ; mc_list = mc_list->next) { +for (mc_list = dev->mc.list; mc_list !=NULL ; mc_list = mc_list->next) {memcpy (data, &mc_list->dmi_addr,6 ); cmd.data0 =ntohl (data[0 ]); cmd.data1 =ntohl (data[1 ]);
drivers/net/natsemi.c +2 -2
@@ -2488,7 +2488,7 @@ static void __set_rx_mode(struct net_devif (dev->flags &IFF_PROMISC ) {/* Set promiscuous. */ rx_mode = RxFilterEnable | AcceptBroadcast | AcceptAllMulticast | AcceptAllPhys | AcceptMyPhys; - }else if ((dev->mc_count > multicast_filter_limit) + }else if ((dev->mc.count > multicast_filter_limit) || (dev->flags &IFF_ALLMULTI )) { rx_mode = RxFilterEnable | AcceptBroadcast | AcceptAllMulticast | AcceptMyPhys;
@@ -2496,7 +2496,7 @@ static void __set_rx_mode(struct net_devstruct dev_mc_list *mclist;int i;memset (mc_filter,0 ,sizeof (mc_filter)); -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {int b = (ether_crc (ETH_ALEN , mclist->dmi_addr) >>23 ) &0x1ff ; mc_filter[b/8 ] |= (1 << (b &0x07 ));
drivers/net/netxen/netxen_nic_hw.c +7 -7
@@ -417,7 +417,7 @@ void netxen_p2_nic_set_multi(struct net_return ; } -if (netdev->mc_count ==0 ) { +if (netdev->mc.count ==0 ) { adapter->set_promisc (adapter,NETXEN_NIU_NON_PROMISC_MODE );netxen_nic_disable_mcast_filter (adapter);
@@ -426,17 +426,17 @@ void netxen_p2_nic_set_multi(struct net_ adapter->set_promisc (adapter,NETXEN_NIU_ALLMULTI_MODE );if (netdev->flags &IFF_ALLMULTI || - netdev->mc_count > adapter->max_mc_count) { + netdev->mc.count > adapter->max_mc_count) {netxen_nic_disable_mcast_filter (adapter);return ; }netxen_nic_enable_mcast_filter (adapter); -for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next, index++) +for (mc_ptr = netdev->mc.list; mc_ptr; mc_ptr = mc_ptr->next, index++)netxen_nic_set_mcast_addr (adapter, index, mc_ptr->dmi_addr); -if (index != netdev->mc_count) +if (index != netdev->mc.count)printk (KERN_WARNING "%s: %s multicast address count mismatch\n" , netxen_nic_driver_name, netdev->name);
@@ -579,13 +579,13 @@ void netxen_p3_nic_set_multi(struct net_ }if ((netdev->flags &IFF_ALLMULTI ) || - (netdev->mc_count > adapter->max_mc_count)) { + (netdev->mc.count > adapter->max_mc_count)) { mode =VPORT_MISS_MODE_ACCEPT_MULTI ; goto send_fw_cmd; } -if (netdev->mc_count >0 ) { -for (mc_ptr = netdev->mc_list; mc_ptr; +if (netdev->mc.count >0 ) { +for (mc_ptr = netdev->mc.list; mc_ptr; mc_ptr = mc_ptr->next) {nx_p3_nic_add_mac (adapter, mc_ptr->dmi_addr, &add_list, &del_list);
drivers/net/ni5010.c +1 -1
@@ -651,7 +651,7 @@ static void ni5010_set_multicast_list(stPRINTK2 ((KERN_DEBUG "%s: entering set_multicast_list\n" , dev->name)); -if (dev->flags&IFF_PROMISC || dev->flags&IFF_ALLMULTI || dev->mc_list) { +if (dev->flags&IFF_PROMISC || dev->flags&IFF_ALLMULTI || dev->mc.list) {outb (RMD_PROMISC ,EDLC_RMODE );/* Enable promiscuous mode */ PRINTK ((KERN_DEBUG "%s: Entering promiscuous mode\n" , dev->name)); }else {
drivers/net/ni52.c +2 -2
@@ -596,8 +596,8 @@ static int init586(struct net_device *destruct iasetup_cmd_struct __iomem *ias_cmd;struct tdr_cmd_struct __iomem *tdr_cmd;struct mcsetup_cmd_struct __iomem *mc_cmd; -struct dev_mc_list *dmi = dev->mc_list; -int num_addrs = dev->mc_count; +struct dev_mc_list *dmi = dev->mc.list; +int num_addrs = dev->mc.count; ptr = p->scb +1 ;
drivers/net/ni65.c +1 -1
@@ -848,7 +848,7 @@ static int ni65_lance_reinit(struct net_if (dev->flags &IFF_PROMISC )ni65_init_lance (p,dev->dev_addr,0x00 ,M_PROM ); -else if (dev->mc_count || dev->flags &IFF_ALLMULTI ) +else if (dev->mc.count || dev->flags &IFF_ALLMULTI )ni65_init_lance (p,dev->dev_addr,0xff ,0x0 );else ni65_init_lance (p,dev->dev_addr,0x00 ,0x00 );
drivers/net/niu.c +5 -5
@@ -6339,10 +6339,10 @@ static void niu_set_rx_mode(struct net_d np->flags &= ~(NIU_FLAGS_MCAST |NIU_FLAGS_PROMISC );if (dev->flags &IFF_PROMISC ) np->flags |=NIU_FLAGS_PROMISC ; -if ((dev->flags &IFF_ALLMULTI ) || (dev->mc_count >0 )) +if ((dev->flags &IFF_ALLMULTI ) || (dev->mc.count >0 )) np->flags |=NIU_FLAGS_MCAST ; - alt_cnt = dev->uc_count; + alt_cnt = dev->uc.count;if (alt_cnt >niu_num_alt_addr (np)) { alt_cnt =0 ; np->flags |=NIU_FLAGS_PROMISC ;
@@ -6351,7 +6351,7 @@ static void niu_set_rx_mode(struct net_dif (alt_cnt) {int index =0 ; -for (addr = dev->uc_list; addr; addr = addr->next) { +for (addr = dev->uc.list; addr; addr = addr->next) { err =niu_set_alt_mac (np, index, addr->da_addr);if (err)
@@ -6383,8 +6383,8 @@ static void niu_set_rx_mode(struct net_dif (dev->flags &IFF_ALLMULTI ) {for (i =0 ; i <16 ; i++) hash[i] =0xffff ; - }else if (dev->mc_count >0 ) { -for (addr = dev->mc_list; addr; addr = addr->next) { + }else if (dev->mc.count >0 ) { +for (addr = dev->mc.list; addr; addr = addr->next) {u32 crc =ether_crc_le (ETH_ALEN , addr->da_addr); crc >>=24 ;
drivers/net/ns83820.c +1 -1
@@ -1719,7 +1719,7 @@ static void ns83820_set_multicast(structelse and_mask &= ~(RFCR_AAU |RFCR_AAM ); -if (ndev->flags &IFF_ALLMULTI || ndev->mc_count) +if (ndev->flags &IFF_ALLMULTI || ndev->mc.count) or_mask |=RFCR_AAM ;else and_mask &= ~RFCR_AAM ;
drivers/net/pci-skeleton.c +2 -2
@@ -1820,7 +1820,7 @@ static void netdrv_set_rx_mode (struct n AcceptBroadcast | AcceptMulticast | AcceptMyPhys | AcceptAllPhys; mc_filter[1 ] = mc_filter[0 ] =0xffffffff ; - }else if ((dev->mc_count > multicast_filter_limit) + }else if ((dev->mc.count > multicast_filter_limit) || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -1829,7 +1829,7 @@ static void netdrv_set_rx_mode (struct nstruct dev_mc_list *mclist; rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; mc_filter[1 ] = mc_filter[0 ] =0 ; -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {int bit_nr =ether_crc (ETH_ALEN , mclist->dmi_addr) >>26 ;
drivers/net/pcmcia/3c574_cs.c +1 -1
@@ -1152,7 +1152,7 @@ static void set_rx_mode(struct net_devicif (dev->flags &IFF_PROMISC )outw (SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm, ioaddr +EL3_CMD ); -else if (dev->mc_count || (dev->flags &IFF_ALLMULTI )) +else if (dev->mc.count || (dev->flags &IFF_ALLMULTI ))outw (SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr +EL3_CMD );else outw (SetRxFilter | RxStation | RxBroadcast, ioaddr +EL3_CMD );
drivers/net/pcmcia/3c589_cs.c +1 -1
@@ -915,7 +915,7 @@ static void set_multicast_list(struct neif (!pcmcia_dev_present (link))return ;if (dev->flags &IFF_PROMISC ) opts |= RxMulticast | RxProm; -else if (dev->mc_count || (dev->flags &IFF_ALLMULTI )) +else if (dev->mc.count || (dev->flags &IFF_ALLMULTI )) opts |= RxMulticast;outw (opts, ioaddr +EL3_CMD ); }
drivers/net/pcmcia/axnet_cs.c +3 -3
@@ -1647,7 +1647,7 @@ static inline void make_mc_bits(u8 *bitsstruct dev_mc_list *dmi;u32 crc; -for (dmi=dev->mc_list; dmi; dmi=dmi->next) { +for (dmi=dev->mc.list; dmi; dmi=dmi->next) { crc =ether_crc (ETH_ALEN , dmi->dmi_addr);/*
@@ -1674,7 +1674,7 @@ static void do_set_multicast_list(structif (!(dev->flags&(IFF_PROMISC |IFF_ALLMULTI ))) {memset (ei_local->mcfilter,0 ,8 ); -if (dev->mc_list) +if (dev->mc.list)make_mc_bits (ei_local->mcfilter, dev); }else {/* set to accept-all */
@@ -1690,7 +1690,7 @@ static void do_set_multicast_list(structif (dev->flags&IFF_PROMISC )outb_p (E8390_RXCONFIG |0x58 , e8390_base +EN0_RXCR ); -else if (dev->flags&IFF_ALLMULTI || dev->mc_list) +else if (dev->flags&IFF_ALLMULTI || dev->mc.list)outb_p (E8390_RXCONFIG |0x48 , e8390_base +EN0_RXCR );else outb_p (E8390_RXCONFIG |0x40 , e8390_base +EN0_RXCR );
drivers/net/pcmcia/fmvj18x_cs.c +3 -3
@@ -1217,19 +1217,19 @@ static void set_rx_mode(struct net_devicif (dev->flags &IFF_PROMISC ) {memset (mc_filter,0xff ,sizeof (mc_filter));outb (3 , ioaddr +RX_MODE );/* Enable promiscuous mode */ - }else if (dev->mc_count >MC_FILTERBREAK + }else if (dev->mc.count >MC_FILTERBREAK || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ memset (mc_filter,0xff ,sizeof (mc_filter));outb (2 , ioaddr +RX_MODE );/* Use normal mode. */ - }else if (dev->mc_count ==0 ) { + }else if (dev->mc.count ==0 ) {memset (mc_filter,0x00 ,sizeof (mc_filter));outb (1 , ioaddr +RX_MODE );/* Ignore almost all multicasts. */ }else {struct dev_mc_list *mclist;memset (mc_filter,0 ,sizeof (mc_filter)); -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {unsigned int bit =ether_crc_le (ETH_ALEN , mclist->dmi_addr) >>26 ;
drivers/net/pcmcia/nmclan_cs.c +8 -8
@@ -1509,13 +1509,13 @@ static void set_multicast_list(struct nemace_private *lp =netdev_priv (dev);int adr[ETHER_ADDR_LEN ] = {0 };/* Ethernet address */ int i; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;#ifdef PCMCIA_DEBUG if (pc_debug >1 ) {static int old; -if (dev->mc_count != old) { - old = dev->mc_count; +if (dev->mc.count != old) { + old = dev->mc.count;DEBUG (0 ,"%s: setting Rx mode to %d addresses.\n" , dev->name, old); }
@@ -1523,13 +1523,13 @@ static void set_multicast_list(struct ne#endif /* Set multicast_num_addrs. */ - lp->multicast_num_addrs = dev->mc_count; + lp->multicast_num_addrs = dev->mc.count;/* Set multicast_ladrf. */ if (num_addrs >0 ) {/* Calculate multicast logical address filter */ memset (lp->multicast_ladrf,0 ,MACE_LADRF_LEN ); -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) {memcpy (adr, dmi->dmi_addr,ETHER_ADDR_LEN ); dmi = dmi->next;BuildLAF (lp->multicast_ladrf, adr);
@@ -1570,15 +1570,15 @@ static void set_multicast_list(struct ne#ifdef PCMCIA_DEBUG if (pc_debug >1 ) {static int old; -if (dev->mc_count != old) { - old = dev->mc_count; +if (dev->mc.count != old) { + old = dev->mc.count;DEBUG (0 ,"%s: setting Rx mode to %d addresses.\n" , dev->name, old); } }#endif - lp->multicast_num_addrs = dev->mc_count; + lp->multicast_num_addrs = dev->mc.count;restore_multicast_list (dev); }/* set_multicast_list */
drivers/net/pcmcia/smc91c92_cs.c +2 -2
@@ -1748,8 +1748,8 @@ static void set_rx_mode(struct net_devic }else if (dev->flags &IFF_ALLMULTI ) rx_cfg_setting = RxStripCRC | RxEnable | RxAllMulti;else { -if (dev->mc_count) { -fill_multicast_tbl (dev->mc_count, dev->mc_list, +if (dev->mc.count) { +fill_multicast_tbl (dev->mc.count, dev->mc.list, (u_char *)multicast_table); } rx_cfg_setting = RxStripCRC | RxEnable;
drivers/net/pcmcia/xirc2ps_cs.c +5 -5
@@ -1427,7 +1427,7 @@ set_addresses(struct net_device *dev) {unsigned int ioaddr = dev->base_addr;local_info_t *lp =netdev_priv (dev); -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;unsigned char *addr;int i,j,k,n;
@@ -1437,7 +1437,7 @@ set_addresses(struct net_device *dev)if (++n >9 )break ; i =0 ; -if (n >1 && n <= dev->mc_count && dmi) { +if (n >1 && n <= dev->mc.count && dmi) { dmi = dmi->next; } }
@@ -1447,7 +1447,7 @@ set_addresses(struct net_device *dev)SelectPage (k); } -if (n && n <= dev->mc_count && dmi) +if (n && n <= dev->mc.count && dmi) addr = dmi->dmi_addr;else addr = dev->dev_addr;
@@ -1477,9 +1477,9 @@ set_multicast_list(struct net_device *deif (dev->flags &IFF_PROMISC ) {/* snoop */ PutByte (XIRCREG42_SWC1 , value |0x06 );/* set MPE and PME */ - }else if (dev->mc_count >9 || (dev->flags &IFF_ALLMULTI )) { + }else if (dev->mc.count >9 || (dev->flags &IFF_ALLMULTI )) {PutByte (XIRCREG42_SWC1 , value |0x02 );/* set MPE */ - }else if (dev->mc_count) { + }else if (dev->mc.count) {/* the chip can filter 9 addresses perfectly */ PutByte (XIRCREG42_SWC1 , value |0x01 );SelectPage (0x40 );
drivers/net/pcnet32.c +2 -2
@@ -2676,7 +2676,7 @@ static void pcnet32_load_multicast(strucstruct pcnet32_private *lp =netdev_priv (dev);volatile struct pcnet32_init_block *ib = lp->init_block;volatile __le16 *mcast_table = (__le16 *)ib->filter; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;unsigned long ioaddr = dev->base_addr;char *addrs;int i;
@@ -2697,7 +2697,7 @@ static void pcnet32_load_multicast(struc ib->filter[1 ] =0 ;/* Add addresses */ -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) { addrs = dmi->dmi_addr; dmi = dmi->next;
drivers/net/ps3_gelic_net.c +2 -2
@@ -549,7 +549,7 @@ void gelic_net_set_multi(struct net_devi status);if ((netdev->flags &IFF_ALLMULTI ) || - (netdev->mc_count >GELIC_NET_MC_COUNT_MAX )) { + (netdev->mc.count >GELIC_NET_MC_COUNT_MAX )) { status =lv1_net_add_multicast_address (bus_id (card),dev_id (card),0 ,1 );
@@ -561,7 +561,7 @@ void gelic_net_set_multi(struct net_devi }/* set multicast addresses */ -for (mc = netdev->mc_list; mc; mc = mc->next) { +for (mc = netdev->mc.list; mc; mc = mc->next) { addr =0 ; p = mc->dmi_addr;for (i =0 ; i <ETH_ALEN ; i++) {
drivers/net/qlge/qlge_main.c +3 -3
@@ -3529,7 +3529,7 @@ static void qlge_set_multicast_list(stru* transition is taking place. */ if ((ndev->flags &IFF_ALLMULTI ) || - (ndev->mc_count >MAX_MULTICAST_ENTRIES )) { + (ndev->mc.count >MAX_MULTICAST_ENTRIES )) {if (!test_bit (QL_ALLMULTI , &qdev->flags)) {if (ql_set_routing_reg (qdev,RT_IDX_ALLMULTI_SLOT ,RT_IDX_MCAST ,1 )) {
@@ -3551,11 +3551,11 @@ static void qlge_set_multicast_list(stru } } -if (ndev->mc_count) { +if (ndev->mc.count) { status =ql_sem_spinlock (qdev,SEM_MAC_ADDR_MASK );if (status) goto exit; -for (i =0 , mc_ptr = ndev->mc_list; mc_ptr; +for (i =0 , mc_ptr = ndev->mc.list; mc_ptr; i++, mc_ptr = mc_ptr->next)if (ql_set_mac_addr_reg (qdev, (u8 *) mc_ptr->dmi_addr,MAC_ADDR_TYPE_MULTI_MAC , i)) {
drivers/net/r6040.c +6 -6
@@ -931,7 +931,7 @@ static void r6040_multicast_list(structu16 *adrp;u16 reg;unsigned long flags; -struct dev_mc_list *dmi = dev->mc_list; +struct dev_mc_list *dmi = dev->mc.list;int i;/* MAC Address */
@@ -951,7 +951,7 @@ static void r6040_multicast_list(struct }/* Too many multicast addresses * accept all traffic */ -else if ((dev->mc_count >MCAST_MAX ) +else if ((dev->mc.count >MCAST_MAX ) || (dev->flags &IFF_ALLMULTI )) reg |=0x0020 ;
@@ -959,14 +959,14 @@ static void r6040_multicast_list(structspin_unlock_irqrestore (&lp->lock, flags);/* Build the hash table */ -if (dev->mc_count >MCAST_MAX ) { +if (dev->mc.count >MCAST_MAX ) {u16 hash_table[4 ];u32 crc;for (i =0 ; i <4 ; i++) hash_table[i] =0 ; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) {char *addrs = dmi->dmi_addr; dmi = dmi->next;
@@ -988,14 +988,14 @@ static void r6040_multicast_list(structiowrite16 (hash_table[3 ], ioaddr +MAR3 ); }/* Multicast Address 1~4 case */ -for (i =0 , dmi; (i < dev->mc_count) && (i <MCAST_MAX ); i++) { +for (i =0 , dmi; (i < dev->mc.count) && (i <MCAST_MAX ); i++) { adrp = (u16 *)dmi->dmi_addr;iowrite16 (adrp[0 ], ioaddr +MID_1L +8 *i);iowrite16 (adrp[1 ], ioaddr +MID_1M +8 *i);iowrite16 (adrp[2 ], ioaddr +MID_1H +8 *i); dmi = dmi->next; } -for (i = dev->mc_count; i <MCAST_MAX ; i++) { +for (i = dev->mc.count; i <MCAST_MAX ; i++) {iowrite16 (0xffff , ioaddr +MID_0L +8 *i);iowrite16 (0xffff , ioaddr +MID_0M +8 *i);iowrite16 (0xffff , ioaddr +MID_0H +8 *i);
drivers/net/r8169.c +2 -2
@@ -3742,7 +3742,7 @@ static void rtl_set_rx_mode(struct net_d AcceptBroadcast | AcceptMulticast | AcceptMyPhys | AcceptAllPhys; mc_filter[1 ] = mc_filter[0 ] =0xffffffff ; - }else if ((dev->mc_count > multicast_filter_limit) + }else if ((dev->mc.count > multicast_filter_limit) || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -3753,7 +3753,7 @@ static void rtl_set_rx_mode(struct net_d rx_mode = AcceptBroadcast | AcceptMyPhys; mc_filter[1 ] = mc_filter[0 ] =0 ; -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {int bit_nr =ether_crc (ETH_ALEN , mclist->dmi_addr) >>26 ; mc_filter[bit_nr >>5 ] |=1 << (bit_nr &31 );
drivers/net/s2io.c +4 -4
@@ -5038,8 +5038,8 @@ static void s2io_set_multicast(struct ne }/* Update individual M_CAST address list */ -if ((!sp->m_cast_flg) && dev->mc_count) { -if (dev->mc_count > +if ((!sp->m_cast_flg) && dev->mc.count) { +if (dev->mc.count > (config->max_mc_addr - config->max_mac_addr)) {DBG_PRINT (ERR_DBG ,"%s: No more Rx filters " , dev->name);
@@ -5049,7 +5049,7 @@ static void s2io_set_multicast(struct ne } prev_cnt = sp->mc_addr_count; - sp->mc_addr_count = dev->mc_count; + sp->mc_addr_count = dev->mc.count;/* Clear out the previous list of Mc in the H/W. */ for (i =0 ; i < prev_cnt; i++) {
@@ -5075,7 +5075,7 @@ static void s2io_set_multicast(struct ne }/* Create the new Rx filter list and update the same in H/W. */ -for (i =0 , mclist = dev->mc_list; i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; i < dev->mc.count; i++, mclist = mclist->next) {memcpy (sp->usr_addrs[i].addr, mclist->dmi_addr,ETH_ALEN );
drivers/net/sb1250-mac.c +1 -1
@@ -2162,7 +2162,7 @@ static void sbmac_setmulti(struct sbmac_* XXX if the table overflows */ idx =1 ;/* skip station address */ - mclist = dev->mc_list; + mclist = dev->mc.list;while (mclist && (idx <MAC_ADDR_COUNT )) { reg =sbmac_addr2reg (mclist->dmi_addr); port = sc->sbm_base +R_MAC_ADDR_BASE +(idx *sizeof (uint64_t ));
drivers/net/sc92031.c +2 -2
@@ -429,13 +429,13 @@ static void _sc92031_set_mar(struct net_u32 mar0 =0 , mar1 =0 ;if ((dev->flags &IFF_PROMISC ) - || dev->mc_count > multicast_filter_limit + || dev->mc.count > multicast_filter_limit || (dev->flags &IFF_ALLMULTI )) mar0 = mar1 =0xffffffff ;else if (dev->flags &IFF_MULTICAST ) {struct dev_mc_list *mc_list; -for (mc_list = dev->mc_list; mc_list; mc_list = mc_list->next) { +for (mc_list = dev->mc.list; mc_list; mc_list = mc_list->next) {u32 crc;unsigned bit =0 ;
drivers/net/sfc/efx.c +2 -2
@@ -1526,7 +1526,7 @@ static int efx_set_mac_address(struct nestatic void efx_set_multicast_list (struct net_device *net_dev) {struct efx_nic *efx =netdev_priv (net_dev); -struct dev_mc_list *mc_list = net_dev->mc_list; +struct dev_mc_list *mc_list = net_dev->mc.list;union efx_multicast_hash *mc_hash = &efx->multicast_hash;bool promiscuous = !!(net_dev->flags &IFF_PROMISC );bool changed = (efx->promiscuous != promiscuous);
@@ -1541,7 +1541,7 @@ static void efx_set_multicast_list(strucmemset (mc_hash,0xff ,sizeof (*mc_hash)); }else {memset (mc_hash,0x00 ,sizeof (*mc_hash)); -for (i =0 ; i < net_dev->mc_count; i++) { +for (i =0 ; i < net_dev->mc.count; i++) { crc =ether_crc_le (ETH_ALEN , mc_list->dmi_addr); bit = crc & (EFX_MCAST_HASH_ENTRIES -1 );set_bit_le (bit, mc_hash->byte);
drivers/net/sgiseeq.c +1 -1
@@ -661,7 +661,7 @@ static void sgiseeq_set_multicast(structif (dev->flags &IFF_PROMISC ) sp->mode =SEEQ_RCMD_RANY ; -else if ((dev->flags &IFF_ALLMULTI ) || dev->mc_count) +else if ((dev->flags &IFF_ALLMULTI ) || dev->mc.count) sp->mode =SEEQ_RCMD_RBMCAST ;else sp->mode =SEEQ_RCMD_RBCAST ;
drivers/net/sis190.c +2 -2
@@ -841,7 +841,7 @@ static void sis190_set_rx_mode(struct ne AcceptBroadcast | AcceptMulticast | AcceptMyPhys | AcceptAllPhys; mc_filter[1 ] = mc_filter[0 ] =0xffffffff ; - }else if ((dev->mc_count > multicast_filter_limit) || + }else if ((dev->mc.count > multicast_filter_limit) || (dev->flags &IFF_ALLMULTI )) {/* Too many to filter perfectly -- accept all multicasts. */ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -852,7 +852,7 @@ static void sis190_set_rx_mode(struct ne rx_mode = AcceptBroadcast | AcceptMyPhys; mc_filter[1 ] = mc_filter[0 ] =0 ; -for (i =0 , mclist = dev->mc_list; mclist && i < dev->mc_count; +for (i =0 , mclist = dev->mc.list; mclist && i < dev->mc.count; i++, mclist = mclist->next) {int bit_nr =ether_crc (ETH_ALEN , mclist->dmi_addr) &0x3f ;
drivers/net/sis900.c +3 -3
@@ -2288,7 +2288,7 @@ static void set_rx_mode(struct net_devic rx_mode = RFPromiscuous;for (i =0 ; i < table_entries; i++) mc_filter[i] =0xffff ; - }else if ((net_dev->mc_count > multicast_filter_limit) || + }else if ((net_dev->mc.count > multicast_filter_limit) || (net_dev->flags &IFF_ALLMULTI )) {/* too many multicast addresses or accept all multicast packet */ rx_mode =RFAAB |RFAAM ;
@@ -2300,8 +2300,8 @@ static void set_rx_mode(struct net_devic* packets */ struct dev_mc_list *mclist; rx_mode =RFAAB ; -for (i =0 , mclist = net_dev->mc_list; - mclist && i < net_dev->mc_count; +for (i =0 , mclist = net_dev->mc.list; + mclist && i < net_dev->mc.count; i++, mclist = mclist->next) {unsigned int bit_nr =sis900_mcast_bitnr (mclist->dmi_addr, sis_priv->chipset_rev);
drivers/net/skfp/skfddi.c +4 -4
@@ -882,14 +882,14 @@ static void skfp_ctl_set_multicast_list_if (dev->flags &IFF_ALLMULTI ) {mac_drv_rx_mode (smc,RX_ENABLE_ALLMULTI );PRINTK (KERN_INFO "ENABLE ALL MC ADDRESSES\n" ); - }else if (dev->mc_count >0 ) { -if (dev->mc_count <=FPMAX_MULTICAST ) { + }else if (dev->mc.count >0 ) { +if (dev->mc.count <=FPMAX_MULTICAST ) {/* use exact filtering */ // point to first multicast addr - dmi = dev->mc_list; + dmi = dev->mc.list; -for (i =0 ; i < dev->mc_count; i++) { +for (i =0 ; i < dev->mc.count; i++) {mac_add_multicast (smc, (struct fddi_addr *)dmi->dmi_addr,1 );
drivers/net/skge.c +5 -5
@@ -2934,8 +2934,8 @@ static void genesis_set_multicast(structstruct skge_port *skge =netdev_priv (dev);struct skge_hw *hw = skge->hw;int port = skge->port; -int i, count = dev->mc_count; -struct dev_mc_list *list = dev->mc_list; +int i, count = dev->mc.count; +struct dev_mc_list *list = dev->mc.list;u32 mode;u8 filter[8 ];
@@ -2974,7 +2974,7 @@ static void yukon_set_multicast(struct nstruct skge_port *skge =netdev_priv (dev);struct skge_hw *hw = skge->hw;int port = skge->port; -struct dev_mc_list *list = dev->mc_list; +struct dev_mc_list *list = dev->mc.list;int rx_pause = (skge->flow_status ==FLOW_STAT_REM_SEND || skge->flow_status ==FLOW_STAT_SYMMETRIC );u16 reg;
@@ -2989,7 +2989,7 @@ static void yukon_set_multicast(struct n reg &= ~(GM_RXCR_UCF_ENA |GM_RXCR_MCF_ENA ); else if (dev->flags & IFF_ALLMULTI) /* all multicast */ memset(filter, 0xff, sizeof(filter)); - else if (dev->mc_count == 0 && !rx_pause)/* no multicast */ + else if (dev->mc.count == 0 && !rx_pause)/* no multicast */ reg &= ~GM_RXCR_MCF_ENA; else {int i;
@@ -2998,7 +2998,7 @@ static void yukon_set_multicast(struct nif (rx_pause)yukon_add_filter (filter, pause_mc_addr); -for (i =0 ; list && i < dev->mc_count; i++, list = list->next) +for (i =0 ; list && i < dev->mc.count; i++, list = list->next)yukon_add_filter (filter, list->dmi_addr); }
drivers/net/sky2.c +3 -3
@@ -3380,7 +3380,7 @@ static void sky2_set_multicast(struct nestruct sky2_port *sky2 =netdev_priv (dev);struct sky2_hw *hw = sky2->hw;unsigned port = sky2->port; -struct dev_mc_list *list = dev->mc_list; +struct dev_mc_list *list = dev->mc.list;u16 reg;u8 filter[8 ];int rx_pause;
@@ -3396,7 +3396,7 @@ static void sky2_set_multicast(struct ne reg &= ~(GM_RXCR_UCF_ENA |GM_RXCR_MCF_ENA ); else if (dev->flags & IFF_ALLMULTI) memset(filter, 0xff, sizeof(filter)); - else if (dev->mc_count == 0 && !rx_pause) + else if (dev->mc.count == 0 && !rx_pause) reg &= ~GM_RXCR_MCF_ENA; else {int i;
@@ -3405,7 +3405,7 @@ static void sky2_set_multicast(struct neif (rx_pause)sky2_add_filter (filter, pause_mc_addr); -for (i =0 ; list && i < dev->mc_count; i++, list = list->next) +for (i =0 ; list && i < dev->mc.count; i++, list = list->next)sky2_add_filter (filter, list->dmi_addr); }
drivers/net/smc911x.c +4 -4
@@ -1323,7 +1323,7 @@ static void smc911x_set_multicast_list(s* I don't need to zero the multicast table, because the flag is * checked before the table is */ - else if (dev->flags & IFF_ALLMULTI || dev->mc_count > 16) { + else if (dev->flags & IFF_ALLMULTI || dev->mc.count > 16) {DBG (SMC_DEBUG_MISC ,"%s: RCR_ALMUL\n" , dev->name); mcr |=MAC_CR_MCPAS_ ; }
@@ -1340,7 +1340,7 @@ static void smc911x_set_multicast_list(s* the number of the 32 bit register, while the low 5 bits are the bit * within that register. */ - else if (dev->mc_count) { + else if (dev->mc.count) {int i;struct dev_mc_list *cur_addr;
@@ -1350,8 +1350,8 @@ static void smc911x_set_multicast_list(s/* start with a table of all zeros: reject all */ memset (multicast_table,0 ,sizeof (multicast_table)); - cur_addr = dev->mc_list; -for (i =0 ; i < dev->mc_count; i++, cur_addr = cur_addr->next) { + cur_addr = dev->mc.list; +for (i =0 ; i < dev->mc.count; i++, cur_addr = cur_addr->next) {u32 position;/* do we have a pointer here? */
drivers/net/smc9194.c +2 -2
@@ -1540,7 +1540,7 @@ static void smc_set_multicast_list(struc/* We just get all multicast packets even if we only want them . from one source. This will be changed at some future . point. */ - else if (dev->mc_count ) { + else if (dev->mc.count) {/* support hardware multicasting */ /* be sure I get rid of flags I might have set */
@@ -1548,7 +1548,7 @@ static void smc_set_multicast_list(struc ioaddr + RCR );/* NOTE: this has to set the bank, so make sure it is the last thing called. The bank is set to zero at the top */ -smc_setmulticast ( ioaddr, dev->mc_count, dev->mc_list );
Lines of this file are not shown. View the raw message.
drivers/net/smc91x.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/smsc911x.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/smsc9420.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/sonic.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/spider_net.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/starfire.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/sun3_82586.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/sun3lance.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/sunbmac.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/sundance.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/sungem.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/sunhme.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/net/sunlance.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/sunqe.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/sunvnet.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/tc35815.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/tehuti.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/tg3.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/tlan.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/tokenring/3c359.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/tokenring/ibmtr.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/tokenring/lanstreamer.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/tokenring/olympic.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/tokenring/tms380tr.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/tsi108_eth.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/tulip/de2104x.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/tulip/de4x5.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/tulip/dmfe.c +9 -9
Lines of this file are not shown. View the raw message.
drivers/net/tulip/tulip_core.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/net/tulip/uli526x.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/net/tulip/winbond-840.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/typhoon.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/ucc_geth.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/usb/asix.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/net/usb/catc.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/usb/dm9601.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/usb/kaweth.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/usb/mcs7830.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/usb/pegasus.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/usb/rtl8150.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/usb/smsc95xx.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/via-rhine.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/via-velocity.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/virtio_net.c +10 -10
Lines of this file are not shown. View the raw message.
drivers/net/vxge/vxge-main.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/airo.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/arlan-main.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/libertas/main.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/netwave_cs.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/wireless/orinoco/main.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ray_cs.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/rndis_wlan.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/wireless/wavelan.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/net/wireless/wavelan_cs.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/net/wireless/zd1201.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/yellowfin.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/znet.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/s390/net/qeth_l2_main.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/et131x/et131x_netdev.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/staging/slicoss/slicoss.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/sxg/sxg.c +2 -2
Lines of this file are not shown. View the raw message.
arch/xtensa/platforms/iss/network.c +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Johannes Berg
maintainerQuoted 10 lines · Johannes Berg
I'm trying to use address lists without netdevs, but as a first step I thought it would be good to reduce the amount duplicated code between unicast and multicast lists.
After introducing a new 'struct
address_list', we can unify a lot between these. The next step will probably be exporting the__dev_addr_syncand__dev_addr_unsyncfunctions so I can use them without a netdev, but this cleanup can stand on its own.
Sorry, this was based against the wrong tree and now I see that in net-next the lists have diverged significantly. Ignore this.
johannes
Quoted 6 lines · Sat, Jun 13, 2009 at 02:28:14PM CEST, [email protected] wrote:
Quoted 5 lines · Johannes Berg
I'm trying to use address lists without netdevs, but as a first step I thought it would be good to reduce the amount duplicated code between unicast and multicast lists.
Quoted 8 lines
Quoted 5 lines
After introducing a new 'struct
address_list', we can unify a lot between these. The next step will probably be exporting the__dev_addr_syncand__dev_addr_unsyncfunctions so I can use them without a netdev, but this cleanup can stand on its own.Sorry, this was based against the wrong tree and now I see that in net-next the lists have diverged significantly. Ignore this.
Yes, I've already converted unicast lists to use list_head there. I'm sending the patch doing the same for multicast lists soon.
Jirka
Quoted 2 lines
johannes
Johannes Berg
maintainerQuoted 13 lines · Jiri Pirko
Quoted 12 lines · Sat, Jun 13, 2009 at 02:28:14PM CEST, [email protected] wrote:
Quoted 10 lines · Johannes Berg
I'm trying to use address lists without netdevs, but as a first step I thought it would be good to reduce the amount duplicated code between unicast and multicast lists.
After introducing a new 'struct
address_list', we can unify a lot between these. The next step will probably be exporting the__dev_addr_syncand__dev_addr_unsyncfunctions so I can use them without a netdev, but this cleanup can stand on its own.
Quoted 5 lines
Quoted 2 lines
Sorry, this was based against the wrong tree and now I see that in net-next the lists have diverged significantly. Ignore this.
Yes, I've already converted unicast lists to use
list_headthere. I'm sending the patch doing the same for multicast lists soon.
Very nice! After that maybe I'll take a look again at moving things into a common structure -- I ultimately want to use a multicast list without a netdev to sync multiple netdevs onto a common multicast list that is not part of a netdev.
johannes
Quoted 17 lines · Tue, Jun 16, 2009 at 01:29:31PM CEST, [email protected] wrote:
Quoted 16 lines · Jiri Pirko
Quoted 14 lines · Sat, Jun 13, 2009 at 02:28:14PM CEST, [email protected] wrote:
Quoted 10 lines · Johannes Berg
I'm trying to use address lists without netdevs, but as a first step I thought it would be good to reduce the amount duplicated code between unicast and multicast lists.
After introducing a new 'struct
address_list', we can unify a lot between these. The next step will probably be exporting the__dev_addr_syncand__dev_addr_unsyncfunctions so I can use them without a netdev, but this cleanup can stand on its own.Sorry, this was based against the wrong tree and now I see that in net-next the lists have diverged significantly. Ignore this.
Quoted 7 lines
Quoted 2 lines
Yes, I've already converted unicast lists to use
list_headthere. I'm sending the patch doing the same for multicast lists soon.Very nice! After that maybe I'll take a look again at moving things into a common structure -- I ultimately want to use a multicast list without a netdev to sync multiple netdevs onto a common multicast list that is not part of a netdev.
I see, hmm, I think I can do this change with my conversion... I was thinking about similar thing as you suggest before...
Jirka
Quoted 2 lines
johannes
A message that is not in the archive (sent off-list or not yet received): 20090616123808.GK3521-YzwxZg+R7evSU73v1vjTzyO4YDw3rz4rAInAS/Ez/[email protected]
Quoted 10 lines · Jiri Pirko
Quoted 7 lines
Quoted 2 lines
Yes, I've already converted unicast lists to use
list_headthere. I'm sending the patch doing the same for multicast lists soon.Very nice! After that maybe I'll take a look again at moving things into a common structure -- I ultimately want to use a multicast list without a netdev to sync multiple netdevs onto a common multicast list that is not part of a netdev.
I see, hmm, I think I can do this change with my conversion... I was thinking about similar thing as you suggest before...
I don't think the patch for converting the multicast lists will hit .31, I take it?
I'd like to get this patch into the .32 tree once it opens
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-net-core-mc-sync-list.patch
but I don't know how to handle that wrt. your patch, which will clearly conflict with mein. Will you be sending that soon?
I guess we could stick this one into wireless-testing, and then take it out again once your patch hits the tree and offers me similar API for list_head based multicast lists?
johannes
A message that is not in the archive (sent off-list or not yet received): 1245193788.21287.66.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org
Quoted 2 lines · Johannes Berg
I'd like to get this patch into the .32 tree once it opens
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-net-core-mc-sync-list.patch
+/**
+ * mc_unsync_from_dev - Remove synchronized addresses from the destination list
+ * @to: destination list
+ * @to_count: destination list count
+ * @from: source device
+ *
+ * Remove all addresses that were added to the destination list by
+ * mc_sync_from_dev(). This function is intended to be called from
+ * the * dev->stop function of layered software devices. The
+ * destination list must be locked in whatever way the caller
+ * manages it.
+ */
+void mc_unsync_from_dev(struct dev_addr_list **to, int *to_count,
+ struct net_device *from)
+{
+ netif_addr_lock_bh(from);
+ __dev_addr_unsync(to, to_count,
+ &from->mc_list, &from->mc_count);
+ netif_addr_unlock_bh(from);
+}
+EXPORT_SYMBOL(mc_unsync_from_dev);
That can't work, of course, because the "to" list needs to be locked _after_ "from" is locked, due mc_sync_from_dev() begin used in ndo_set_multicast_list(). I guess I have to push out all the locking, by just exporting __dev_addr_sync/__dev_addr_unsync.
Objections? Better ideas?
johannes
Quoted 10 lines · Wed, Jun 17, 2009 at 01:09:48AM CEST, [email protected]…
Quoted 8 lines · Jiri Pirko
Quoted 7 lines
Quoted 2 lines
Yes, I've already converted unicast lists to use
list_headthere. I'm sending the patch doing the same for multicast lists soon.Very nice! After that maybe I'll take a look again at moving things into a common structure -- I ultimately want to use a multicast list without a netdev to sync multiple netdevs onto a common multicast list that is not part of a netdev.
Quoted 5 lines
Quoted 2 lines
I see, hmm, I think I can do this change with my conversion... I was thinking about similar thing as you suggest before...
I don't think the patch for converting the multicast lists will hit .31, I take it?
I'm preparing the patch right now. It's most likely it will hit .32.
Quoted 6 lines
I'd like to get this patch into the .32 tree once it opens
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-net-core-mc-sync-list.patchbut I don't know how to handle that wrt. your patch, which will clearly conflict with mein. Will you be sending that soon?
I see your need. I'll think about it and try to prepare the lists for this use.
Quoted 4 lines
I guess we could stick this one into wireless-testing, and then take it out again once your patch hits the tree and offers me similar API for
list_headbased multicast lists?
Or wait, I hope the patch will be ready in week tops.
Jirka
Quoted 2 lines
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20090617072100.GA3492-YzwxZg+R7evSU73v1vjTzyO4YDw3rz4rAInAS/Ez/[email protected]
Quoted 5 lines · Jiri Pirko
Quoted 3 lines
I guess we could stick this one into wireless-testing, and then take it out again once your patch hits the tree and offers me similar API for
list_headbased multicast lists?Or wait, I hope the patch will be ready in week tops.
Yeah, that's fine, I'll ask people to throw in the simple export patch for testing. Thanks for considering! Please disregard my work on mac80211, I'll rebase over your work.
johannes
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Johannes Berg
Quoted 5 lines · Jiri Pirko
Quoted 3 lines
I guess we could stick this one into wireless-testing, and then take it out again once your patch hits the tree and offers me similar API for
list_headbased multicast lists?Or wait, I hope the patch will be ready in week tops.
Yeah, that's fine, I'll ask people to throw in the simple export patch for testing. Thanks for considering! Please disregard my work on mac80211, I'll rebase over your work.
If you need Jiri's patch in wireless-testing I can make arrangements to cherry-pick it.
John
Signature · 6 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Johannes Berg
maintainerQuoted 7 lines · John W. Linville
Quoted 6 lines · Johannes Berg
Quoted 4 lines · Jiri Pirko
Quoted 3 lines
I guess we could stick this one into wireless-testing, and then take it out again once your patch hits the tree and offers me similar API for
list_headbased multicast lists?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Or wait, I hope the patch will be ready in week tops.
Yeah, that's fine, I'll ask people to throw in the simple export patch for testing. Thanks for considering! Please disregard my work on mac80211, I'll rebase over your work.
If you need Jiri's patch in wireless-testing I can make arrangements to cherry-pick it.
Not the one he just sent, that one's concerned with unicast address lists. We'll see. The mdev removal still had a bunch of issues anyway.
johannes