diff options
author | Sathya Perla <sathya.perla@broadcom.com> | 2016-07-27 12:26:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-09 01:38:27 +0300 |
commit | 0aff1fbfe72e47412e3213648e972c339af30e4e (patch) | |
tree | e278ded2c75303dcd558464f437b835e66cd301a /drivers/net/ethernet/emulex | |
parent | 841f60fcc4e7986a4ef3f83a289ab47076872e42 (diff) | |
download | linux-0aff1fbfe72e47412e3213648e972c339af30e4e.tar.xz |
be2net: do not remove vids from driver table if be_vid_config() fails.
The driver currently removes a new vid from the adapter->vids[] array if
be_vid_config() returns an error, which occurs when there is an error in
HW/FW. This is wrong. After the HW/FW error is recovered from, we need the
complete vids[] array to re-program the vlan list.
Signed-off-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index a97fc8a80fac..243d43bfd975 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1463,13 +1463,7 @@ static int be_vlan_add_vid(struct net_device *netdev, __be16 proto, u16 vid) set_bit(vid, adapter->vids); adapter->vlans_added++; - status = be_vid_config(adapter); - if (status) { - adapter->vlans_added--; - clear_bit(vid, adapter->vids); - } - - return status; + return be_vid_config(adapter); } static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid) |