]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Do not assume DSA master supports WoL
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 15 Feb 2019 20:16:52 +0000 (12:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Feb 2019 04:37:54 +0000 (20:37 -0800)
commitd291f9f4c902ffb509705eb7f7052b9bc75ec725
tree56a54245f2d1bb7e6133bcfa6defafd0cc7ff267
parentac3e7b7d9dd66a0734b19be7477a6ee3d472b28b
net: dsa: bcm_sf2: Do not assume DSA master supports WoL

We assume in the bcm_sf2 driver that the DSA master network device
supports ethtool_ops::{get,set}_wol operations, which is not a given.
Avoid de-referencing potentially non-existent function pointers and
check them as we should.

Fixes: 96fc5ad4232b ("net: dsa: bcm_sf2: add support for Wake-on-LAN")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c