aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-01-28 13:54:03 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-28 13:54:03 -0500
commit9ebea3829fac7505e0cd2642fbd13cfa9c038831 (patch)
treeed690568a27b7231b8a507e8ba07c1ae34868e5c /drivers/net/wireless/ath/ath9k/main.c
parentc5e818ef081c4144177fdbdeed154332cd7e4d7a (diff)
parent83f0c6d1f502bd75bb4a9e31e8d64e59c6894ad1 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/iwlwifi/dvm/tx.c
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3e5082c5f5f0..4b72b660f180 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -182,7 +182,7 @@ static void ath_restart_work(struct ath_softc *sc)
182 ath_start_ani(sc); 182 ath_start_ani(sc);
183} 183}
184 184
185static bool ath_prepare_reset(struct ath_softc *sc, bool flush) 185static bool ath_prepare_reset(struct ath_softc *sc)
186{ 186{
187 struct ath_hw *ah = sc->sc_ah; 187 struct ath_hw *ah = sc->sc_ah;
188 bool ret = true; 188 bool ret = true;
@@ -202,14 +202,6 @@ static bool ath_prepare_reset(struct ath_softc *sc, bool flush)
202 if (!ath_stoprecv(sc)) 202 if (!ath_stoprecv(sc))
203 ret = false; 203 ret = false;
204 204
205 if (!flush) {
206 if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
207 ath_rx_tasklet(sc, 1, true);
208 ath_rx_tasklet(sc, 1, false);
209 } else {
210 ath_flushrecv(sc);
211 }
212
213 return ret; 205 return ret;
214} 206}
215 207
@@ -261,11 +253,11 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan)
261 struct ath_common *common = ath9k_hw_common(ah); 253 struct ath_common *common = ath9k_hw_common(ah);
262 struct ath9k_hw_cal_data *caldata = NULL; 254 struct ath9k_hw_cal_data *caldata = NULL;
263 bool fastcc = true; 255 bool fastcc = true;
264 bool flush = false;
265 int r; 256 int r;
266 257
267 __ath_cancel_work(sc); 258 __ath_cancel_work(sc);
268 259
260 tasklet_disable(&sc->intr_tq);
269 spin_lock_bh(&sc->sc_pcu_lock); 261 spin_lock_bh(&sc->sc_pcu_lock);
270 262
271 if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) { 263 if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) {
@@ -275,11 +267,10 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan)
275 267
276 if (!hchan) { 268 if (!hchan) {
277 fastcc = false; 269 fastcc = false;
278 flush = true;
279 hchan = ah->curchan; 270 hchan = ah->curchan;
280 } 271 }
281 272
282 if (!ath_prepare_reset(sc, flush)) 273 if (!ath_prepare_reset(sc))
283 fastcc = false; 274 fastcc = false;
284 275
285 ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n", 276 ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
@@ -301,6 +292,8 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan)
301 292
302out: 293out:
303 spin_unlock_bh(&sc->sc_pcu_lock); 294 spin_unlock_bh(&sc->sc_pcu_lock);
295 tasklet_enable(&sc->intr_tq);
296
304 return r; 297 return r;
305} 298}
306 299
@@ -801,7 +794,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
801 ath9k_hw_cfg_gpio_input(ah, ah->led_pin); 794 ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
802 } 795 }
803 796
804 ath_prepare_reset(sc, true); 797 ath_prepare_reset(sc);
805 798
806 if (sc->rx.frag) { 799 if (sc->rx.frag) {
807 dev_kfree_skb_any(sc->rx.frag); 800 dev_kfree_skb_any(sc->rx.frag);
@@ -1917,6 +1910,9 @@ static u32 fill_chainmask(u32 cap, u32 new)
1917 1910
1918static bool validate_antenna_mask(struct ath_hw *ah, u32 val) 1911static bool validate_antenna_mask(struct ath_hw *ah, u32 val)
1919{ 1912{
1913 if (AR_SREV_9300_20_OR_LATER(ah))
1914 return true;
1915
1920 switch (val & 0x7) { 1916 switch (val & 0x7) {
1921 case 0x1: 1917 case 0x1:
1922 case 0x3: 1918 case 0x3: