aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/rfkill.h
diff options
context:
space:
mode:
authorStefano Brivio <stefano.brivio@polimi.it>2007-11-06 16:48:45 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:30 -0500
commitdb9683fb19a0f0da1cb4c296ffe1a8db03333cbc (patch)
tree86f2c14df0e7cce871d52df687c3b59ccaab1673 /drivers/net/wireless/b43legacy/rfkill.h
parent33a3dc9328ce3a89d3490a47197851f5dac4b6b5 (diff)
b43legacy: rewrite and fix rfkill initialization
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. The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to b43legacy. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/rfkill.h')
-rw-r--r--drivers/net/wireless/b43legacy/rfkill.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43legacy/rfkill.h b/drivers/net/wireless/b43legacy/rfkill.h
index b68215e788e2..11150a8032f0 100644
--- a/drivers/net/wireless/b43legacy/rfkill.h
+++ b/drivers/net/wireless/b43legacy/rfkill.h
@@ -16,14 +16,14 @@ struct b43legacy_rfkill {
16 struct rfkill *rfkill; 16 struct rfkill *rfkill;
17 /* The poll device for the RFKILL input button */ 17 /* The poll device for the RFKILL input button */
18 struct input_polled_dev *poll_dev; 18 struct input_polled_dev *poll_dev;
19 /* Did initialization succeed? Used for freeing. */
20 bool registered;
19 /* The unique name of this rfkill switch */ 21 /* The unique name of this rfkill switch */
20 char name[32]; 22 char name[sizeof("b43legacy-phy4294967295")];
21}; 23};
22 24
23/* All the init functions return void, because we are not interested 25/* The init function returns void, because we are not interested
24 * in failing the b43 init process when rfkill init failed. */ 26 * in failing the b43 init process when rfkill init failed. */
25void b43legacy_rfkill_alloc(struct b43legacy_wldev *dev);
26void b43legacy_rfkill_free(struct b43legacy_wldev *dev);
27void b43legacy_rfkill_init(struct b43legacy_wldev *dev); 27void b43legacy_rfkill_init(struct b43legacy_wldev *dev);
28void b43legacy_rfkill_exit(struct b43legacy_wldev *dev); 28void b43legacy_rfkill_exit(struct b43legacy_wldev *dev);
29 29