aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rfkill.h
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2008-11-21 20:40:09 -0200
committerJohn W. Linville <linville@tuxdriver.com>2008-11-26 09:47:43 -0500
commitf80b5e99c7dac5a9a0d72496cec5075a12cd1476 (patch)
tree493b11de9639655fbf2a9431f9def759ab3f6a27 /include/linux/rfkill.h
parentmac80211: Look out for some other AP when disassoc is received. (diff)
downloadlinux-dev-f80b5e99c7dac5a9a0d72496cec5075a12cd1476.tar.xz
linux-dev-f80b5e99c7dac5a9a0d72496cec5075a12cd1476.zip
rfkill: preserve state across suspend
The rfkill class API requires that the driver connected to a class call rfkill_force_state() on resume to update the real state of the rfkill controller, OR that it provides a get_state() hook. This means there is potentially a hidden call in the resume code flow that changes rfkill->state (i.e. rfkill_force_state()), so the previous state of the transmitter was being lost. The simplest and most future-proof way to fix this is to explicitly store the pre-sleep state on the rfkill structure, and restore from that on resume. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/rfkill.h')
-rw-r--r--include/linux/rfkill.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 4cd64b0d9825..f376a93927f7 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -108,6 +108,7 @@ struct rfkill {
struct device dev;
struct list_head node;
+ enum rfkill_state state_for_resume;
};
#define to_rfkill(d) container_of(d, struct rfkill, dev)