Jesse Keating 2f82dda
diff --git a/include/linux/input.h b/include/linux/input.h
Jesse Keating 2f82dda
index 8b3bc3e..20a622e 100644
Jesse Keating 2f82dda
--- a/include/linux/input.h
Jesse Keating 2f82dda
+++ b/include/linux/input.h
Jesse Keating 2f82dda
@@ -595,6 +595,8 @@ struct input_absinfo {
Jesse Keating 2f82dda
 #define KEY_NUMERIC_STAR	0x20a
Jesse Keating 2f82dda
 #define KEY_NUMERIC_POUND	0x20b
Jesse Keating 2f82dda
 
Jesse Keating 2f82dda
+#define KEY_RFKILL		0x20c /* Key that controls all radios */
Jesse Keating 2f82dda
+
Jesse Keating 2f82dda
 /* We avoid low common keys in module aliases so they don't get huge. */
Jesse Keating 2f82dda
 #define KEY_MIN_INTERESTING	KEY_MUTE
Jesse Keating 2f82dda
 #define KEY_MAX			0x2ff
Jesse Keating 2f82dda
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
Jesse Keating 2f82dda
index 278777f..4c39f7e 100644
Jesse Keating 2f82dda
--- a/include/linux/rfkill.h
Jesse Keating 2f82dda
+++ b/include/linux/rfkill.h
Jesse Keating 2f82dda
@@ -32,7 +32,7 @@
Jesse Keating 2f82dda
 /**
Jesse Keating 2f82dda
  * enum rfkill_type - type of rfkill switch.
Jesse Keating 2f82dda
  *
Jesse Keating 2f82dda
- * @RFKILL_TYPE_ALL: toggles all switches (userspace only)
Jesse Keating 2f82dda
+ * @RFKILL_TYPE_ALL: toggles all switches (requests only - not a switch type)
Jesse Keating 2f82dda
  * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device.
Jesse Keating 2f82dda
  * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device.
Jesse Keating 2f82dda
  * @RFKILL_TYPE_UWB: switch is on a ultra wideband device.
Jesse Keating 2f82dda
diff --git a/net/rfkill/input.c b/net/rfkill/input.c
Jesse Keating 2f82dda
index a7295ad..3713d7e 100644
Jesse Keating 2f82dda
--- a/net/rfkill/input.c
Jesse Keating 2f82dda
+++ b/net/rfkill/input.c
Jesse Keating 2f82dda
@@ -212,6 +212,9 @@ static void rfkill_event(struct input_handle *handle, unsigned int type,
Jesse Keating 2f82dda
 		case KEY_WIMAX:
Jesse Keating 2f82dda
 			rfkill_schedule_toggle(RFKILL_TYPE_WIMAX);
Jesse Keating 2f82dda
 			break;
Jesse Keating 2f82dda
+		case KEY_RFKILL:
Jesse Keating 2f82dda
+			rfkill_schedule_toggle(RFKILL_TYPE_ALL);
Jesse Keating 2f82dda
+			break;
Jesse Keating 2f82dda
 		}
Jesse Keating 2f82dda
 	} else if (type == EV_SW && code == SW_RFKILL_ALL)
Jesse Keating 2f82dda
 		rfkill_schedule_evsw_rfkillall(data);
Jesse Keating 2f82dda
@@ -295,6 +298,11 @@ static const struct input_device_id rfkill_ids[] = {
Jesse Keating 2f82dda
 		.keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) },
Jesse Keating 2f82dda
 	},
Jesse Keating 2f82dda
 	{
Jesse Keating 2f82dda
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
Jesse Keating 2f82dda
+		.evbit = { BIT_MASK(EV_KEY) },
Jesse Keating 2f82dda
+		.keybit = { [BIT_WORD(KEY_RFKILL)] = BIT_MASK(KEY_RFKILL) },
Jesse Keating 2f82dda
+	},
Jesse Keating 2f82dda
+	{
Jesse Keating 2f82dda
 		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT,
Jesse Keating 2f82dda
 		.evbit = { BIT(EV_SW) },
Jesse Keating 2f82dda
 		.swbit = { [BIT_WORD(SW_RFKILL_ALL)] = BIT_MASK(SW_RFKILL_ALL) },