aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-04-01 17:22:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-03 17:22:15 -0400
commit22bedad3ce112d5ca1eaf043d4990fa2ed698c87 (patch)
treeb6fba5688d48b1396f01d13ee53610dea7749c15 /drivers/net/tokenring
parenta748ee2426817a95b1f03012d8f339c45c722ae1 (diff)
net: convert multicast list to list_head
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r--drivers/net/tokenring/3c359.c12
-rw-r--r--drivers/net/tokenring/ibmtr.c12
-rw-r--r--drivers/net/tokenring/lanstreamer.c12
-rw-r--r--drivers/net/tokenring/olympic.c12
-rw-r--r--drivers/net/tokenring/tms380tr.c12
5 files changed, 30 insertions, 30 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 8c54d89e60d7..4673e38c52a9 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -1390,7 +1390,7 @@ static int xl_close(struct net_device *dev)
1390static void xl_set_rx_mode(struct net_device *dev) 1390static void xl_set_rx_mode(struct net_device *dev)
1391{ 1391{
1392 struct xl_private *xl_priv = netdev_priv(dev); 1392 struct xl_private *xl_priv = netdev_priv(dev);
1393 struct dev_mc_list *dmi; 1393 struct netdev_hw_addr *ha;
1394 unsigned char dev_mc_address[4] ; 1394 unsigned char dev_mc_address[4] ;
1395 u16 options ; 1395 u16 options ;
1396 1396
@@ -1407,11 +1407,11 @@ static void xl_set_rx_mode(struct net_device *dev)
1407 1407
1408 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; 1408 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ;
1409 1409
1410 netdev_for_each_mc_addr(dmi, dev) { 1410 netdev_for_each_mc_addr(ha, dev) {
1411 dev_mc_address[0] |= dmi->dmi_addr[2] ; 1411 dev_mc_address[0] |= ha->addr[2];
1412 dev_mc_address[1] |= dmi->dmi_addr[3] ; 1412 dev_mc_address[1] |= ha->addr[3];
1413 dev_mc_address[2] |= dmi->dmi_addr[4] ; 1413 dev_mc_address[2] |= ha->addr[4];
1414 dev_mc_address[3] |= dmi->dmi_addr[5] ; 1414 dev_mc_address[3] |= ha->addr[5];
1415 } 1415 }
1416 1416
1417 if (memcmp(xl_priv->xl_functional_addr,dev_mc_address,4) != 0) { /* Options have changed, run the command */ 1417 if (memcmp(xl_priv->xl_functional_addr,dev_mc_address,4) != 0) { /* Options have changed, run the command */
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index 1a0967246e2f..eebdaae24328 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -986,7 +986,7 @@ static void open_sap(unsigned char type, struct net_device *dev)
986static void tok_set_multicast_list(struct net_device *dev) 986static void tok_set_multicast_list(struct net_device *dev)
987{ 987{
988 struct tok_info *ti = netdev_priv(dev); 988 struct tok_info *ti = netdev_priv(dev);
989 struct dev_mc_list *mclist; 989 struct netdev_hw_addr *ha;
990 unsigned char address[4]; 990 unsigned char address[4];
991 991
992 int i; 992 int i;
@@ -995,11 +995,11 @@ static void tok_set_multicast_list(struct net_device *dev)
995 /*BMS ifconfig tr down or hot unplug a PCMCIA card ??hownowbrowncow*/ 995 /*BMS ifconfig tr down or hot unplug a PCMCIA card ??hownowbrowncow*/
996 if (/*BMSHELPdev->start == 0 ||*/ ti->open_status != OPEN) return; 996 if (/*BMSHELPdev->start == 0 ||*/ ti->open_status != OPEN) return;
997 address[0] = address[1] = address[2] = address[3] = 0; 997 address[0] = address[1] = address[2] = address[3] = 0;
998 netdev_for_each_mc_addr(mclist, dev) { 998 netdev_for_each_mc_addr(ha, dev) {
999 address[0] |= mclist->dmi_addr[2]; 999 address[0] |= ha->addr[2];
1000 address[1] |= mclist->dmi_addr[3]; 1000 address[1] |= ha->addr[3];
1001 address[2] |= mclist->dmi_addr[4]; 1001 address[2] |= ha->addr[4];
1002 address[3] |= mclist->dmi_addr[5]; 1002 address[3] |= ha->addr[5];
1003 } 1003 }
1004 SET_PAGE(ti->srb_page); 1004 SET_PAGE(ti->srb_page);
1005 for (i = 0; i < sizeof(struct srb_set_funct_addr); i++) 1005 for (i = 0; i < sizeof(struct srb_set_funct_addr); i++)
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index 01c780f25e98..88c893100c2b 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -1266,7 +1266,7 @@ static void streamer_set_rx_mode(struct net_device *dev)
1266 netdev_priv(dev); 1266 netdev_priv(dev);
1267 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1267 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1268 __u8 options = 0; 1268 __u8 options = 0;
1269 struct dev_mc_list *dmi; 1269 struct netdev_hw_addr *ha;
1270 unsigned char dev_mc_address[5]; 1270 unsigned char dev_mc_address[5];
1271 1271
1272 writel(streamer_priv->srb, streamer_mmio + LAPA); 1272 writel(streamer_priv->srb, streamer_mmio + LAPA);
@@ -1302,11 +1302,11 @@ static void streamer_set_rx_mode(struct net_device *dev)
1302 writel(streamer_priv->srb,streamer_mmio+LAPA); 1302 writel(streamer_priv->srb,streamer_mmio+LAPA);
1303 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; 1303 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ;
1304 1304
1305 netdev_for_each_mc_addr(dmi, dev) { 1305 netdev_for_each_mc_addr(ha, dev) {
1306 dev_mc_address[0] |= dmi->dmi_addr[2] ; 1306 dev_mc_address[0] |= ha->addr[2];
1307 dev_mc_address[1] |= dmi->dmi_addr[3] ; 1307 dev_mc_address[1] |= ha->addr[3];
1308 dev_mc_address[2] |= dmi->dmi_addr[4] ; 1308 dev_mc_address[2] |= ha->addr[4];
1309 dev_mc_address[3] |= dmi->dmi_addr[5] ; 1309 dev_mc_address[3] |= ha->addr[5];
1310 } 1310 }
1311 1311
1312 writew(htons(SRB_SET_FUNC_ADDRESS << 8),streamer_mmio+LAPDINC); 1312 writew(htons(SRB_SET_FUNC_ADDRESS << 8),streamer_mmio+LAPDINC);
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index 3decaf4b6cf2..3d2fbe60b46e 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -1139,7 +1139,7 @@ static void olympic_set_rx_mode(struct net_device *dev)
1139 u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ; 1139 u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ;
1140 u8 options = 0; 1140 u8 options = 0;
1141 u8 __iomem *srb; 1141 u8 __iomem *srb;
1142 struct dev_mc_list *dmi; 1142 struct netdev_hw_addr *ha;
1143 unsigned char dev_mc_address[4] ; 1143 unsigned char dev_mc_address[4] ;
1144 1144
1145 writel(olympic_priv->srb,olympic_mmio+LAPA); 1145 writel(olympic_priv->srb,olympic_mmio+LAPA);
@@ -1177,11 +1177,11 @@ static void olympic_set_rx_mode(struct net_device *dev)
1177 1177
1178 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; 1178 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ;
1179 1179
1180 netdev_for_each_mc_addr(dmi, dev) { 1180 netdev_for_each_mc_addr(ha, dev) {
1181 dev_mc_address[0] |= dmi->dmi_addr[2] ; 1181 dev_mc_address[0] |= ha->addr[2];
1182 dev_mc_address[1] |= dmi->dmi_addr[3] ; 1182 dev_mc_address[1] |= ha->addr[3];
1183 dev_mc_address[2] |= dmi->dmi_addr[4] ; 1183 dev_mc_address[2] |= ha->addr[4];
1184 dev_mc_address[3] |= dmi->dmi_addr[5] ; 1184 dev_mc_address[3] |= ha->addr[5];
1185 } 1185 }
1186 1186
1187 writeb(SRB_SET_FUNC_ADDRESS,srb+0); 1187 writeb(SRB_SET_FUNC_ADDRESS,srb+0);
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
index b545e20d2898..9fa2c36ff904 100644
--- a/drivers/net/tokenring/tms380tr.c
+++ b/drivers/net/tokenring/tms380tr.c
@@ -1212,17 +1212,17 @@ static void tms380tr_set_multicast_list(struct net_device *dev)
1212 } 1212 }
1213 else 1213 else
1214 { 1214 {
1215 struct dev_mc_list *mclist; 1215 struct netdev_hw_addr *ha;
1216 1216
1217 netdev_for_each_mc_addr(mclist, dev) { 1217 netdev_for_each_mc_addr(ha, dev) {
1218 ((char *)(&tp->ocpl.FunctAddr))[0] |= 1218 ((char *)(&tp->ocpl.FunctAddr))[0] |=
1219 mclist->dmi_addr[2]; 1219 ha->addr[2];
1220 ((char *)(&tp->ocpl.FunctAddr))[1] |= 1220 ((char *)(&tp->ocpl.FunctAddr))[1] |=
1221 mclist->dmi_addr[3]; 1221 ha->addr[3];
1222 ((char *)(&tp->ocpl.FunctAddr))[2] |= 1222 ((char *)(&tp->ocpl.FunctAddr))[2] |=
1223 mclist->dmi_addr[4]; 1223 ha->addr[4];
1224 ((char *)(&tp->ocpl.FunctAddr))[3] |= 1224 ((char *)(&tp->ocpl.FunctAddr))[3] |=
1225 mclist->dmi_addr[5]; 1225 ha->addr[5];
1226 } 1226 }
1227 } 1227 }
1228 tms380tr_exec_cmd(dev, OC_SET_FUNCT_ADDR); 1228 tms380tr_exec_cmd(dev, OC_SET_FUNCT_ADDR);