]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: fix build error without CONFIG_SYSFS
authorTobias Regnery <tobias.regnery@gmail.com>
Wed, 5 Apr 2017 09:11:10 +0000 (11:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 19:55:36 +0000 (12:55 -0700)
commita2f8e961a94a94cf3a3e8c47747649e151a3628c
treeb2bd03b24343ddb6c10d09a34c48d4cb41374c22
parentf0e5ce9bc1432c4a34f7cdf6c3666f87183668fe
net/mlx5e: fix build error without CONFIG_SYSFS

Commit cfcf43ca535c ("net/mlx5e: Minimize mlx5e_{open/close}_locked")
copied the calls to netif_set_real_num_{tx,rx}_queues from
mlx5e_open_locked to mlx5e_activate_priv_channels and wraps them in an
if condition to test for netdev->real_num_{tx,rx}_queues.

But netdev->real_num_rx_queues is conditionally compiled in if CONFIG_SYSFS
is set. Without CONFIG_SYSFS the build fails:

drivers/net/ethernet/mellanox/mlx5/core/en_main.c: In function 'mlx5e_activate_priv_channels':
drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2515:12: error: 'struct net_device' has no member named 'real_num_rx_queues'; did you mean 'real_num_tx_queues'?

Fix this by unconditionally call netif_set_real_num{tx,rx}_queues like before
commit cfcf43ca535c.

Fixes: cfcf43ca535c ("net/mlx5e: Minimize mlx5e_{open/close}_locked")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c