igb: Use device_set_wakeup_enable
Since dev->power.should_wakeup bit is used by the PCI core to decide whether the device should wake up the system from sleep states, set/unset this bit whenever WOL is enabled/disabled using igb_set_wol(). Accordingly, use device_can_wakeup() for checking if wake-up is supported by the device. Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
de1264896c
commit
e1b86d8479
@@ -1244,6 +1244,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
|
||||
|
||||
/* initialize the wol settings based on the eeprom settings */
|
||||
adapter->wol = adapter->eeprom_wol;
|
||||
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
|
||||
|
||||
/* reset the hardware with the new settings */
|
||||
igb_reset(adapter);
|
||||
|
Reference in New Issue
Block a user