diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 4 |
6 files changed, 19 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index d5a2019921bd..0f6db12967d9 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -931,6 +931,7 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs); | |||
931 | #define ATH9K_PCI_AR9565_2ANT 0x0100 | 931 | #define ATH9K_PCI_AR9565_2ANT 0x0100 |
932 | #define ATH9K_PCI_NO_PLL_PWRSAVE 0x0200 | 932 | #define ATH9K_PCI_NO_PLL_PWRSAVE 0x0200 |
933 | #define ATH9K_PCI_KILLER 0x0400 | 933 | #define ATH9K_PCI_KILLER 0x0400 |
934 | #define ATH9K_PCI_LED_ACT_HI 0x0800 | ||
934 | 935 | ||
935 | /* | 936 | /* |
936 | * Default cache line size, in bytes. | 937 | * Default cache line size, in bytes. |
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index b1956bf6e01e..2fef7a480fec 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c | |||
@@ -25,7 +25,12 @@ static void ath_led_brightness(struct led_classdev *led_cdev, | |||
25 | enum led_brightness brightness) | 25 | enum led_brightness brightness) |
26 | { | 26 | { |
27 | struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev); | 27 | struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev); |
28 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, (brightness == LED_OFF)); | 28 | u32 val = (brightness == LED_OFF); |
29 | |||
30 | if (sc->sc_ah->config.led_active_high) | ||
31 | val = !val; | ||
32 | |||
33 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val); | ||
29 | } | 34 | } |
30 | 35 | ||
31 | void ath_deinit_leds(struct ath_softc *sc) | 36 | void ath_deinit_leds(struct ath_softc *sc) |
@@ -82,7 +87,7 @@ void ath_fill_led_pin(struct ath_softc *sc) | |||
82 | ath9k_hw_cfg_output(ah, ah->led_pin, AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | 87 | ath9k_hw_cfg_output(ah, ah->led_pin, AR_GPIO_OUTPUT_MUX_AS_OUTPUT); |
83 | 88 | ||
84 | /* LED off, active low */ | 89 | /* LED off, active low */ |
85 | ath9k_hw_set_gpio(ah, ah->led_pin, 1); | 90 | ath9k_hw_set_gpio(ah, ah->led_pin, (ah->config.led_active_high) ? 0 : 1); |
86 | } | 91 | } |
87 | #endif | 92 | #endif |
88 | 93 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 55ee0a5bc6fa..d2c044885aff 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -329,6 +329,7 @@ struct ath9k_ops_config { | |||
329 | bool alt_mingainidx; | 329 | bool alt_mingainidx; |
330 | bool no_pll_pwrsave; | 330 | bool no_pll_pwrsave; |
331 | bool tx_gain_buffalo; | 331 | bool tx_gain_buffalo; |
332 | bool led_active_high; | ||
332 | }; | 333 | }; |
333 | 334 | ||
334 | enum ath9k_int { | 335 | enum ath9k_int { |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 41736e5a49e0..39157ca723d6 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -441,6 +441,9 @@ static void ath9k_init_pcoem_platform(struct ath_softc *sc) | |||
441 | ah->config.no_pll_pwrsave = true; | 441 | ah->config.no_pll_pwrsave = true; |
442 | ath_info(common, "Disable PLL PowerSave\n"); | 442 | ath_info(common, "Disable PLL PowerSave\n"); |
443 | } | 443 | } |
444 | |||
445 | if (sc->driver_data & ATH9K_PCI_LED_ACT_HI) | ||
446 | ah->config.led_active_high = true; | ||
444 | } | 447 | } |
445 | 448 | ||
446 | static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, | 449 | static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index ca71f2fdc276..5a2a8d288487 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -727,7 +727,8 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
727 | if (ah->led_pin >= 0) { | 727 | if (ah->led_pin >= 0) { |
728 | ath9k_hw_cfg_output(ah, ah->led_pin, | 728 | ath9k_hw_cfg_output(ah, ah->led_pin, |
729 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | 729 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); |
730 | ath9k_hw_set_gpio(ah, ah->led_pin, 0); | 730 | ath9k_hw_set_gpio(ah, ah->led_pin, |
731 | (ah->config.led_active_high) ? 1 : 0); | ||
731 | } | 732 | } |
732 | 733 | ||
733 | /* | 734 | /* |
@@ -869,7 +870,8 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
869 | spin_lock_bh(&sc->sc_pcu_lock); | 870 | spin_lock_bh(&sc->sc_pcu_lock); |
870 | 871 | ||
871 | if (ah->led_pin >= 0) { | 872 | if (ah->led_pin >= 0) { |
872 | ath9k_hw_set_gpio(ah, ah->led_pin, 1); | 873 | ath9k_hw_set_gpio(ah, ah->led_pin, |
874 | (ah->config.led_active_high) ? 0 : 1); | ||
873 | ath9k_hw_cfg_gpio_input(ah, ah->led_pin); | 875 | ath9k_hw_cfg_gpio_input(ah, ah->led_pin); |
874 | } | 876 | } |
875 | 877 | ||
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index e3f60d5c5263..f009b5b57e5e 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -657,7 +657,9 @@ static const struct pci_device_id ath_pci_id_table[] = { | |||
657 | 0x0036, | 657 | 0x0036, |
658 | PCI_VENDOR_ID_DELL, | 658 | PCI_VENDOR_ID_DELL, |
659 | 0x020E), | 659 | 0x020E), |
660 | .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, | 660 | .driver_data = ATH9K_PCI_AR9565_2ANT | |
661 | ATH9K_PCI_BT_ANT_DIV | | ||
662 | ATH9K_PCI_LED_ACT_HI}, | ||
661 | 663 | ||
662 | /* PCI-E AR9565 (WB335) */ | 664 | /* PCI-E AR9565 (WB335) */ |
663 | { PCI_VDEVICE(ATHEROS, 0x0036), | 665 | { PCI_VDEVICE(ATHEROS, 0x0036), |