ionic: VF initial random MAC address if no assigned mac
authorR Mohamed Shah <mohamed@pensando.io>
Wed, 24 Aug 2022 16:50:51 +0000 (09:50 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Aug 2022 19:39:54 +0000 (12:39 -0700)
commit19058be7c48ceb3e60fa3948e24da1059bd68ee4
tree0a87f70ab916b4047f2f32c055ee08116c0e1c62
parent0fc4dd452d6c14828eed6369155c75c0ac15bab3
ionic: VF initial random MAC address if no assigned mac

Assign a random mac address to the VF interface station
address if it boots with a zero mac address in order to match
similar behavior seen in other VF drivers.  Handle the errors
where the older firmware does not allow the VF to set its own
station address.

Newer firmware will allow the VF to set the station mac address
if it hasn't already been set administratively through the PF.
Setting it will also be allowed if the VF has trust.

Fixes: fbb39807e9ae ("ionic: support sr-iov operations")
Signed-off-by: R Mohamed Shah <mohamed@pensando.io>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_lif.c