]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_dpipe: Fix incorrect entry index
authorArkadi Sharshevsky <arkadis@mellanox.com>
Thu, 18 May 2017 07:18:52 +0000 (09:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 May 2017 15:03:59 +0000 (11:03 -0400)
commit89b5fb9e0b1951fb773b406693bbb1272f8bf95a
treea770e80dddf42bad8858d6efd5288833d9552332
parent6927e3a89cd49ea808ff714c20b5e56340113e8f
mlxsw: spectrum_dpipe: Fix incorrect entry index

In case of disabled counters the entry index will be incorrect. Fix this
by moving the entry index set before the counter status check.

Fixes: db48deb9e4e6 ("mlxsw: spectrum: Add Support for erif table entries access")
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Reviewed-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/spectrum_dpipe.c