]> git.hungrycats.org Git - linux/commit
net/mlx4_en: Prevent setting invalid RSS hash function
authorAmir Vadai <amirv@mellanox.com>
Mon, 27 Apr 2015 10:40:56 +0000 (13:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:01:39 +0000 (22:01 +0200)
commit8272d13a37c46c03d382609876476850d2a96dfe
tree7bcc66a2319367f68ff641c2c80a811fe68750ec
parentb3b8ae82113c38559c04311de3611fa642c87709
net/mlx4_en: Prevent setting invalid RSS hash function

[ Upstream commit b37069090b7c5615610a8aa6b36533d67b364d38 ]

mlx4_en_check_rxfh_func() was checking for hardware support before
setting a known RSS hash function, but didn't do any check before
setting unknown RSS hash function. Need to make it fail on such values.
In this occasion, moved the actual setting of the new value from the
check function into mlx4_en_set_rxfh().

Fixes: 947cbb0 ("net/mlx4_en: Support for configurable RSS hash function")
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c