net: systemport: Fix WoL with password after deep sleep
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 1 Feb 2019 21:23:38 +0000 (13:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Feb 2019 19:23:50 +0000 (11:23 -0800)
commit8dfb8d2cceb76b74ad5b58cc65c75994329b4d5e
treea6a27afc8a495e40f30e5c873c0eb4946f1b3337
parent2348bb3117e1c88fd7799cd751200eda84b55c23
net: systemport: Fix WoL with password after deep sleep

Broadcom STB chips support a deep sleep mode where all register
contents are lost. Because we were stashing the MagicPacket password
into some of these registers a suspend into that deep sleep then a
resumption would not lead to being able to wake-up from MagicPacket with
password again.

Fix this by keeping a software copy of the password and program it
during suspend.

Fixes: 83e82f4c706b ("net: systemport: add Wake-on-LAN support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/bcmsysport.h