]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5f88bad79414e85f6aeed1a1641dc7f6c742446a
tree0a87f70ab916b4047f2f32c055ee08116c0e1c62
parentfd679ccbcb57db26b757ec1f7e82f9de34280ef9
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: 891d6f039073 ("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