Skip to content

Commit

Permalink
turn wifi power saving mode off per default in case wifi is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Jan 13, 2025
1 parent ef714cf commit f50d30d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ if [[ -f /var/status/hasIP ]] &&
# if not required
case "${IFACE}" in
wlan*)
/usr/sbin/iw dev "${IFACE}" set power_save on
/usr/sbin/rfkill block wlan
;;
esac
Expand Down Expand Up @@ -115,6 +116,8 @@ case "${IFACE}" in
# if /etc/config/wpa_supplicant.conf exists, bring up
# the WiFi connection.
if [[ -s /etc/config/wpa_supplicant.conf ]]; then
# turn power save off and set link up
/usr/sbin/iw dev "${IFACE}" set power_save off
/sbin/ip link set "${IFACE}" up
sleep 5
/usr/sbin/rfkill unblock wlan
Expand All @@ -124,6 +127,7 @@ case "${IFACE}" in
echo -n " no config, "
# make sure that the wifi power is disabled
# if not required
/usr/sbin/iw dev "${IFACE}" set power_save on
/usr/sbin/rfkill block wlan
exit 1
fi
Expand Down

0 comments on commit f50d30d

Please sign in to comment.