This extends button-hotplug to map KEY_WLAN to rfkill hotplug
events, enabling /etc/rc.button/rfkill script to work properly on
routers with KEY_WLAN buttons.
---
package/kernel/button-hotplug/src/button-hotplug.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/kernel/button-hotplug/src/button-hotplug.c
b/package/kernel/button-hotplug/src/button-hotplug.c
index 684a0c6..ece65b8 100644
--- a/package/kernel/button-hotplug/src/button-hotplug.c
+++ b/package/kernel/button-hotplug/src/button-hotplug.c
@@ -85,6 +85,9 @@ static struct bh_map button_map[] = {
BH_MAP(BTN_9, "BTN_9"),
BH_MAP(KEY_RESTART, "reset"),
BH_MAP(KEY_POWER, "power"),
+#ifdef KEY_WLAN
+ BH_MAP(KEY_WLAN, "rfkill"),
+#endif /* KEY_WLAN */
#ifdef KEY_WPS_BUTTON
BH_MAP(KEY_WPS_BUTTON, "wps"),
#endif /* KEY_WPS_BUTTON */
--
1.8.1.5
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel