mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
ethtool: add support to disable WOL for broken drivers, add 'e1000e' as broken driver
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
f950f66005
commit
c025763aac
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user