ar71xx: WNDR3700: enable RFKILL function for Wifi button
authorMichal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Thu, 22 Feb 2018 22:11:08 +0000 (23:11 +0100)
committerJohn Crispin <john@phrozen.org>
Thu, 24 May 2018 14:41:46 +0000 (16:41 +0200)
commit3834fd5ff585597967611b974ce97676988083b2
tree348855e65afa0d472e644ce4aad118884d64deeb
parent00f4b4aaf5ffe0e6e13be14991b9d333a453ef33
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>
(cherry picked from commit 45dc530334d8694a962d0833432effd14fa5cc4a)
target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c