mlx4_en: Fix QP number calculation according to module param
authorAlexander Guller <alexg@mellanox.com>
Sun, 9 Oct 2011 05:29:26 +0000 (05:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Oct 2011 03:42:57 +0000 (23:42 -0400)
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>
drivers/net/ethernet/mellanox/mlx4/en_port.c

index 5ada5b4691127fa54026619d20de17596dac9581..8824309bb6253202863ddb72191640875521c13c 100644 (file)
@@ -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 |