|
@@ -2549,7 +2549,7 @@ static int i40e_vlan_rx_add_vid(struct net_device *netdev,
|
|
|
struct i40e_vsi *vsi = np->vsi;
|
|
|
int ret = 0;
|
|
|
|
|
|
- if (vid > 4095)
|
|
|
+ if (vid >= VLAN_N_VID)
|
|
|
return -EINVAL;
|
|
|
|
|
|
/* If the network stack called us with vid = 0 then
|
|
@@ -2561,7 +2561,7 @@ static int i40e_vlan_rx_add_vid(struct net_device *netdev,
|
|
|
if (vid)
|
|
|
ret = i40e_vsi_add_vlan(vsi, vid);
|
|
|
|
|
|
- if (!ret && (vid < VLAN_N_VID))
|
|
|
+ if (!ret)
|
|
|
set_bit(vid, vsi->active_vlans);
|
|
|
|
|
|
return ret;
|