2010-11-03 16:55:53 +02:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
2010-12-11 03:45:12 +02:00
|
|
|
@@ -927,6 +927,12 @@ int ath9k_init_debug(struct ath_hw *ah)
|
2010-11-03 16:55:53 +02:00
|
|
|
sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
|
|
|
|
goto err;
|
|
|
|
|
|
|
|
+ debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR,
|
|
|
|
+ sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask);
|
|
|
|
+
|
|
|
|
+ debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
|
|
|
|
+ sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
|
|
|
|
+
|
|
|
|
sc->debug.regidx = 0;
|
|
|
|
return 0;
|
|
|
|
err:
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
2010-12-18 04:00:10 +02:00
|
|
|
@@ -788,6 +788,8 @@ struct ath_hw {
|
2010-11-03 16:55:53 +02:00
|
|
|
int initPDADC;
|
|
|
|
int PDADCdelta;
|
|
|
|
u8 led_pin;
|
|
|
|
+ u32 gpio_mask;
|
|
|
|
+ u32 gpio_val;
|
|
|
|
|
|
|
|
struct ar5416IniArray iniModes;
|
|
|
|
struct ar5416IniArray iniCommon;
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
2010-12-11 03:45:12 +02:00
|
|
|
@@ -1171,6 +1171,20 @@ static bool ath9k_hw_channel_change(stru
|
2010-11-03 16:55:53 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
+static void ath9k_hw_apply_gpio_override(struct ath_hw *ah)
|
|
|
|
+{
|
|
|
|
+ u32 gpio_mask = ah->gpio_mask;
|
|
|
|
+ int i;
|
|
|
|
+
|
|
|
|
+ for (i = 0; gpio_mask; i++, gpio_mask >>= 1) {
|
2010-11-05 20:05:50 +02:00
|
|
|
+ if (!(gpio_mask & 1))
|
2010-11-03 16:55:53 +02:00
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ ath9k_hw_cfg_output(ah, i, AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
|
|
|
+ ath9k_hw_set_gpio(ah, i, !!(ah->gpio_val & BIT(i)));
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
bool ath9k_hw_check_alive(struct ath_hw *ah)
|
|
|
|
{
|
|
|
|
int count = 50;
|
2010-12-18 04:00:10 +02:00
|
|
|
@@ -1459,6 +1473,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
2010-11-03 16:55:53 +02:00
|
|
|
if (AR_SREV_9300_20_OR_LATER(ah))
|
|
|
|
ar9003_hw_bb_watchdog_config(ah);
|
|
|
|
|
|
|
|
+ ath9k_hw_apply_gpio_override(ah);
|
|
|
|
+
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(ath9k_hw_reset);
|