aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/examples
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-02-27 16:46:02 (GMT)
committerJouni Malinen <j@w1.fi>2010-02-27 16:46:02 (GMT)
commit207ef3fb12b713e9432d0eca81d0632c124ee271 (patch)
treeb41a27b6d443e24d88e7b250a6075cc45c8083ad /wpa_supplicant/examples
parentbe8be6717d0fc9568b436826453ed8541a017f5b (diff)
downloadhostap-207ef3fb12b713e9432d0eca81d0632c124ee271.zip
hostap-207ef3fb12b713e9432d0eca81d0632c124ee271.tar.gz
hostap-207ef3fb12b713e9432d0eca81d0632c124ee271.tar.bz2
Add suspend/resume notifications
wpa_supplicant can now be notified of suspend/resume events, e.g., from pm-action scripts. This allows wpa_supplicant to clear information that may become invalid during a suspend operation.
Diffstat (limited to 'wpa_supplicant/examples')
-rwxr-xr-xwpa_supplicant/examples/60_wpa_supplicant17
1 files changed, 17 insertions, 0 deletions
diff --git a/wpa_supplicant/examples/60_wpa_supplicant b/wpa_supplicant/examples/60_wpa_supplicant
new file mode 100755
index 0000000..f570ad3
--- /dev/null
+++ b/wpa_supplicant/examples/60_wpa_supplicant
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# /etc/pm/sleep.d/60_wpa_supplicant
+# Action script to notify wpa_supplicant of pm-action events.
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+WPACLI=wpa_cli
+
+case "$1" in
+ suspend|hibernate)
+ $WPACLI suspend
+ ;;
+ resume|thaw)
+ $WPACLI resume
+ ;;
+esac