]> git.baikalelectronics.ru Git - kernel.git/commit
net: ena: fix incorrect test of supported hash function
authorSameeh Jubran <sameehj@amazon.com>
Wed, 1 May 2019 13:47:06 +0000 (16:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 May 2019 04:14:46 +0000 (00:14 -0400)
commit508e2c1b2d5bab950e580c701fff12d4cd36d342
treed64f582ed6fe5b9013d200103b492c3556a87835
parent93a90203da4a1bbf83f97e1c59fbae400563afbb
net: ena: fix incorrect test of supported hash function

ena_com_set_hash_function() tests if a hash function is supported
by the device before setting it.
The test returns the opposite result than needed.
Reverse the condition to return the correct value.
Also use the BIT macro instead of inline shift.

Fixes: e59074db59c6 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_com.c