diff --git a/packages/network/ethtool/udev.d/99-wakeup-eth.rules b/packages/network/ethtool/udev.d/99-wakeup-eth.rules index 1c17fe9892..c8ec1ed4e3 100644 --- a/packages/network/ethtool/udev.d/99-wakeup-eth.rules +++ b/packages/network/ethtool/udev.d/99-wakeup-eth.rules @@ -18,10 +18,20 @@ ################################################################################ ACTION!="add|change", GOTO="end" -SUBSYSTEM!="net", GOTO="end" -ENV{INTERFACE}!="eth*", GOTO="end" +SUBSYSTEM!="net", ENV{INTERFACE}!="eth*", GOTO="end" +# Broken drivers, usually they break suspend/wakeup +DRIVERS=="e1000e", GOTO="broken" + +# enable WOL and wakeup support +LABEL="begin" RUN+="/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup' " RUN+="/usr/sbin/ethtool -s $env{INTERFACE} wol g" +GOTO="end" + +# disable WOL for broken drivers +LABEL="broken" +RUN+="/usr/sbin/ethtool -s $env{INTERFACE} wol d" +GOTO="end" LABEL="end"