diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-03-13 10:38:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-13 15:57:26 -0400 |
commit | 1682fe6de206bd1e937529cbb393915e5ea40b2c (patch) | |
tree | 4890282b3ea30708d27667015664d6b742261277 /drivers/net/wireless/rt2x00/rt2x00lib.h | |
parent | f50e4a8494a74bdbc0f86f1430a4cca2a4f28799 (diff) |
rt2x00: Add suspend/resume handlers to rt2x00rfkill
Add suspend/resume handlers to rt2x00rfkill to have it stop
the input-polldev and prevent it from calling rt2x00 during
suspend period. This could lead to a NULL pointer fault when
rt2x00 suspended, but polldev send a request, because
the csr_addr is NULL.
Also don't let the rfkill allocation/registration block
the initialization of the entire device. Just print a warning
and continue as if nothing happened.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00lib.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 1adbd28e0973..ce58c654ade1 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -100,28 +100,36 @@ static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | |||
100 | * RFkill handlers. | 100 | * RFkill handlers. |
101 | */ | 101 | */ |
102 | #ifdef CONFIG_RT2X00_LIB_RFKILL | 102 | #ifdef CONFIG_RT2X00_LIB_RFKILL |
103 | int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev); | 103 | void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev); |
104 | void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); | 104 | void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); |
105 | int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); | 105 | void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); |
106 | void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); | 106 | void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); |
107 | void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev); | ||
108 | void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev); | ||
107 | #else | 109 | #else |
108 | static inline int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) | 110 | static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) |
109 | { | 111 | { |
110 | return 0; | ||
111 | } | 112 | } |
112 | 113 | ||
113 | static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) | 114 | static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) |
114 | { | 115 | { |
115 | } | 116 | } |
116 | 117 | ||
117 | static inline int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) | 118 | static inline void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) |
118 | { | 119 | { |
119 | return 0; | ||
120 | } | 120 | } |
121 | 121 | ||
122 | static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) | 122 | static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) |
123 | { | 123 | { |
124 | } | 124 | } |
125 | |||
126 | static inline void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev) | ||
127 | { | ||
128 | } | ||
129 | |||
130 | static inline void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev) | ||
131 | { | ||
132 | } | ||
125 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ | 133 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ |
126 | 134 | ||
127 | #endif /* RT2X00LIB_H */ | 135 | #endif /* RT2X00LIB_H */ |