diff options
author | Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> | 2018-02-22 23:11:08 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-05-18 11:18:53 +0200 |
commit | 45dc530334d8694a962d0833432effd14fa5cc4a (patch) | |
tree | 9e03203bf309fec09d3a3dfdde45373be106ec92 /target/linux | |
parent | 707b6c815bba34e9783d2695020bb17385fdcf1d (diff) | |
download | upstream-45dc530334d8694a962d0833432effd14fa5cc4a.tar.gz upstream-45dc530334d8694a962d0833432effd14fa5cc4a.tar.bz2 upstream-45dc530334d8694a962d0833432effd14fa5cc4a.zip |
ar71xx: WNDR3700: enable RFKILL function for Wifi button
Wifi button for WNDR3700 dual band routers has been renamed to "rfkill"
and its emitted keycode changed to KEY_RFKILL. This allows OpenWrt/LEDE
to support it 'out of the box' without additional tweaking.
Until this patch, button had been sending BTN_2 keycode which was
ignored by default (no action script present). To get expected behaviour
of switching radios on and off, user had to manually rename/link
'rfkill' script to name 'BTN_2' in /etc/rc.button directory.
This patch follows similar changes for other Netgear ar71xx routers,
for example WNR2000v3. It applies cleanly to both latest trunk and 17.01
branch. Tested on WNDR3700v1.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c index 1315bab037..b9132fc363 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c @@ -33,7 +33,7 @@ #define WNDR3700_GPIO_BTN_WPS 3 #define WNDR3700_GPIO_BTN_RESET 8 -#define WNDR3700_GPIO_BTN_WIFI 11 +#define WNDR3700_GPIO_BTN_RFKILL 11 #define WNDR3700_GPIO_RTL8366_SDA 5 #define WNDR3700_GPIO_RTL8366_SCK 7 @@ -89,11 +89,11 @@ static struct gpio_keys_button wndr3700_gpio_keys[] __initdata = { .gpio = WNDR3700_GPIO_BTN_WPS, .active_low = 1, }, { - .desc = "wifi", + .desc = "rfkill", .type = EV_KEY, - .code = BTN_2, + .code = KEY_RFKILL, .debounce_interval = WNDR3700_KEYS_DEBOUNCE_INTERVAL, - .gpio = WNDR3700_GPIO_BTN_WIFI, + .gpio = WNDR3700_GPIO_BTN_RFKILL, .active_low = 1, } }; |