|
|
@@ -8488,11 +8488,21 @@ int bnx2x_set_vlan_one(struct bnx2x *bp, u16 vlan,
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
+void bnx2x_clear_vlan_info(struct bnx2x *bp)
|
|
|
+{
|
|
|
+ struct bnx2x_vlan_entry *vlan;
|
|
|
+
|
|
|
+ /* Mark that hw forgot all entries */
|
|
|
+ list_for_each_entry(vlan, &bp->vlan_reg, link)
|
|
|
+ vlan->hw = false;
|
|
|
+
|
|
|
+ bp->vlan_cnt = 0;
|
|
|
+}
|
|
|
+
|
|
|
static int bnx2x_del_all_vlans(struct bnx2x *bp)
|
|
|
{
|
|
|
struct bnx2x_vlan_mac_obj *vlan_obj = &bp->sp_objs[0].vlan_obj;
|
|
|
unsigned long ramrod_flags = 0, vlan_flags = 0;
|
|
|
- struct bnx2x_vlan_entry *vlan;
|
|
|
int rc;
|
|
|
|
|
|
__set_bit(RAMROD_COMP_WAIT, &ramrod_flags);
|
|
|
@@ -8501,10 +8511,7 @@ static int bnx2x_del_all_vlans(struct bnx2x *bp)
|
|
|
if (rc)
|
|
|
return rc;
|
|
|
|
|
|
- /* Mark that hw forgot all entries */
|
|
|
- list_for_each_entry(vlan, &bp->vlan_reg, link)
|
|
|
- vlan->hw = false;
|
|
|
- bp->vlan_cnt = 0;
|
|
|
+ bnx2x_clear_vlan_info(bp);
|
|
|
|
|
|
return 0;
|
|
|
}
|