Skip to content

Commit

Permalink
ar71xx: increase the rfkill debounce interval for TP-Link Archer C7 v2
Browse files Browse the repository at this point in the history
Due to circuit issue or silicon defect, sometimes the WiFi switch button
of the Archer C7 v2 can be accidentally triggered multiple times in one
second. This will cause WiFi to be unexpectedly shut down and trigger
'irq 23: nobody cared'[1] warning. Increasing the key debounce interval
to 1000 ms can fix this issue. This patch also add the missing rfkill
key label.

[1] Warning Log:
```
[87765.218511] irq 23: nobody cared (try booting with the "irqpoll" option)
[87765.225331] CPU: 0 PID: 317 Comm: irq/23-keys Not tainted 5.15.118 #0
...
[87765.486246] handlers:
[87765.488543] [<85257547>] 0x800c29a0 threaded [<5c6328a2>] 0x80ffe0b8 [gpio_button_hotplug@4cf73d00+0x1a00]
[87765.498364] Disabling IRQ #23
```

Fixes: openwrt/openwrt#13010
Fixes: openwrt/openwrt#12167
Fixes: openwrt/openwrt#11191
Fixes: openwrt/openwrt#7835

Tested-by: Hans Hasert
Signed-off-by: Shiji Yang <[email protected]>
  • Loading branch information
DragonBluep authored and HiGarfield committed Nov 17, 2023
1 parent 7e2bb59 commit a5742df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#define ARCHER_C7_GPIO_USB2_POWER 21

#define ARCHER_C7_KEYS_POLL_INTERVAL 20 /* msecs */
#define ARCHER_C7_KEYS_DEBOUNCE_INTERVAL (3 * ARCHER_C7_KEYS_POLL_INTERVAL)
#define ARCHER_C7_KEYS_DEBOUNCE_INTERVAL (50 * ARCHER_C7_KEYS_POLL_INTERVAL)

#define ARCHER_C7_WMAC_CALDATA_OFFSET 0x1000
#define ARCHER_C7_PCIE_CALDATA_OFFSET 0x5000
Expand Down

0 comments on commit a5742df

Please sign in to comment.