diff options
-rw-r--r-- | drivers/net/sky2.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index adfbe81693a6..fe01b961b597 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1049,26 +1049,22 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp | |||
1049 | u16 port = sky2->port; | 1049 | u16 port = sky2->port; |
1050 | 1050 | ||
1051 | netif_tx_lock_bh(dev); | 1051 | netif_tx_lock_bh(dev); |
1052 | netif_poll_disable(sky2->hw->dev[0]); | ||
1052 | 1053 | ||
1053 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), RX_VLAN_STRIP_ON); | ||
1054 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), TX_VLAN_TAG_ON); | ||
1055 | sky2->vlgrp = grp; | 1054 | sky2->vlgrp = grp; |
1055 | if (grp) { | ||
1056 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), | ||
1057 | RX_VLAN_STRIP_ON); | ||
1058 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), | ||
1059 | TX_VLAN_TAG_ON); | ||
1060 | } else { | ||
1061 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), | ||
1062 | RX_VLAN_STRIP_OFF); | ||
1063 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), | ||
1064 | TX_VLAN_TAG_OFF); | ||
1065 | } | ||
1056 | 1066 | ||
1057 | netif_tx_unlock_bh(dev); | 1067 | netif_poll_enable(sky2->hw->dev[0]); |
1058 | } | ||
1059 | |||
1060 | static void sky2_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | ||
1061 | { | ||
1062 | struct sky2_port *sky2 = netdev_priv(dev); | ||
1063 | struct sky2_hw *hw = sky2->hw; | ||
1064 | u16 port = sky2->port; | ||
1065 | |||
1066 | netif_tx_lock_bh(dev); | ||
1067 | |||
1068 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), RX_VLAN_STRIP_OFF); | ||
1069 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), TX_VLAN_TAG_OFF); | ||
1070 | vlan_group_set_device(sky2->vlgrp, vid, NULL); | ||
1071 | |||
1072 | netif_tx_unlock_bh(dev); | 1068 | netif_tx_unlock_bh(dev); |
1073 | } | 1069 | } |
1074 | #endif | 1070 | #endif |
@@ -3484,7 +3480,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
3484 | #ifdef SKY2_VLAN_TAG_USED | 3480 | #ifdef SKY2_VLAN_TAG_USED |
3485 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 3481 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
3486 | dev->vlan_rx_register = sky2_vlan_rx_register; | 3482 | dev->vlan_rx_register = sky2_vlan_rx_register; |
3487 | dev->vlan_rx_kill_vid = sky2_vlan_rx_kill_vid; | ||
3488 | #endif | 3483 | #endif |
3489 | 3484 | ||
3490 | /* read the mac address */ | 3485 | /* read the mac address */ |