mac80211: fix mesh path discovery based on unicast packets
[openwrt/staging/hauke.git] / target / linux / bcm47xx / patches-5.15 / 324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch
1 From aecf89f2f8e8a604c33085c230a1f04ea325de64 Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <f.fainelli@gmail.com>
3 Date: Thu, 6 Jan 2022 19:51:39 -0800
4 Subject: [PATCH] MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U
5
6 Add the definitions for the buttons and LEDs used on the Asus RTN-10U
7 router.
8
9 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
10 Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
11 ---
12 arch/mips/bcm47xx/buttons.c | 9 +++++++++
13 arch/mips/bcm47xx/leds.c | 11 +++++++++++
14 2 files changed, 20 insertions(+)
15
16 --- a/arch/mips/bcm47xx/buttons.c
17 +++ b/arch/mips/bcm47xx/buttons.c
18 @@ -27,6 +27,12 @@
19 /* Asus */
20
21 static const struct gpio_keys_button
22 +bcm47xx_buttons_asus_rtn10u[] __initconst = {
23 + BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
24 + BCM47XX_GPIO_KEY(21, KEY_RESTART),
25 +};
26 +
27 +static const struct gpio_keys_button
28 bcm47xx_buttons_asus_rtn12[] __initconst = {
29 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
30 BCM47XX_GPIO_KEY(1, KEY_RESTART),
31 @@ -502,6 +508,9 @@ int __init bcm47xx_buttons_register(void
32 int err;
33
34 switch (board) {
35 + case BCM47XX_BOARD_ASUS_RTN10U:
36 + err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
37 + break;
38 case BCM47XX_BOARD_ASUS_RTN12:
39 err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
40 break;
41 --- a/arch/mips/bcm47xx/leds.c
42 +++ b/arch/mips/bcm47xx/leds.c
43 @@ -30,6 +30,14 @@
44 /* Asus */
45
46 static const struct gpio_led
47 +bcm47xx_leds_asus_rtn10u[] __initconst = {
48 + BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
49 + BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
50 + BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
51 + BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
52 +};
53 +
54 +static const struct gpio_led
55 bcm47xx_leds_asus_rtn12[] __initconst = {
56 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
57 BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
58 @@ -571,6 +579,9 @@ void __init bcm47xx_leds_register(void)
59 enum bcm47xx_board board = bcm47xx_board_get();
60
61 switch (board) {
62 + case BCM47XX_BOARD_ASUS_RTN10U:
63 + bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
64 + break;
65 case BCM47XX_BOARD_ASUS_RTN12:
66 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
67 break;