aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath5k/base.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index c5bf8a2ef5c..8e9afb3b3a5 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -43,7 +43,9 @@
43#include <linux/version.h> 43#include <linux/version.h>
44#include <linux/module.h> 44#include <linux/module.h>
45#include <linux/delay.h> 45#include <linux/delay.h>
46#include <linux/hardirq.h>
46#include <linux/if.h> 47#include <linux/if.h>
48#include <linux/io.h>
47#include <linux/netdevice.h> 49#include <linux/netdevice.h>
48#include <linux/cache.h> 50#include <linux/cache.h>
49#include <linux/pci.h> 51#include <linux/pci.h>
@@ -1249,6 +1251,7 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1249 1251
1250 txq->link = &ds->ds_link; 1252 txq->link = &ds->ds_link;
1251 ath5k_hw_tx_start(ah, txq->qnum); 1253 ath5k_hw_tx_start(ah, txq->qnum);
1254 mmiowb();
1252 spin_unlock_bh(&txq->lock); 1255 spin_unlock_bh(&txq->lock);
1253 1256
1254 return 0; 1257 return 0;
@@ -1583,7 +1586,6 @@ ath5k_rx_stop(struct ath5k_softc *sc)
1583 ath5k_hw_stop_pcu_recv(ah); /* disable PCU */ 1586 ath5k_hw_stop_pcu_recv(ah); /* disable PCU */
1584 ath5k_hw_set_rx_filter(ah, 0); /* clear recv filter */ 1587 ath5k_hw_set_rx_filter(ah, 0); /* clear recv filter */
1585 ath5k_hw_stop_rx_dma(ah); /* disable DMA engine */ 1588 ath5k_hw_stop_rx_dma(ah); /* disable DMA engine */
1586 mdelay(3); /* 3ms is long enough for 1 frame */
1587 1589
1588 ath5k_debug_printrxbuffs(sc, ah); 1590 ath5k_debug_printrxbuffs(sc, ah);
1589 1591
@@ -2258,6 +2260,7 @@ ath5k_init(struct ath5k_softc *sc)
2258 2260
2259 ret = 0; 2261 ret = 0;
2260done: 2262done:
2263 mmiowb();
2261 mutex_unlock(&sc->lock); 2264 mutex_unlock(&sc->lock);
2262 return ret; 2265 return ret;
2263} 2266}
@@ -2290,6 +2293,7 @@ ath5k_stop_locked(struct ath5k_softc *sc)
2290 if (!test_bit(ATH_STAT_INVALID, sc->status)) { 2293 if (!test_bit(ATH_STAT_INVALID, sc->status)) {
2291 ath5k_led_off(sc); 2294 ath5k_led_off(sc);
2292 ath5k_hw_set_intr(ah, 0); 2295 ath5k_hw_set_intr(ah, 0);
2296 synchronize_irq(sc->pdev->irq);
2293 } 2297 }
2294 ath5k_txq_cleanup(sc); 2298 ath5k_txq_cleanup(sc);
2295 if (!test_bit(ATH_STAT_INVALID, sc->status)) { 2299 if (!test_bit(ATH_STAT_INVALID, sc->status)) {
@@ -2339,6 +2343,7 @@ ath5k_stop_hw(struct ath5k_softc *sc)
2339 } 2343 }
2340 } 2344 }
2341 ath5k_txbuf_free(sc, sc->bbuf); 2345 ath5k_txbuf_free(sc, sc->bbuf);
2346 mmiowb();
2342 mutex_unlock(&sc->lock); 2347 mutex_unlock(&sc->lock);
2343 2348
2344 del_timer_sync(&sc->calib_tim); 2349 del_timer_sync(&sc->calib_tim);
@@ -2804,6 +2809,7 @@ ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2804 /* XXX: assoc id is set to 0 for now, mac80211 doesn't have 2809 /* XXX: assoc id is set to 0 for now, mac80211 doesn't have
2805 * a clean way of letting us retrieve this yet. */ 2810 * a clean way of letting us retrieve this yet. */
2806 ath5k_hw_set_associd(ah, ah->ah_bssid, 0); 2811 ath5k_hw_set_associd(ah, ah->ah_bssid, 0);
2812 mmiowb();
2807 } 2813 }
2808 2814
2809 if (conf->changed & IEEE80211_IFCC_BEACON && 2815 if (conf->changed & IEEE80211_IFCC_BEACON &&
@@ -2992,6 +2998,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2992 } 2998 }
2993 2999
2994unlock: 3000unlock:
3001 mmiowb();
2995 mutex_unlock(&sc->lock); 3002 mutex_unlock(&sc->lock);
2996 return ret; 3003 return ret;
2997} 3004}
@@ -3065,8 +3072,10 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
3065 ret = ath5k_beacon_setup(sc, sc->bbuf); 3072 ret = ath5k_beacon_setup(sc, sc->bbuf);
3066 if (ret) 3073 if (ret)
3067 sc->bbuf->skb = NULL; 3074 sc->bbuf->skb = NULL;
3068 else 3075 else {
3069 ath5k_beacon_config(sc); 3076 ath5k_beacon_config(sc);
3077 mmiowb();
3078 }
3070 3079
3071end: 3080end:
3072 mutex_unlock(&sc->lock); 3081 mutex_unlock(&sc->lock);