aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/rfkill.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-11-03 09:34:32 -0400
committerJeff Garzik <jeff@garzik.org>2007-11-10 04:25:12 -0500
commit35c7e6602b81bdacb745f04236a419402777139e (patch)
tree4ee928ff39b6b6bb09677399b9e1c1772ee445e8 /drivers/net/wireless/b43/rfkill.h
parent30c4ae42317666f3aeed658cdb8803c84ac6fe77 (diff)
b43: Rewrite and fix rfkill init
The rfkill subsystem doesn't like code like that rfkill_allocate(); rfkill_register(); rfkill_unregister(); rfkill_register(); /* <- This will crash */ This sequence happens with modprobe b43 ifconfig wlanX up ifconfig wlanX down ifconfig wlanX up Fix this by always re-allocating the rfkill stuff before register. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/rfkill.h')
-rw-r--r--drivers/net/wireless/b43/rfkill.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/wireless/b43/rfkill.h b/drivers/net/wireless/b43/rfkill.h
index 29544e8c9e5f..adacf936d815 100644
--- a/drivers/net/wireless/b43/rfkill.h
+++ b/drivers/net/wireless/b43/rfkill.h
@@ -15,14 +15,14 @@ struct b43_rfkill {
15 struct rfkill *rfkill; 15 struct rfkill *rfkill;
16 /* The poll device for the RFKILL input button */ 16 /* The poll device for the RFKILL input button */
17 struct input_polled_dev *poll_dev; 17 struct input_polled_dev *poll_dev;
18 /* Did initialization succeed? Used for freeing. */
19 bool registered;
18 /* The unique name of this rfkill switch */ 20 /* The unique name of this rfkill switch */
19 char name[32]; 21 char name[sizeof("b43-phy4294967295")];
20}; 22};
21 23
22/* All the init functions return void, because we are not interested 24/* The init function returns void, because we are not interested
23 * in failing the b43 init process when rfkill init failed. */ 25 * in failing the b43 init process when rfkill init failed. */
24void b43_rfkill_alloc(struct b43_wldev *dev);
25void b43_rfkill_free(struct b43_wldev *dev);
26void b43_rfkill_init(struct b43_wldev *dev); 26void b43_rfkill_init(struct b43_wldev *dev);
27void b43_rfkill_exit(struct b43_wldev *dev); 27void b43_rfkill_exit(struct b43_wldev *dev);
28 28
@@ -36,12 +36,6 @@ struct b43_rfkill {
36 /* empty */ 36 /* empty */
37}; 37};
38 38
39static inline void b43_rfkill_alloc(struct b43_wldev *dev)
40{
41}
42static inline void b43_rfkill_free(struct b43_wldev *dev)
43{
44}
45static inline void b43_rfkill_init(struct b43_wldev *dev) 39static inline void b43_rfkill_init(struct b43_wldev *dev)
46{ 40{
47} 41}