If the current VLAN anti spoof setting is same as the new value,
the firmware can return an error. Call the HWRM command to update
the new setting if it is different from the current value.
Fixes:
36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
if (vf >= dev_info.max_vfs)
return -EINVAL;
+ if (on == bp->pf.vf_info[vf].vlan_spoof_en)
+ return 0;
+
rc = bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(bp, vf, on);
if (!rc) {
bp->pf.vf_info[vf].vlan_spoof_en = on;