rpms/kernel/devel linux-2.6-rfkill-all.patch, NONE, 1.1 kernel.spec, 1.1791, 1.1792

Matthew Garrett mjg59 at fedoraproject.org
Thu Sep 10 17:29:34 UTC 2009


Author: mjg59

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25181

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-rfkill-all.patch 
Log Message:
* Thu Sep 10 2009 Matthew Garrett <mjg at redhat.com>
- linux-2.6-ahci-export-capabilities.patch: Backport from upstream
- linux-2.6-rtc-show-hctosys.patch: Export the hctosys state of an rtc
- linux-2.6-rfkill-all.patch: Support for keys that toggle all rfkill state


linux-2.6-rfkill-all.patch:
 include/linux/input.h  |    2 ++
 include/linux/rfkill.h |    2 +-
 net/rfkill/input.c     |    8 ++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

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


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1791
retrieving revision 1.1792
diff -u -p -r1.1791 -r1.1792
--- kernel.spec	10 Sep 2009 16:49:20 -0000	1.1791
+++ kernel.spec	10 Sep 2009 17:29:33 -0000	1.1792
@@ -730,6 +730,7 @@ Patch11010: via-hwmon-temp-sensor.patch
 Patch12010: linux-2.6-dell-laptop-rfkill-fix.patch
 Patch12011: linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch
 Patch12012: linux-2.6-rtc-show-hctosys.patch
+Patch12013: linux-2.6-rfkill-all.patch
 
 %endif
 
@@ -1359,6 +1360,7 @@ ApplyPatch v4l-dvb-fix-cx25840-firmware-
 
 # Patches headed upstream
 ApplyPatch linux-2.6-rtc-show-hctosys.patch
+ApplyPatch linux-2.6-rfkill-all.patch
 
 # END OF PATCH APPLICATIONS
 
@@ -2019,6 +2021,7 @@ fi
 * Thu Sep 10 2009 Matthew Garrett <mjg at redhat.com>
 - linux-2.6-ahci-export-capabilities.patch: Backport from upstream
 - linux-2.6-rtc-show-hctosys.patch: Export the hctosys state of an rtc
+- linux-2.6-rfkill-all.patch: Support for keys that toggle all rfkill state
 
 * Thu Sep 10 2009 Ben Skeggs <bskeggs at redhat.com>
 - drm-nouveau.patch: add some scaler-only modes for LVDS, GEM/TTM fixes




More information about the scm-commits mailing list