diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-26 02:26:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-26 02:26:10 -0400 |
commit | 43154d08d6bb5c69aa0d0e3448fb348b4cd84e91 (patch) | |
tree | 176edb26aad2d33e8be36530b66b19d0603c4b1d /drivers/net/sky2.c | |
parent | 03194379a77b02df3404ec4848a50c6784e9a8a5 (diff) | |
parent | 289c79a4bd350e8a25065102563ad1a183d1b402 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/cpmac.c
net/mac80211/mlme.c
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 4b0f03358777..535f6cc96c8d 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1159,17 +1159,9 @@ static int sky2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | #ifdef SKY2_VLAN_TAG_USED | 1161 | #ifdef SKY2_VLAN_TAG_USED |
1162 | static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | 1162 | static void sky2_set_vlan_mode(struct sky2_hw *hw, u16 port, bool onoff) |
1163 | { | 1163 | { |
1164 | struct sky2_port *sky2 = netdev_priv(dev); | 1164 | if (onoff) { |
1165 | struct sky2_hw *hw = sky2->hw; | ||
1166 | u16 port = sky2->port; | ||
1167 | |||
1168 | netif_tx_lock_bh(dev); | ||
1169 | napi_disable(&hw->napi); | ||
1170 | |||
1171 | sky2->vlgrp = grp; | ||
1172 | if (grp) { | ||
1173 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), | 1165 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), |
1174 | RX_VLAN_STRIP_ON); | 1166 | RX_VLAN_STRIP_ON); |
1175 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), | 1167 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), |
@@ -1180,6 +1172,19 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp | |||
1180 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), | 1172 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), |
1181 | TX_VLAN_TAG_OFF); | 1173 | TX_VLAN_TAG_OFF); |
1182 | } | 1174 | } |
1175 | } | ||
1176 | |||
1177 | static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | ||
1178 | { | ||
1179 | struct sky2_port *sky2 = netdev_priv(dev); | ||
1180 | struct sky2_hw *hw = sky2->hw; | ||
1181 | u16 port = sky2->port; | ||
1182 | |||
1183 | netif_tx_lock_bh(dev); | ||
1184 | napi_disable(&hw->napi); | ||
1185 | |||
1186 | sky2->vlgrp = grp; | ||
1187 | sky2_set_vlan_mode(hw, port, grp != NULL); | ||
1183 | 1188 | ||
1184 | sky2_read32(hw, B0_Y2_SP_LISR); | 1189 | sky2_read32(hw, B0_Y2_SP_LISR); |
1185 | napi_enable(&hw->napi); | 1190 | napi_enable(&hw->napi); |
@@ -1418,6 +1423,10 @@ static int sky2_up(struct net_device *dev) | |||
1418 | sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, | 1423 | sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, |
1419 | TX_RING_SIZE - 1); | 1424 | TX_RING_SIZE - 1); |
1420 | 1425 | ||
1426 | #ifdef SKY2_VLAN_TAG_USED | ||
1427 | sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL); | ||
1428 | #endif | ||
1429 | |||
1421 | err = sky2_rx_start(sky2); | 1430 | err = sky2_rx_start(sky2); |
1422 | if (err) | 1431 | if (err) |
1423 | goto err_out; | 1432 | goto err_out; |