ramips: use rfkill for wps button on wlan only boards
authorMathias Kresin <dev@kresin.me>
Mon, 26 Sep 2016 18:56:13 +0000 (20:56 +0200)
committerMathias Kresin <dev@kresin.me>
Sat, 15 Oct 2016 07:01:45 +0000 (09:01 +0200)
All of the touched boards don't have an ethernet port. Allow to use the
wps button on these boards to enable the wireless radio after boot.

The force enabled wireless for the DCH-M225 is removed. It is reckless
to bring up an unencrypted wireless network by default these days.

Using the wps button to bring up the radio seam to me the better
approach.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ramips/base-files/etc/uci-defaults/03_wireless [deleted file]
target/linux/ramips/dts/DCH-M225.dts
target/linux/ramips/dts/F7C027.dts
target/linux/ramips/dts/MLW221.dts
target/linux/ramips/dts/MLWG2.dts
target/linux/ramips/dts/MZK-EX300NP.dts
target/linux/ramips/dts/MZK-EX750NP.dts

diff --git a/target/linux/ramips/base-files/etc/uci-defaults/03_wireless b/target/linux/ramips/base-files/etc/uci-defaults/03_wireless
deleted file mode 100644 (file)
index bf8c009..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-
-[ ! -e /etc/config/wireless ] && exit 0
-
-. /lib/functions/system.sh
-. /lib/ramips.sh
-
-board=$(ramips_board_name)
-
-case "$board" in
-dch-m225)
-       uci set wireless.@wifi-device[0].disabled=0
-       ;;
-esac
-
-uci commit wireless
-
-exit 0
index 3c2de8d5c519e7dc761449b7eacd3f8b0fb1f2f6..c5a189b775b96c3128a1fcb4bc923dff497a203a 100644 (file)
@@ -15,7 +15,7 @@
                wps {
                        label = "wps";
                        gpios = <&gpio0 11 1>;
-                       linux,code = <0x211>;
+                       linux,code = <0xf7>;
                };
 
                reset {
index 6214c85d03789731af8fd3581f429a06b1478c72..c8ed765df284de7998d84176a220761d1b5ae8eb 100644 (file)
@@ -37,7 +37,7 @@
                poll-interval = <20>;
 
                top {
-                       label = "top";
+                       label = "restore";
                        gpios = <&gpio0 10 1>;
                        linux,code = <0x198>;
                };
                power {
                        label = "power";
                        gpios = <&gpio0 12 1>;
-                       linux,code = <0x100>;
+                       linux,code = <0xf7>;
                };
 
                sensor {
                        label = "sensor";
                        gpios = <&gpio0 14 1>;
-                       linux,code = <0x101>;
+                       linux,code = <0x100>;
                };
        };
 };
index 670a36aadb3675e5c5894582d71141993b69ffda..3406280a418f54733ff13374528d181fbcf1f6fd 100644 (file)
@@ -35,7 +35,7 @@
                system {
                        label = "system";
                        gpios = <&gpio0 2 1>;
-                       linux,code = <0x211>;
+                       linux,code = <0xf7>;
                };
        };
 };
index c9f61c735f373919131bf03cec6769454e6f82c7..aeedb464d51279d8dd586434b731763f00285a8c 100644 (file)
@@ -35,7 +35,7 @@
                system {
                        label = "system";
                        gpios = <&gpio0 2 1>;
-                       linux,code = <0x211>;
+                       linux,code = <0xf7>;
                };
        };
 };
index 05c79d3faf84fe0928a97eabc5f8cd4e52b0dfc7..4c87f90c56733438bfc85fb5b3a2c573bab4a8c5 100644 (file)
@@ -55,7 +55,7 @@
                wps {
                        label = "wps";
                        gpios = <&gpio1 3 0>;
-                       linux,code = <0x211>;
+                       linux,code = <0xf7>;
                };
        };
 };
index 565b4356f0f2a1047075c61e9a6e7ff03e136dd0..74f72f04cad760117152cf236051b89580a4b41a 100644 (file)
@@ -60,7 +60,7 @@
                wps {
                        label = "wps";
                        gpios = <&gpio0 13 0>;
-                       linux,code = <0x211>;
+                       linux,code = <0xf7>;
                };
        };
 };