net/mlx4: Avoid dealing with MAC index in UPDATE_QP wrapper if not needed
authorMatan Barak <matanb@mellanox.com>
Wed, 10 Sep 2014 13:41:55 +0000 (16:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Sep 2014 22:21:34 +0000 (15:21 -0700)
commitb7834758e6f33da401f584035f1b6b62d0672aab
treedab363af1a4d20eb424b80e05f0028ada65e3dbe
parent311be98a3cca6469adf369714d689f9bbf286190
net/mlx4: Avoid dealing with MAC index in UPDATE_QP wrapper if not needed

The current wrapper implementation of the UPDATE_QP command tries to get
the MAC index, even if MAC wasn't set by the VF. Fix it up to only handle
the MAC field if it's valid.

Fixes: ce8d9e0 ('net/mlx4_core: Add UPDATE_QP SRIOV wrapper support')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c