]> git.baikalelectronics.ru Git - kernel.git/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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Apr 2015 17:36:48 +0000 (13:36 -0400)
commit013ff714265378f470012044dc4c0a0f032d2da4
tree51016dd7408b67d63b09da9c8f3d024f0a67bcac
parentc3a1d98e18fc1159c31603fb96d25d9e22c1e2cd
net/mlx4_en: Prevent setting invalid RSS hash function

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: 5f6003a ("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>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c