ice: Use port number instead of PF ID for WoL
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Fri, 26 Feb 2021 21:19:30 +0000 (13:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:42:00 +0000 (08:42 +0200)
commit9d1c342c5018ff5e7cbe1fc7d82e9b4e4d8afea8
treeb643276805dc0cab8c861d0854fd991bc27780eb
parentb6968611029127ca6450421b2441ed9701a9b784
ice: Use port number instead of PF ID for WoL

commit 3176551979b92b02756979c0f1e2d03d1fc82b1e upstream.

As per the spec, the WoL control word read from the NVM should be
interpreted as port numbers, and not PF numbers. So when checking
if WoL supported, use the port number instead of the PF ID.

Also, ice_is_wol_supported doesn't really need a pointer to the pf
struct, but just needs a pointer to the hw instance.

Fixes: 769c500dcc1e ("ice: Add advanced power mgmt for WoL")
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/ice/ice_main.c