ar71xx: fix ath9k default LED changes fallout
Since 192f0a3db8
("ath9k: unset the default LED pin if used by
platform leds") the default ath9k wireless LED is not set as soon as
any pin of the ath ath9k gpio controller is used.
All touched boards have leds defined which are using the gpio pins
exposed by the ath9k driver but rely on a default set wireless led
trigger.
Add the wireless leds were missing and setup the wireless phy trigger
in userspace.
Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
parent
ae0facdf1d
commit
e20965811d
4 changed files with 22 additions and 13 deletions
|
@ -743,6 +743,7 @@ tl-wr1043nd-v4)
|
||||||
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
||||||
;;
|
;;
|
||||||
tl-wr2543n)
|
tl-wr2543n)
|
||||||
|
ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:green:wlan2g" "phy0tpt"
|
||||||
ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
|
ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
|
||||||
;;
|
;;
|
||||||
tube2h)
|
tube2h)
|
||||||
|
@ -847,6 +848,8 @@ wpn824n)
|
||||||
wzr-hp-ag300h)
|
wzr-hp-ag300h)
|
||||||
ucidef_set_led_default "diag" "DIAG" "buffalo:red:diag" "0"
|
ucidef_set_led_default "diag" "DIAG" "buffalo:red:diag" "0"
|
||||||
ucidef_set_led_netdev "router" "ROUTER" "buffalo:green:router" "eth1"
|
ucidef_set_led_netdev "router" "ROUTER" "buffalo:green:router" "eth1"
|
||||||
|
ucidef_set_led_wlan "wlan2g" "WLAN2G" "buffalo:amber:band2g" "phy0tpt"
|
||||||
|
ucidef_set_led_wlan "wlan5g" "WLAN5G" "buffalo:amber:band5g" "phy1tpt"
|
||||||
ucidef_set_led_usbdev "usb" "USB" "buffalo:green:usb" "1-1"
|
ucidef_set_led_usbdev "usb" "USB" "buffalo:green:usb" "1-1"
|
||||||
;;
|
;;
|
||||||
wzr-hp-g300nh)
|
wzr-hp-g300nh)
|
||||||
|
@ -854,6 +857,10 @@ wzr-hp-g300nh)
|
||||||
ucidef_set_led_netdev "router" "Router" "buffalo:green:router" "eth1"
|
ucidef_set_led_netdev "router" "Router" "buffalo:green:router" "eth1"
|
||||||
ucidef_set_led_usbdev "usb" "USB" "buffalo:blue:usb" "1-1"
|
ucidef_set_led_usbdev "usb" "USB" "buffalo:blue:usb" "1-1"
|
||||||
;;
|
;;
|
||||||
|
wzr-hp-g300nh2|\
|
||||||
|
wzr-hp-g450h)
|
||||||
|
ucidef_set_led_wlan "wlan" "Wireless" "buffalo:green:wireless" "phy0tpt"
|
||||||
|
;;
|
||||||
xd3200)
|
xd3200)
|
||||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:blue:wlan2g" "phy1tpt"
|
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:blue:wlan2g" "phy1tpt"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -59,6 +59,11 @@ static struct gpio_led tl_wr2543n_leds_gpio[] __initdata = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct gpio_led tl_wr2543n_wmac_leds_gpio[] = {
|
static struct gpio_led tl_wr2543n_wmac_leds_gpio[] = {
|
||||||
|
{
|
||||||
|
.name = "tp-link:green:wlan2g",
|
||||||
|
.gpio = TL_WR2543N_GPIO_WMAC_LED_WLAN2G,
|
||||||
|
.active_low = 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "tp-link:green:wlan5g",
|
.name = "tp-link:green:wlan5g",
|
||||||
.gpio = TL_WR2543N_GPIO_WMAC_LED_WLAN5G,
|
.gpio = TL_WR2543N_GPIO_WMAC_LED_WLAN5G,
|
||||||
|
@ -125,17 +130,6 @@ static void __init tl_wr2543n_setup(void)
|
||||||
tl_wr2543n_gpio_keys);
|
tl_wr2543n_gpio_keys);
|
||||||
ath79_register_usb();
|
ath79_register_usb();
|
||||||
|
|
||||||
/*
|
|
||||||
* The ath9k driver uses this pin for its default led device, which is
|
|
||||||
* named ath9k-phy0, and reflects activity on either the 2 GHz or 5 GHz
|
|
||||||
* bands. This pin is connected to the WR2543's 2GHz WLAN LED.
|
|
||||||
*/
|
|
||||||
ap9x_pci_setup_wmac_led_pin(0, TL_WR2543N_GPIO_WMAC_LED_WLAN2G);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We also have the driver set up an led device for the WR2543's
|
|
||||||
* separate 5 GHz WLAN LED in case the user wants it.
|
|
||||||
*/
|
|
||||||
ap9x_pci_setup_wmac_leds(0, tl_wr2543n_wmac_leds_gpio,
|
ap9x_pci_setup_wmac_leds(0, tl_wr2543n_wmac_leds_gpio,
|
||||||
ARRAY_SIZE(tl_wr2543n_wmac_leds_gpio));
|
ARRAY_SIZE(tl_wr2543n_wmac_leds_gpio));
|
||||||
ap91_pci_init(eeprom, mac);
|
ap91_pci_init(eeprom, mac);
|
||||||
|
|
|
@ -74,6 +74,11 @@ static struct gpio_led wzrhpg300nh2_wmac_leds_gpio[] = {
|
||||||
.gpio = 4,
|
.gpio = 4,
|
||||||
.active_low = 1,
|
.active_low = 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "buffalo:green:wireless",
|
||||||
|
.gpio = 5,
|
||||||
|
.active_low = 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "buffalo:orange:security",
|
.name = "buffalo:orange:security",
|
||||||
.gpio = 6,
|
.gpio = 6,
|
||||||
|
@ -159,7 +164,6 @@ static void __init wzrhpg300nh2_setup(void)
|
||||||
ath79_register_gpio_keys_polled(-1, WZRHPG300NH2_KEYS_POLL_INTERVAL,
|
ath79_register_gpio_keys_polled(-1, WZRHPG300NH2_KEYS_POLL_INTERVAL,
|
||||||
ARRAY_SIZE(wzrhpg300nh2_gpio_keys),
|
ARRAY_SIZE(wzrhpg300nh2_gpio_keys),
|
||||||
wzrhpg300nh2_gpio_keys);
|
wzrhpg300nh2_gpio_keys);
|
||||||
ap9x_pci_setup_wmac_led_pin(0, 5);
|
|
||||||
ap9x_pci_setup_wmac_leds(0, wzrhpg300nh2_wmac_leds_gpio,
|
ap9x_pci_setup_wmac_leds(0, wzrhpg300nh2_wmac_leds_gpio,
|
||||||
ARRAY_SIZE(wzrhpg300nh2_wmac_leds_gpio));
|
ARRAY_SIZE(wzrhpg300nh2_wmac_leds_gpio));
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,11 @@ static struct gpio_led wzrhpg450h_wmac_leds_gpio[] = {
|
||||||
.gpio = 14,
|
.gpio = 14,
|
||||||
.active_low = 1,
|
.active_low = 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "buffalo:green:wireless",
|
||||||
|
.gpio = 15,
|
||||||
|
.active_low = 1,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct gpio_keys_button wzrhpg450h_gpio_keys[] __initdata = {
|
static struct gpio_keys_button wzrhpg450h_gpio_keys[] __initdata = {
|
||||||
|
@ -156,7 +161,6 @@ static void __init wzrhpg450h_init(void)
|
||||||
ap91_pci_init(ee, NULL);
|
ap91_pci_init(ee, NULL);
|
||||||
ap9x_pci_get_wmac_data(0)->tx_gain_buffalo = true;
|
ap9x_pci_get_wmac_data(0)->tx_gain_buffalo = true;
|
||||||
ap9x_pci_get_wmac_data(1)->tx_gain_buffalo = true;
|
ap9x_pci_get_wmac_data(1)->tx_gain_buffalo = true;
|
||||||
ap9x_pci_setup_wmac_led_pin(0, 15);
|
|
||||||
ap9x_pci_setup_wmac_leds(0, wzrhpg450h_wmac_leds_gpio,
|
ap9x_pci_setup_wmac_leds(0, wzrhpg450h_wmac_leds_gpio,
|
||||||
ARRAY_SIZE(wzrhpg450h_wmac_leds_gpio));
|
ARRAY_SIZE(wzrhpg450h_wmac_leds_gpio));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue