mlxsw: Fix bug in __mlxsw_item_bit_array_offset
authorIdo Schimmel <idosch@mellanox.com>
Thu, 8 Oct 2015 13:17:38 +0000 (15:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Oct 2015 12:08:09 +0000 (05:08 -0700)
commitbee1f753bfcb19660d8ad713b9dd3939630854b6
treedef6c0073fa9ac734c816f17b9fb1dd37260f939
parent4b0c2541cbf223abd38b235146e30a3d207d3bfe
mlxsw: Fix bug in __mlxsw_item_bit_array_offset

When calculating the shift needed in order to access a bit array element
in a byte, we should multiply the index by the element size and not
assume it is fixed at 2-bits.

Fixes: 93c1edb27f9e ("mlxsw: Introduce Mellanox switch driver core")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/item.h
This page took 0.030149 seconds and 5 git commands to generate.