Subject: [PATCH net-next 7/7] net: dsa: bcm_sf2: Support WAKE_FILTER

From: Florian Fainelli <[email-masked]>
Date: Tue, 17 Jul 2018 08:36:45 -0700

Propagate wol->sopass when WAKE_FILTER is set since that contains the
bitmap of filters to be enabled for wake-up.

Signed-off-by: Florian Fainelli <[email-masked]>
---
 drivers/net/dsa/bcm_sf2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index e0066adcd2f3..ca562cf6ffd2 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -741,7 +741,7 @@ static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port,
 	wol->supported = pwol.supported;
 	memset(&wol->sopass, 0, sizeof(wol->sopass));
 
-	if (pwol.wolopts & WAKE_MAGICSECURE)
+	if (pwol.wolopts & (WAKE_MAGICSECURE | WAKE_FILTER))
 		memcpy(&wol->sopass, pwol.sopass, sizeof(wol->sopass));
 
 	if (priv->wol_ports_mask & (1 << port))
-- 
2.14.1