diff options
-rw-r--r-- | include/linux/rfkill.h | 2 | ||||
-rw-r--r-- | net/rfkill/input.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 97059d08a626..4f82326eb294 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -29,7 +29,7 @@ | |||
29 | /** | 29 | /** |
30 | * enum rfkill_type - type of rfkill switch. | 30 | * enum rfkill_type - type of rfkill switch. |
31 | * | 31 | * |
32 | * @RFKILL_TYPE_ALL: toggles all switches (userspace only) | 32 | * @RFKILL_TYPE_ALL: toggles all switches (requests only - not a switch type) |
33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. | 33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. |
34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. | 34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. |
35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. | 35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. |
diff --git a/net/rfkill/input.c b/net/rfkill/input.c index a7295ad5f9cb..3713d7ecab96 100644 --- a/net/rfkill/input.c +++ b/net/rfkill/input.c | |||
@@ -212,6 +212,9 @@ static void rfkill_event(struct input_handle *handle, unsigned int type, | |||
212 | case KEY_WIMAX: | 212 | case KEY_WIMAX: |
213 | rfkill_schedule_toggle(RFKILL_TYPE_WIMAX); | 213 | rfkill_schedule_toggle(RFKILL_TYPE_WIMAX); |
214 | break; | 214 | break; |
215 | case KEY_RFKILL: | ||
216 | rfkill_schedule_toggle(RFKILL_TYPE_ALL); | ||
217 | break; | ||
215 | } | 218 | } |
216 | } else if (type == EV_SW && code == SW_RFKILL_ALL) | 219 | } else if (type == EV_SW && code == SW_RFKILL_ALL) |
217 | rfkill_schedule_evsw_rfkillall(data); | 220 | rfkill_schedule_evsw_rfkillall(data); |
@@ -295,6 +298,11 @@ static const struct input_device_id rfkill_ids[] = { | |||
295 | .keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) }, | 298 | .keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) }, |
296 | }, | 299 | }, |
297 | { | 300 | { |
301 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
302 | .evbit = { BIT_MASK(EV_KEY) }, | ||
303 | .keybit = { [BIT_WORD(KEY_RFKILL)] = BIT_MASK(KEY_RFKILL) }, | ||
304 | }, | ||
305 | { | ||
298 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT, | 306 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT, |
299 | .evbit = { BIT(EV_SW) }, | 307 | .evbit = { BIT(EV_SW) }, |
300 | .swbit = { [BIT_WORD(SW_RFKILL_ALL)] = BIT_MASK(SW_RFKILL_ALL) }, | 308 | .swbit = { [BIT_WORD(SW_RFKILL_ALL)] = BIT_MASK(SW_RFKILL_ALL) }, |