diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-06-01 12:44:01 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-03 11:44:20 -0400 |
commit | 25805dcf9d83098cf5492117ad2669cd14cc9b24 (patch) | |
tree | 741134040babb0c2bce52d054fa5f08cf530449d /drivers | |
parent | cb434e380d58d3956c75dc5ead00eced599b9d16 (diff) |
network drivers: eliminate unneeded kill_vid code
Many drivers had code that did kill_vid, but they weren't doing vlan
filtering. With new API the stub is unneeded unless device sets
NETIF_F_HW_VLAN_FILTER.
Bad habit: I couldn't resist fixing a couple of nearby style things
in acenic, and forcedeth.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/acenic.c | 21 | ||||
-rw-r--r-- | drivers/net/acenic.h | 1 | ||||
-rw-r--r-- | drivers/net/amd8111e.c | 11 | ||||
-rw-r--r-- | drivers/net/bnx2.c | 14 | ||||
-rw-r--r-- | drivers/net/chelsio/cxgb2.c | 10 | ||||
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 6 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 8 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 16 | ||||
-rw-r--r-- | drivers/net/ns83820.c | 12 | ||||
-rw-r--r-- | drivers/net/r8169.c | 11 | ||||
-rw-r--r-- | drivers/net/s2io.c | 12 | ||||
-rw-r--r-- | drivers/net/spider_net.c | 40 | ||||
-rw-r--r-- | drivers/net/tg3.c | 16 | ||||
-rw-r--r-- | drivers/net/typhoon.c | 11 |
14 files changed, 6 insertions, 183 deletions
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index 7122b7ba8d61..04382f979c99 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -480,12 +480,10 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev, | |||
480 | #if ACENIC_DO_VLAN | 480 | #if ACENIC_DO_VLAN |
481 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 481 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
482 | dev->vlan_rx_register = ace_vlan_rx_register; | 482 | dev->vlan_rx_register = ace_vlan_rx_register; |
483 | dev->vlan_rx_kill_vid = ace_vlan_rx_kill_vid; | ||
484 | #endif | 483 | #endif |
485 | if (1) { | 484 | |
486 | dev->tx_timeout = &ace_watchdog; | 485 | dev->tx_timeout = &ace_watchdog; |
487 | dev->watchdog_timeo = 5*HZ; | 486 | dev->watchdog_timeo = 5*HZ; |
488 | } | ||
489 | 487 | ||
490 | dev->open = &ace_open; | 488 | dev->open = &ace_open; |
491 | dev->stop = &ace_close; | 489 | dev->stop = &ace_close; |
@@ -2283,19 +2281,6 @@ static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
2283 | ace_unmask_irq(dev); | 2281 | ace_unmask_irq(dev); |
2284 | local_irq_restore(flags); | 2282 | local_irq_restore(flags); |
2285 | } | 2283 | } |
2286 | |||
2287 | |||
2288 | static void ace_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
2289 | { | ||
2290 | struct ace_private *ap = netdev_priv(dev); | ||
2291 | unsigned long flags; | ||
2292 | |||
2293 | local_irq_save(flags); | ||
2294 | ace_mask_irq(dev); | ||
2295 | vlan_group_set_device(ap->vlgrp, vid, NULL); | ||
2296 | ace_unmask_irq(dev); | ||
2297 | local_irq_restore(flags); | ||
2298 | } | ||
2299 | #endif /* ACENIC_DO_VLAN */ | 2284 | #endif /* ACENIC_DO_VLAN */ |
2300 | 2285 | ||
2301 | 2286 | ||
diff --git a/drivers/net/acenic.h b/drivers/net/acenic.h index 8ca8534d70bf..60ed1837fa8f 100644 --- a/drivers/net/acenic.h +++ b/drivers/net/acenic.h | |||
@@ -787,7 +787,6 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev); | |||
787 | static int read_eeprom_byte(struct net_device *dev, unsigned long offset); | 787 | static int read_eeprom_byte(struct net_device *dev, unsigned long offset); |
788 | #if ACENIC_DO_VLAN | 788 | #if ACENIC_DO_VLAN |
789 | static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp); | 789 | static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp); |
790 | static void ace_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid); | ||
791 | #endif | 790 | #endif |
792 | 791 | ||
793 | #endif /* _ACENIC_H_ */ | 792 | #endif /* _ACENIC_H_ */ |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 84b81642011c..a61b2f89fc33 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -1728,15 +1728,8 @@ static void amd8111e_vlan_rx_register(struct net_device *dev, struct vlan_group | |||
1728 | lp->vlgrp = grp; | 1728 | lp->vlgrp = grp; |
1729 | spin_unlock_irq(&lp->lock); | 1729 | spin_unlock_irq(&lp->lock); |
1730 | } | 1730 | } |
1731 | |||
1732 | static void amd8111e_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
1733 | { | ||
1734 | struct amd8111e_priv *lp = netdev_priv(dev); | ||
1735 | spin_lock_irq(&lp->lock); | ||
1736 | vlan_group_set_device(lp->vlgrp, vid, NULL); | ||
1737 | spin_unlock_irq(&lp->lock); | ||
1738 | } | ||
1739 | #endif | 1731 | #endif |
1732 | |||
1740 | static int amd8111e_enable_magicpkt(struct amd8111e_priv* lp) | 1733 | static int amd8111e_enable_magicpkt(struct amd8111e_priv* lp) |
1741 | { | 1734 | { |
1742 | writel( VAL1|MPPLBA, lp->mmio + CMD3); | 1735 | writel( VAL1|MPPLBA, lp->mmio + CMD3); |
@@ -1996,7 +1989,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, | |||
1996 | #if AMD8111E_VLAN_TAG_USED | 1989 | #if AMD8111E_VLAN_TAG_USED |
1997 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX ; | 1990 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX ; |
1998 | dev->vlan_rx_register =amd8111e_vlan_rx_register; | 1991 | dev->vlan_rx_register =amd8111e_vlan_rx_register; |
1999 | dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid; | ||
2000 | #endif | 1992 | #endif |
2001 | 1993 | ||
2002 | lp = netdev_priv(dev); | 1994 | lp = netdev_priv(dev); |
@@ -2049,7 +2041,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, | |||
2049 | #if AMD8111E_VLAN_TAG_USED | 2041 | #if AMD8111E_VLAN_TAG_USED |
2050 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 2042 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
2051 | dev->vlan_rx_register =amd8111e_vlan_rx_register; | 2043 | dev->vlan_rx_register =amd8111e_vlan_rx_register; |
2052 | dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid; | ||
2053 | #endif | 2044 | #endif |
2054 | /* Probe the external PHY */ | 2045 | /* Probe the external PHY */ |
2055 | amd8111e_probe_ext_phy(dev); | 2046 | amd8111e_probe_ext_phy(dev); |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 88b33c6ddda8..da7c3b0c533c 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -4786,19 +4786,6 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) | |||
4786 | 4786 | ||
4787 | bnx2_netif_start(bp); | 4787 | bnx2_netif_start(bp); |
4788 | } | 4788 | } |
4789 | |||
4790 | /* Called with rtnl_lock */ | ||
4791 | static void | ||
4792 | bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) | ||
4793 | { | ||
4794 | struct bnx2 *bp = netdev_priv(dev); | ||
4795 | |||
4796 | bnx2_netif_stop(bp); | ||
4797 | vlan_group_set_device(bp->vlgrp, vid, NULL); | ||
4798 | bnx2_set_rx_mode(dev); | ||
4799 | |||
4800 | bnx2_netif_start(bp); | ||
4801 | } | ||
4802 | #endif | 4789 | #endif |
4803 | 4790 | ||
4804 | /* Called with netif_tx_lock. | 4791 | /* Called with netif_tx_lock. |
@@ -6453,7 +6440,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
6453 | dev->watchdog_timeo = TX_TIMEOUT; | 6440 | dev->watchdog_timeo = TX_TIMEOUT; |
6454 | #ifdef BCM_VLAN | 6441 | #ifdef BCM_VLAN |
6455 | dev->vlan_rx_register = bnx2_vlan_rx_register; | 6442 | dev->vlan_rx_register = bnx2_vlan_rx_register; |
6456 | dev->vlan_rx_kill_vid = bnx2_vlan_rx_kill_vid; | ||
6457 | #endif | 6443 | #endif |
6458 | dev->poll = bnx2_poll; | 6444 | dev->poll = bnx2_poll; |
6459 | dev->ethtool_ops = &bnx2_ethtool_ops; | 6445 | dev->ethtool_ops = &bnx2_ethtool_ops; |
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 125c9b105869..231ce43b97cf 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -883,15 +883,6 @@ static void vlan_rx_register(struct net_device *dev, | |||
883 | t1_set_vlan_accel(adapter, grp != NULL); | 883 | t1_set_vlan_accel(adapter, grp != NULL); |
884 | spin_unlock_irq(&adapter->async_lock); | 884 | spin_unlock_irq(&adapter->async_lock); |
885 | } | 885 | } |
886 | |||
887 | static void vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
888 | { | ||
889 | struct adapter *adapter = dev->priv; | ||
890 | |||
891 | spin_lock_irq(&adapter->async_lock); | ||
892 | vlan_group_set_device(adapter->vlan_grp, vid, NULL); | ||
893 | spin_unlock_irq(&adapter->async_lock); | ||
894 | } | ||
895 | #endif | 886 | #endif |
896 | 887 | ||
897 | #ifdef CONFIG_NET_POLL_CONTROLLER | 888 | #ifdef CONFIG_NET_POLL_CONTROLLER |
@@ -1099,7 +1090,6 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1099 | netdev->features |= | 1090 | netdev->features |= |
1100 | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 1091 | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
1101 | netdev->vlan_rx_register = vlan_rx_register; | 1092 | netdev->vlan_rx_register = vlan_rx_register; |
1102 | netdev->vlan_rx_kill_vid = vlan_rx_kill_vid; | ||
1103 | #endif | 1093 | #endif |
1104 | 1094 | ||
1105 | /* T204: disable TSO */ | 1095 | /* T204: disable TSO */ |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 67b4b219d927..1b20f4060e2d 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2067,11 +2067,6 @@ static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
2067 | t3_synchronize_rx(adapter, pi); | 2067 | t3_synchronize_rx(adapter, pi); |
2068 | } | 2068 | } |
2069 | 2069 | ||
2070 | static void vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
2071 | { | ||
2072 | /* nothing */ | ||
2073 | } | ||
2074 | |||
2075 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2070 | #ifdef CONFIG_NET_POLL_CONTROLLER |
2076 | static void cxgb_netpoll(struct net_device *dev) | 2071 | static void cxgb_netpoll(struct net_device *dev) |
2077 | { | 2072 | { |
@@ -2409,7 +2404,6 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
2409 | 2404 | ||
2410 | netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 2405 | netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
2411 | netdev->vlan_rx_register = vlan_rx_register; | 2406 | netdev->vlan_rx_register = vlan_rx_register; |
2412 | netdev->vlan_rx_kill_vid = vlan_rx_kill_vid; | ||
2413 | 2407 | ||
2414 | netdev->open = cxgb_open; | 2408 | netdev->open = cxgb_open; |
2415 | netdev->stop = cxgb_close; | 2409 | netdev->stop = cxgb_close; |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 4154fd000746..32788ca40d25 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -4605,12 +4605,7 @@ static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
4605 | writel(np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); | 4605 | writel(np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); |
4606 | 4606 | ||
4607 | spin_unlock_irq(&np->lock); | 4607 | spin_unlock_irq(&np->lock); |
4608 | }; | 4608 | } |
4609 | |||
4610 | static void nv_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
4611 | { | ||
4612 | /* nothing to do */ | ||
4613 | }; | ||
4614 | 4609 | ||
4615 | /* The mgmt unit and driver use a semaphore to access the phy during init */ | 4610 | /* The mgmt unit and driver use a semaphore to access the phy during init */ |
4616 | static int nv_mgmt_acquire_sema(struct net_device *dev) | 4611 | static int nv_mgmt_acquire_sema(struct net_device *dev) |
@@ -4956,7 +4951,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
4956 | np->vlanctl_bits = NVREG_VLANCONTROL_ENABLE; | 4951 | np->vlanctl_bits = NVREG_VLANCONTROL_ENABLE; |
4957 | dev->features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX; | 4952 | dev->features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX; |
4958 | dev->vlan_rx_register = nv_vlan_rx_register; | 4953 | dev->vlan_rx_register = nv_vlan_rx_register; |
4959 | dev->vlan_rx_kill_vid = nv_vlan_rx_kill_vid; | ||
4960 | } | 4954 | } |
4961 | 4955 | ||
4962 | np->msi_flags = 0; | 4956 | np->msi_flags = 0; |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index f5b3cba23fc5..6822bf14267b 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -140,7 +140,6 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit); | |||
140 | static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length); | 140 | static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length); |
141 | static void gfar_vlan_rx_register(struct net_device *netdev, | 141 | static void gfar_vlan_rx_register(struct net_device *netdev, |
142 | struct vlan_group *grp); | 142 | struct vlan_group *grp); |
143 | static void gfar_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); | ||
144 | void gfar_halt(struct net_device *dev); | 143 | void gfar_halt(struct net_device *dev); |
145 | void gfar_start(struct net_device *dev); | 144 | void gfar_start(struct net_device *dev); |
146 | static void gfar_clear_exact_match(struct net_device *dev); | 145 | static void gfar_clear_exact_match(struct net_device *dev); |
@@ -284,7 +283,6 @@ static int gfar_probe(struct platform_device *pdev) | |||
284 | 283 | ||
285 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_VLAN) { | 284 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_VLAN) { |
286 | dev->vlan_rx_register = gfar_vlan_rx_register; | 285 | dev->vlan_rx_register = gfar_vlan_rx_register; |
287 | dev->vlan_rx_kill_vid = gfar_vlan_rx_kill_vid; | ||
288 | 286 | ||
289 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 287 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
290 | 288 | ||
@@ -1133,20 +1131,6 @@ static void gfar_vlan_rx_register(struct net_device *dev, | |||
1133 | spin_unlock_irqrestore(&priv->rxlock, flags); | 1131 | spin_unlock_irqrestore(&priv->rxlock, flags); |
1134 | } | 1132 | } |
1135 | 1133 | ||
1136 | |||
1137 | static void gfar_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) | ||
1138 | { | ||
1139 | struct gfar_private *priv = netdev_priv(dev); | ||
1140 | unsigned long flags; | ||
1141 | |||
1142 | spin_lock_irqsave(&priv->rxlock, flags); | ||
1143 | |||
1144 | vlan_group_set_device(priv->vlgrp, vid, NULL); | ||
1145 | |||
1146 | spin_unlock_irqrestore(&priv->rxlock, flags); | ||
1147 | } | ||
1148 | |||
1149 | |||
1150 | static int gfar_change_mtu(struct net_device *dev, int new_mtu) | 1134 | static int gfar_change_mtu(struct net_device *dev, int new_mtu) |
1151 | { | 1135 | { |
1152 | int tempsize, tempval; | 1136 | int tempsize, tempval; |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 3439f8c649f9..717d8e9b9833 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -506,17 +506,6 @@ static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group | |||
506 | spin_unlock(&dev->tx_lock); | 506 | spin_unlock(&dev->tx_lock); |
507 | spin_unlock_irq(&dev->misc_lock); | 507 | spin_unlock_irq(&dev->misc_lock); |
508 | } | 508 | } |
509 | |||
510 | static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid) | ||
511 | { | ||
512 | struct ns83820 *dev = PRIV(ndev); | ||
513 | |||
514 | spin_lock_irq(&dev->misc_lock); | ||
515 | spin_lock(&dev->tx_lock); | ||
516 | vlan_group_set_device(dev->vlgrp, vid, NULL); | ||
517 | spin_unlock(&dev->tx_lock); | ||
518 | spin_unlock_irq(&dev->misc_lock); | ||
519 | } | ||
520 | #endif | 509 | #endif |
521 | 510 | ||
522 | /* Packet Receiver | 511 | /* Packet Receiver |
@@ -2083,7 +2072,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
2083 | /* We also support hardware vlan acceleration */ | 2072 | /* We also support hardware vlan acceleration */ |
2084 | ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 2073 | ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
2085 | ndev->vlan_rx_register = ns83820_vlan_rx_register; | 2074 | ndev->vlan_rx_register = ns83820_vlan_rx_register; |
2086 | ndev->vlan_rx_kill_vid = ns83820_vlan_rx_kill_vid; | ||
2087 | #endif | 2075 | #endif |
2088 | 2076 | ||
2089 | if (using_dac) { | 2077 | if (using_dac) { |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 45876a854f00..5ec7752caa48 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -886,16 +886,6 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, | |||
886 | spin_unlock_irqrestore(&tp->lock, flags); | 886 | spin_unlock_irqrestore(&tp->lock, flags); |
887 | } | 887 | } |
888 | 888 | ||
889 | static void rtl8169_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
890 | { | ||
891 | struct rtl8169_private *tp = netdev_priv(dev); | ||
892 | unsigned long flags; | ||
893 | |||
894 | spin_lock_irqsave(&tp->lock, flags); | ||
895 | vlan_group_set_device(tp->vlgrp, vid, NULL); | ||
896 | spin_unlock_irqrestore(&tp->lock, flags); | ||
897 | } | ||
898 | |||
899 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, | 889 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, |
900 | struct sk_buff *skb) | 890 | struct sk_buff *skb) |
901 | { | 891 | { |
@@ -1671,7 +1661,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1671 | #ifdef CONFIG_R8169_VLAN | 1661 | #ifdef CONFIG_R8169_VLAN |
1672 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 1662 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
1673 | dev->vlan_rx_register = rtl8169_vlan_rx_register; | 1663 | dev->vlan_rx_register = rtl8169_vlan_rx_register; |
1674 | dev->vlan_rx_kill_vid = rtl8169_vlan_rx_kill_vid; | ||
1675 | #endif | 1664 | #endif |
1676 | 1665 | ||
1677 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1666 | #ifdef CONFIG_NET_POLL_CONTROLLER |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index e3e6d410d72c..c6ba3dee8ae0 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -340,17 +340,6 @@ static void s2io_vlan_rx_register(struct net_device *dev, | |||
340 | /* A flag indicating whether 'RX_PA_CFG_STRIP_VLAN_TAG' bit is set or not */ | 340 | /* A flag indicating whether 'RX_PA_CFG_STRIP_VLAN_TAG' bit is set or not */ |
341 | static int vlan_strip_flag; | 341 | static int vlan_strip_flag; |
342 | 342 | ||
343 | /* Unregister the vlan */ | ||
344 | static void s2io_vlan_rx_kill_vid(struct net_device *dev, unsigned long vid) | ||
345 | { | ||
346 | struct s2io_nic *nic = dev->priv; | ||
347 | unsigned long flags; | ||
348 | |||
349 | spin_lock_irqsave(&nic->tx_lock, flags); | ||
350 | vlan_group_set_device(nic->vlgrp, vid, NULL); | ||
351 | spin_unlock_irqrestore(&nic->tx_lock, flags); | ||
352 | } | ||
353 | |||
354 | /* | 343 | /* |
355 | * Constants to be programmed into the Xena's registers, to configure | 344 | * Constants to be programmed into the Xena's registers, to configure |
356 | * the XAUI. | 345 | * the XAUI. |
@@ -7412,7 +7401,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7412 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | 7401 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); |
7413 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 7402 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
7414 | dev->vlan_rx_register = s2io_vlan_rx_register; | 7403 | dev->vlan_rx_register = s2io_vlan_rx_register; |
7415 | dev->vlan_rx_kill_vid = (void *)s2io_vlan_rx_kill_vid; | ||
7416 | 7404 | ||
7417 | /* | 7405 | /* |
7418 | * will use eth_mac_addr() for dev->set_mac_address | 7406 | * will use eth_mac_addr() for dev->set_mac_address |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index ef84d7c757a0..b47ad1df2e0c 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1191,43 +1191,6 @@ spider_net_poll(struct net_device *netdev, int *budget) | |||
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | /** | 1193 | /** |
1194 | * spider_net_vlan_rx_reg - initializes VLAN structures in the driver and card | ||
1195 | * @netdev: interface device structure | ||
1196 | * @grp: vlan_group structure that is registered (NULL on destroying interface) | ||
1197 | */ | ||
1198 | static void | ||
1199 | spider_net_vlan_rx_reg(struct net_device *netdev, struct vlan_group *grp) | ||
1200 | { | ||
1201 | /* further enhancement... yet to do */ | ||
1202 | return; | ||
1203 | } | ||
1204 | |||
1205 | /** | ||
1206 | * spider_net_vlan_rx_add - adds VLAN id to the card filter | ||
1207 | * @netdev: interface device structure | ||
1208 | * @vid: VLAN id to add | ||
1209 | */ | ||
1210 | static void | ||
1211 | spider_net_vlan_rx_add(struct net_device *netdev, uint16_t vid) | ||
1212 | { | ||
1213 | /* further enhancement... yet to do */ | ||
1214 | /* add vid to card's VLAN filter table */ | ||
1215 | return; | ||
1216 | } | ||
1217 | |||
1218 | /** | ||
1219 | * spider_net_vlan_rx_kill - removes VLAN id to the card filter | ||
1220 | * @netdev: interface device structure | ||
1221 | * @vid: VLAN id to remove | ||
1222 | */ | ||
1223 | static void | ||
1224 | spider_net_vlan_rx_kill(struct net_device *netdev, uint16_t vid) | ||
1225 | { | ||
1226 | /* further enhancement... yet to do */ | ||
1227 | /* remove vid from card's VLAN filter table */ | ||
1228 | } | ||
1229 | |||
1230 | /** | ||
1231 | * spider_net_get_stats - get interface statistics | 1194 | * spider_net_get_stats - get interface statistics |
1232 | * @netdev: interface device structure | 1195 | * @netdev: interface device structure |
1233 | * | 1196 | * |
@@ -2177,9 +2140,6 @@ spider_net_setup_netdev_ops(struct net_device *netdev) | |||
2177 | netdev->poll = &spider_net_poll; | 2140 | netdev->poll = &spider_net_poll; |
2178 | netdev->weight = SPIDER_NET_NAPI_WEIGHT; | 2141 | netdev->weight = SPIDER_NET_NAPI_WEIGHT; |
2179 | /* HW VLAN */ | 2142 | /* HW VLAN */ |
2180 | netdev->vlan_rx_register = &spider_net_vlan_rx_reg; | ||
2181 | netdev->vlan_rx_add_vid = &spider_net_vlan_rx_add; | ||
2182 | netdev->vlan_rx_kill_vid = &spider_net_vlan_rx_kill; | ||
2183 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2143 | #ifdef CONFIG_NET_POLL_CONTROLLER |
2184 | /* poll controller */ | 2144 | /* poll controller */ |
2185 | netdev->poll_controller = &spider_net_poll_controller; | 2145 | netdev->poll_controller = &spider_net_poll_controller; |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 923b9c725cc3..023779a581fd 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -9121,21 +9121,6 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
9121 | if (netif_running(dev)) | 9121 | if (netif_running(dev)) |
9122 | tg3_netif_start(tp); | 9122 | tg3_netif_start(tp); |
9123 | } | 9123 | } |
9124 | |||
9125 | static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
9126 | { | ||
9127 | struct tg3 *tp = netdev_priv(dev); | ||
9128 | |||
9129 | if (netif_running(dev)) | ||
9130 | tg3_netif_stop(tp); | ||
9131 | |||
9132 | tg3_full_lock(tp, 0); | ||
9133 | vlan_group_set_device(tp->vlgrp, vid, NULL); | ||
9134 | tg3_full_unlock(tp); | ||
9135 | |||
9136 | if (netif_running(dev)) | ||
9137 | tg3_netif_start(tp); | ||
9138 | } | ||
9139 | #endif | 9124 | #endif |
9140 | 9125 | ||
9141 | static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) | 9126 | static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) |
@@ -11778,7 +11763,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11778 | #if TG3_VLAN_TAG_USED | 11763 | #if TG3_VLAN_TAG_USED |
11779 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 11764 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
11780 | dev->vlan_rx_register = tg3_vlan_rx_register; | 11765 | dev->vlan_rx_register = tg3_vlan_rx_register; |
11781 | dev->vlan_rx_kill_vid = tg3_vlan_rx_kill_vid; | ||
11782 | #endif | 11766 | #endif |
11783 | 11767 | ||
11784 | tp = netdev_priv(dev); | 11768 | tp = netdev_priv(dev); |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index f72573594121..15b2fb8aa492 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -741,15 +741,6 @@ typhoon_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
741 | spin_unlock_bh(&tp->state_lock); | 741 | spin_unlock_bh(&tp->state_lock); |
742 | } | 742 | } |
743 | 743 | ||
744 | static void | ||
745 | typhoon_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
746 | { | ||
747 | struct typhoon *tp = netdev_priv(dev); | ||
748 | spin_lock_bh(&tp->state_lock); | ||
749 | vlan_group_set_device(tp->vlgrp, vid, NULL); | ||
750 | spin_unlock_bh(&tp->state_lock); | ||
751 | } | ||
752 | |||
753 | static inline void | 744 | static inline void |
754 | typhoon_tso_fill(struct sk_buff *skb, struct transmit_ring *txRing, | 745 | typhoon_tso_fill(struct sk_buff *skb, struct transmit_ring *txRing, |
755 | u32 ring_dma) | 746 | u32 ring_dma) |
@@ -2542,7 +2533,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2542 | dev->get_stats = typhoon_get_stats; | 2533 | dev->get_stats = typhoon_get_stats; |
2543 | dev->set_mac_address = typhoon_set_mac_address; | 2534 | dev->set_mac_address = typhoon_set_mac_address; |
2544 | dev->vlan_rx_register = typhoon_vlan_rx_register; | 2535 | dev->vlan_rx_register = typhoon_vlan_rx_register; |
2545 | dev->vlan_rx_kill_vid = typhoon_vlan_rx_kill_vid; | 2536 | |
2546 | SET_ETHTOOL_OPS(dev, &typhoon_ethtool_ops); | 2537 | SET_ETHTOOL_OPS(dev, &typhoon_ethtool_ops); |
2547 | 2538 | ||
2548 | /* We can handle scatter gather, up to 16 entries, and | 2539 | /* We can handle scatter gather, up to 16 entries, and |