diff options
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 98215fdd7d10..1d08e937af82 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -376,7 +376,7 @@ e1000_update_mng_vlan(struct e1000_adapter *adapter) | |||
376 | uint16_t vid = adapter->hw.mng_cookie.vlan_id; | 376 | uint16_t vid = adapter->hw.mng_cookie.vlan_id; |
377 | uint16_t old_vid = adapter->mng_vlan_id; | 377 | uint16_t old_vid = adapter->mng_vlan_id; |
378 | if (adapter->vlgrp) { | 378 | if (adapter->vlgrp) { |
379 | if (!adapter->vlgrp->vlan_devices[vid]) { | 379 | if (!vlan_group_get_device(adapter->vlgrp, vid)) { |
380 | if (adapter->hw.mng_cookie.status & | 380 | if (adapter->hw.mng_cookie.status & |
381 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) { | 381 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) { |
382 | e1000_vlan_rx_add_vid(netdev, vid); | 382 | e1000_vlan_rx_add_vid(netdev, vid); |
@@ -386,7 +386,7 @@ e1000_update_mng_vlan(struct e1000_adapter *adapter) | |||
386 | 386 | ||
387 | if ((old_vid != (uint16_t)E1000_MNG_VLAN_NONE) && | 387 | if ((old_vid != (uint16_t)E1000_MNG_VLAN_NONE) && |
388 | (vid != old_vid) && | 388 | (vid != old_vid) && |
389 | !adapter->vlgrp->vlan_devices[old_vid]) | 389 | !vlan_group_get_device(adapter->vlgrp, old_vid)) |
390 | e1000_vlan_rx_kill_vid(netdev, old_vid); | 390 | e1000_vlan_rx_kill_vid(netdev, old_vid); |
391 | } else | 391 | } else |
392 | adapter->mng_vlan_id = vid; | 392 | adapter->mng_vlan_id = vid; |
@@ -1482,7 +1482,7 @@ e1000_close(struct net_device *netdev) | |||
1482 | if ((adapter->hw.mng_cookie.status & | 1482 | if ((adapter->hw.mng_cookie.status & |
1483 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) && | 1483 | E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) && |
1484 | !(adapter->vlgrp && | 1484 | !(adapter->vlgrp && |
1485 | adapter->vlgrp->vlan_devices[adapter->mng_vlan_id])) { | 1485 | vlan_group_get_device(adapter->vlgrp, adapter->mng_vlan_id))) { |
1486 | e1000_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id); | 1486 | e1000_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id); |
1487 | } | 1487 | } |
1488 | 1488 | ||
@@ -4998,10 +4998,7 @@ e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) | |||
4998 | uint32_t vfta, index; | 4998 | uint32_t vfta, index; |
4999 | 4999 | ||
5000 | e1000_irq_disable(adapter); | 5000 | e1000_irq_disable(adapter); |
5001 | 5001 | vlan_group_set_device(adapter->vlgrp, vid, NULL); | |
5002 | if (adapter->vlgrp) | ||
5003 | adapter->vlgrp->vlan_devices[vid] = NULL; | ||
5004 | |||
5005 | e1000_irq_enable(adapter); | 5002 | e1000_irq_enable(adapter); |
5006 | 5003 | ||
5007 | if ((adapter->hw.mng_cookie.status & | 5004 | if ((adapter->hw.mng_cookie.status & |
@@ -5027,7 +5024,7 @@ e1000_restore_vlan(struct e1000_adapter *adapter) | |||
5027 | if (adapter->vlgrp) { | 5024 | if (adapter->vlgrp) { |
5028 | uint16_t vid; | 5025 | uint16_t vid; |
5029 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 5026 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { |
5030 | if (!adapter->vlgrp->vlan_devices[vid]) | 5027 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
5031 | continue; | 5028 | continue; |
5032 | e1000_vlan_rx_add_vid(adapter->netdev, vid); | 5029 | e1000_vlan_rx_add_vid(adapter->netdev, vid); |
5033 | } | 5030 | } |