I'd like to suggest a patch to properly name the wifi button as 'wifi' instead
of 'BTN_2'.
This could also be applied to other devices.
Signed-off-by: João Chainho <[email protected]>
---
package/system/gpio-button-hotplug/src/gpio-button-hotplug.c
| 3 ++
target/linux/ar71xx/patches-3.8/616-MIPS-ath79-wndr3700-wifi-button-name-patch
| 11 ++++++++++
2 files changed, 14 insertions(+)
Index:
target/linux/ar71xx/patches-3.8/616-MIPS-ath79-wndr3700-wifi-button-name-patch
===================================================================
---
target/linux/ar71xx/patches-3.8/616-MIPS-ath79-wndr3700-wifi-button-name-patch
(revision 0)
+++
target/linux/ar71xx/patches-3.8/616-MIPS-ath79-wndr3700-wifi-button-name-patch
(working copy)
@@ -0,0 +1,11 @@
+--- a/arch/mips/ath79/mach-wndr3700.c 2013-02-28 23:44:24.630816388 +0000
++++ b/arch/mips/ath79/mach-wndr3700.c 2013-02-28 23:50:55.271980731 +0000
+@@ -91,7 +91,7 @@ static struct gpio_keys_button wndr3700_
+ }, {
+ .desc = "wifi",
+ .type = EV_KEY,
+- .code = BTN_2,
++ .code = KEY_WLAN,
+ .debounce_interval = WNDR3700_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = WNDR3700_GPIO_BTN_WIFI,
+ .active_low = 1,
Index: package/system/gpio-button-hotplug/src/gpio-button-hotplug.c
===================================================================
--- package/system/gpio-button-hotplug/src/gpio-button-hotplug.c
(revision 35879)
+++ package/system/gpio-button-hotplug/src/gpio-button-hotplug.c
(working copy)
@@ -94,6 +94,9 @@
#ifdef KEY_WPS_BUTTON
BH_MAP(KEY_WPS_BUTTON, "wps"),
#endif /* KEY_WPS_BUTTON */
+#ifdef KEY_WLAN
+ BH_MAP(KEY_WLAN, "wifi"),
+#endif /* KEY_WIFI_BUTTON */
};
/* -------------------------------------------------------------------------*/_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel