ramips: use rfkill for wps button on wlan only boards

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>
This commit is contained in:
Mathias Kresin 2016-09-26 20:56:13 +02:00
parent 0a219c8dfb
commit bcfbeae79f
7 changed files with 8 additions and 29 deletions

View File

@ -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

View File

@ -15,7 +15,7 @@
wps { wps {
label = "wps"; label = "wps";
gpios = <&gpio0 11 1>; gpios = <&gpio0 11 1>;
linux,code = <0x211>; linux,code = <0xf7>;
}; };
reset { reset {

View File

@ -37,7 +37,7 @@
poll-interval = <20>; poll-interval = <20>;
top { top {
label = "top"; label = "restore";
gpios = <&gpio0 10 1>; gpios = <&gpio0 10 1>;
linux,code = <0x198>; linux,code = <0x198>;
}; };
@ -45,13 +45,13 @@
power { power {
label = "power"; label = "power";
gpios = <&gpio0 12 1>; gpios = <&gpio0 12 1>;
linux,code = <0x100>; linux,code = <0xf7>;
}; };
sensor { sensor {
label = "sensor"; label = "sensor";
gpios = <&gpio0 14 1>; gpios = <&gpio0 14 1>;
linux,code = <0x101>; linux,code = <0x100>;
}; };
}; };
}; };

View File

@ -35,7 +35,7 @@
system { system {
label = "system"; label = "system";
gpios = <&gpio0 2 1>; gpios = <&gpio0 2 1>;
linux,code = <0x211>; linux,code = <0xf7>;
}; };
}; };
}; };

View File

@ -35,7 +35,7 @@
system { system {
label = "system"; label = "system";
gpios = <&gpio0 2 1>; gpios = <&gpio0 2 1>;
linux,code = <0x211>; linux,code = <0xf7>;
}; };
}; };
}; };

View File

@ -55,7 +55,7 @@
wps { wps {
label = "wps"; label = "wps";
gpios = <&gpio1 3 0>; gpios = <&gpio1 3 0>;
linux,code = <0x211>; linux,code = <0xf7>;
}; };
}; };
}; };

View File

@ -60,7 +60,7 @@
wps { wps {
label = "wps"; label = "wps";
gpios = <&gpio0 13 0>; gpios = <&gpio0 13 0>;
linux,code = <0x211>; linux,code = <0xf7>;
}; };
}; };
}; };