net/mlx4_en: Fix wrong indication of Wake-on-LAN (WoL) support
authorInbar Karmy <inbark@mellanox.com>
Tue, 1 Aug 2017 13:43:43 +0000 (16:43 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:28 +0000 (13:34 +0000)
commit967d0125c4f681921cf805d0121b9f72f00e03f8
tree2858791caabfbc88ae2e6d67bc98a8536e2d7358
parent31c0eacab3d550945ced448b9e31280d0b9cc3e1
net/mlx4_en: Fix wrong indication of Wake-on-LAN (WoL) support

commit c994f778bb1cca8ebe7a4e528cefec233e93b5cc upstream.

Currently when WoL is supported but disabled, ethtool reports:
"Supports Wake-on: d".
Fix the indication of Wol support, so that the indication
remains "g" all the time if the NIC supports WoL.

Tested:
As accepted, when NIC supports WoL- ethtool reports:
Supports Wake-on: g
Wake-on: d
when NIC doesn't support WoL- ethtool reports:
        Supports Wake-on: d
        Wake-on: d

Fixes: 14c07b1358ed ("mlx4: Wake on LAN support")
Signed-off-by: Inbar Karmy <inbark@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/fw.h
drivers/net/ethernet/mellanox/mlx4/main.c
include/linux/mlx4/device.h