Commit 0aff1fbf authored by Sathya Perla's avatar Sathya Perla Committed by David S. Miller

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: default avatarSathya Perla <sathya.perla@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 841f60fc
...@@ -1463,13 +1463,7 @@ static int be_vlan_add_vid(struct net_device *netdev, __be16 proto, u16 vid) ...@@ -1463,13 +1463,7 @@ static int be_vlan_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
set_bit(vid, adapter->vids); set_bit(vid, adapter->vids);
adapter->vlans_added++; adapter->vlans_added++;
status = be_vid_config(adapter); return be_vid_config(adapter);
if (status) {
adapter->vlans_added--;
clear_bit(vid, adapter->vids);
}
return status;
} }
static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid) static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment