aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-11-07 20:14:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-11-07 20:14:09 +0000
commit141044b22f49b59cebbf42df8bd6ff8a13761aef (patch)
treea36c3fa3de5823e2a789b8330cbc61412109727b /package/mac80211
parentfecfd25a626ccf648e19df5719c90d7326999ec2 (diff)
downloadupstream-141044b22f49b59cebbf42df8bd6ff8a13761aef.tar.gz
upstream-141044b22f49b59cebbf42df8bd6ff8a13761aef.tar.bz2
upstream-141044b22f49b59cebbf42df8bd6ff8a13761aef.zip
ath9k: fix LED related crashes on AR913x
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28809 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/patches/562-ath9k_fix_led.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/package/mac80211/patches/562-ath9k_fix_led.patch b/package/mac80211/patches/562-ath9k_fix_led.patch
new file mode 100644
index 0000000000..c6fe4076bd
--- /dev/null
+++ b/package/mac80211/patches/562-ath9k_fix_led.patch
@@ -0,0 +1,30 @@
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -1056,9 +1056,11 @@ static int ath9k_start(struct ieee80211_
+ goto mutex_unlock;
+ }
+
+- ath9k_hw_cfg_output(ah, ah->led_pin,
+- AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
+- ath9k_hw_set_gpio(ah, ah->led_pin, 0);
++ if (ah->led_pin >= 0) {
++ ath9k_hw_cfg_output(ah, ah->led_pin,
++ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
++ ath9k_hw_set_gpio(ah, ah->led_pin, 0);
++ }
+
+ /*
+ * Reset key cache to sane defaults (all entries cleared) instead of
+@@ -1209,8 +1211,10 @@ static void ath9k_stop(struct ieee80211_
+
+ spin_lock_bh(&sc->sc_pcu_lock);
+
+- ath9k_hw_set_gpio(ah, ah->led_pin, 1);
+- ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
++ if (ah->led_pin >= 0) {
++ ath9k_hw_set_gpio(ah, ah->led_pin, 1);
++ ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
++ }
+
+ ath_prepare_reset(sc, false, true);
+