The default MAC address is read from hardware and copied to
Device Ethernet Link address array in the device initialization phase,
which bypasses fm10k MAC address number check mechanism,
and will cause an error message when adding default VLAN:
"MAC address number not match"
Fix it by moving default MAC address registration to device
initialize phase.
Fixes:
f5c1a236a218 ("fm10k: fix default mac/vlan in switch")
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
}
}
- if (hw->mac.default_vid && hw->mac.default_vid <= ETHER_MAX_VLAN_ID) {
- /* Update default vlan */
+ /* Update default vlan */
+ if (hw->mac.default_vid && hw->mac.default_vid <= ETHER_MAX_VLAN_ID)
fm10k_vlan_filter_set(dev, hw->mac.default_vid, true);
- /* Add default mac/vlan filter to PF/Switch manager */
- fm10k_MAC_filter_set(dev, hw->mac.addr, true);
- }
-
return 0;
}
fm10k_mbx_unlock(hw);
+ /* Add default mac address */
+ fm10k_MAC_filter_set(dev, hw->mac.addr, true);
return 0;
}