]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Use static constant netdevice ndos
authorSaeed Mahameed <saeedm@mellanox.com>
Tue, 9 Feb 2016 12:57:44 +0000 (14:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2016 20:21:47 +0000 (15:21 -0500)
commitca755e8629773a0d56c4b0016d1d7c7d04ad458a
tree5e0b852d33f65cc72c30fdac8ae787cbb4140575
parent67aa9f25e181ed5e6d9f69c6e3e14c6738e1738e
net/mlx5e: Use static constant netdevice ndos

Currently our netdevice ops is a one static global variable which
is referenced by all mlx5e netdevice instances. This can be
problematic when different driver instances do not share same
HW capabilities (e.g SRIOV PF and VFs probed to the host).

Now we have two constant global netdevice ops variables, one
for basic netdevice ops and the other with extended SRIOV ops,
on netdevice construction we choose the one suitable for
current device capabilities.

Fixes: 094e3a5884d4 ("net/mlx5e: Add support for SR-IOV ndos")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c