]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down()
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 12 May 2022 02:17:31 +0000 (19:17 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 May 2022 17:01:36 +0000 (10:01 -0700)
commita137b5a8da97620d61dc5c6e6cf6358dbe79750d
treee0a03f6b876065edee23644ed24f71717f97c92c
parent2041cb2ec041d4bc5a49f535b2b8f6d1da796359
net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down()

After commit cf4c8be85f63 ("net: dsa/bcm_sf2: fix incorrect usage of
state->link") the interface suspend path would call our mac_link_down()
call back which would forcibly set the link down, thus preventing
Wake-on-LAN packets from reaching our management port.

Fix this by looking at whether the port is enabled for Wake-on-LAN and
not clearing the link status in that case to let packets go through.

Fixes: cf4c8be85f63 ("net: dsa/bcm_sf2: fix incorrect usage of state->link")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220512021731.2494261-1-f.fainelli@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/bcm_sf2.c