diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00rfkill.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00rfkill.c b/drivers/net/wireless/rt2x00/rt2x00rfkill.c index db513f141bec..16d365deefd1 100644 --- a/drivers/net/wireless/rt2x00/rt2x00rfkill.c +++ b/drivers/net/wireless/rt2x00/rt2x00rfkill.c | |||
@@ -94,6 +94,13 @@ int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) | |||
94 | return retval; | 94 | return retval; |
95 | } | 95 | } |
96 | 96 | ||
97 | /* | ||
98 | * Force initial poll which will detect the initial device state, | ||
99 | * and correctly sends the signal to the rfkill layer about this | ||
100 | * state. | ||
101 | */ | ||
102 | rt2x00rfkill_poll(rt2x00dev->poll_dev); | ||
103 | |||
97 | return 0; | 104 | return 0; |
98 | } | 105 | } |
99 | 106 | ||
@@ -121,7 +128,7 @@ int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) | |||
121 | 128 | ||
122 | rt2x00dev->rfkill->name = rt2x00dev->ops->name; | 129 | rt2x00dev->rfkill->name = rt2x00dev->ops->name; |
123 | rt2x00dev->rfkill->data = rt2x00dev; | 130 | rt2x00dev->rfkill->data = rt2x00dev; |
124 | rt2x00dev->rfkill->state = rt2x00dev->ops->lib->rfkill_poll(rt2x00dev); | 131 | rt2x00dev->rfkill->state = -1; |
125 | rt2x00dev->rfkill->toggle_radio = rt2x00rfkill_toggle_radio; | 132 | rt2x00dev->rfkill->toggle_radio = rt2x00rfkill_toggle_radio; |
126 | 133 | ||
127 | rt2x00dev->poll_dev = input_allocate_polled_device(); | 134 | rt2x00dev->poll_dev = input_allocate_polled_device(); |