Skip to content

Commit 0aff1fb

Browse files
Sathya Perladavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 841f60f commit 0aff1fb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/net/ethernet/emulex/benet/be_main.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,13 +1463,7 @@ static int be_vlan_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
14631463
set_bit(vid, adapter->vids);
14641464
adapter->vlans_added++;
14651465

1466-
status = be_vid_config(adapter);
1467-
if (status) {
1468-
adapter->vlans_added--;
1469-
clear_bit(vid, adapter->vids);
1470-
}
1471-
1472-
return status;
1466+
return be_vid_config(adapter);
14731467
}
14741468

14751469
static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid)

0 commit comments

Comments
 (0)