ath9k: fix a small race condition in the tx_last_beacon patch
SVN-Revision: 26933
This commit is contained in:
parent
e7dfadd012
commit
6400498b35
1 changed files with 10 additions and 5 deletions
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||||
@@ -2314,6 +2314,43 @@ static bool ath9k_tx_frames_pending(stru
|
@@ -2314,6 +2314,48 @@ static bool ath9k_tx_frames_pending(stru
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,16 +80,21 @@
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+
|
+
|
||||||
+ if (!sc->beacon.tx_processed) {
|
+ if (!sc->beacon.tx_processed) {
|
||||||
|
+ tasklet_disable(&sc->bcon_tasklet);
|
||||||
|
+
|
||||||
+ bf = avp->av_bcbuf;
|
+ bf = avp->av_bcbuf;
|
||||||
+ if (!bf || !bf->bf_mpdu)
|
+ if (!bf || !bf->bf_mpdu)
|
||||||
+ return 0;
|
+ goto skip;
|
||||||
+
|
+
|
||||||
+ status = ath9k_hw_txprocdesc(ah, bf->bf_desc, &ts);
|
+ status = ath9k_hw_txprocdesc(ah, bf->bf_desc, &ts);
|
||||||
+ if (status == -EINPROGRESS)
|
+ if (status == -EINPROGRESS)
|
||||||
+ return 0;
|
+ goto skip;
|
||||||
+
|
+
|
||||||
+ sc->beacon.tx_processed = true;
|
+ sc->beacon.tx_processed = true;
|
||||||
+ sc->beacon.tx_last = !(ts.ts_status & ATH9K_TXERR_FILT);
|
+ sc->beacon.tx_last = !(ts.ts_status & ATH9K_TXERR_MASK);
|
||||||
|
+
|
||||||
|
+skip:
|
||||||
|
+ tasklet_enable(&sc->bcon_tasklet);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return sc->beacon.tx_last;
|
+ return sc->beacon.tx_last;
|
||||||
|
@ -98,7 +103,7 @@
|
||||||
struct ieee80211_ops ath9k_ops = {
|
struct ieee80211_ops ath9k_ops = {
|
||||||
.tx = ath9k_tx,
|
.tx = ath9k_tx,
|
||||||
.start = ath9k_start,
|
.start = ath9k_start,
|
||||||
@@ -2338,4 +2375,5 @@ struct ieee80211_ops ath9k_ops = {
|
@@ -2338,4 +2380,5 @@ struct ieee80211_ops ath9k_ops = {
|
||||||
.set_coverage_class = ath9k_set_coverage_class,
|
.set_coverage_class = ath9k_set_coverage_class,
|
||||||
.flush = ath9k_flush,
|
.flush = ath9k_flush,
|
||||||
.tx_frames_pending = ath9k_tx_frames_pending,
|
.tx_frames_pending = ath9k_tx_frames_pending,
|
||||||
|
|
Loading…
Reference in a new issue