Skip to content

Commit

Permalink
mlx4_en: Fix QP number calculation according to module param
Browse files Browse the repository at this point in the history
Number of bits taken from mac table index in QP
calculation should be based on log_num_mac parameter.

Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Guller authored and David S. Miller committed Oct 10, 2011
1 parent 7398af4 commit 999bb4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx4/en_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
memset(context, 0, sizeof *context);

context->base_qpn = cpu_to_be32(base_qpn);
context->n_mac = 0x2;
context->n_mac = dev->caps.log_num_macs;
context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT |
base_qpn);
context->mcast = cpu_to_be32(m_promisc << SET_PORT_MC_PROMISC_SHIFT |
Expand Down

0 comments on commit 999bb4b

Please sign in to comment.