diff options
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/rx.c | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 3681caf54282..23838e37d45f 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -218,6 +218,7 @@ struct ath_frame_info { | |||
218 | struct ath_buf_state { | 218 | struct ath_buf_state { |
219 | u8 bf_type; | 219 | u8 bf_type; |
220 | u8 bfs_paprd; | 220 | u8 bfs_paprd; |
221 | unsigned long bfs_paprd_timestamp; | ||
221 | enum ath9k_internal_frame_type bfs_ftype; | 222 | enum ath9k_internal_frame_type bfs_ftype; |
222 | }; | 223 | }; |
223 | 224 | ||
@@ -593,7 +594,6 @@ struct ath_softc { | |||
593 | struct work_struct paprd_work; | 594 | struct work_struct paprd_work; |
594 | struct work_struct hw_check_work; | 595 | struct work_struct hw_check_work; |
595 | struct completion paprd_complete; | 596 | struct completion paprd_complete; |
596 | bool paprd_pending; | ||
597 | 597 | ||
598 | u32 intrstatus; | 598 | u32 intrstatus; |
599 | u32 sc_flags; /* SC_OP_* */ | 599 | u32 sc_flags; /* SC_OP_* */ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 9040c2ff1909..da5c64597c1f 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -342,7 +342,6 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int | |||
342 | tx_info->control.rates[1].idx = -1; | 342 | tx_info->control.rates[1].idx = -1; |
343 | 343 | ||
344 | init_completion(&sc->paprd_complete); | 344 | init_completion(&sc->paprd_complete); |
345 | sc->paprd_pending = true; | ||
346 | txctl.paprd = BIT(chain); | 345 | txctl.paprd = BIT(chain); |
347 | 346 | ||
348 | if (ath_tx_start(hw, skb, &txctl) != 0) { | 347 | if (ath_tx_start(hw, skb, &txctl) != 0) { |
@@ -353,7 +352,6 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int | |||
353 | 352 | ||
354 | time_left = wait_for_completion_timeout(&sc->paprd_complete, | 353 | time_left = wait_for_completion_timeout(&sc->paprd_complete, |
355 | msecs_to_jiffies(ATH_PAPRD_TIMEOUT)); | 354 | msecs_to_jiffies(ATH_PAPRD_TIMEOUT)); |
356 | sc->paprd_pending = false; | ||
357 | 355 | ||
358 | if (!time_left) | 356 | if (!time_left) |
359 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_CALIBRATE, | 357 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_CALIBRATE, |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 33a37edbaf79..07b7804aec5b 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1725,6 +1725,9 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
1725 | ar9003_hw_set_paprd_txdesc(sc->sc_ah, bf->bf_desc, | 1725 | ar9003_hw_set_paprd_txdesc(sc->sc_ah, bf->bf_desc, |
1726 | bf->bf_state.bfs_paprd); | 1726 | bf->bf_state.bfs_paprd); |
1727 | 1727 | ||
1728 | if (txctl->paprd) | ||
1729 | bf->bf_state.bfs_paprd_timestamp = jiffies; | ||
1730 | |||
1728 | ath_tx_send_normal(sc, txctl->txq, tid, &bf_head); | 1731 | ath_tx_send_normal(sc, txctl->txq, tid, &bf_head); |
1729 | } | 1732 | } |
1730 | 1733 | ||
@@ -1886,7 +1889,9 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf, | |||
1886 | bf->bf_buf_addr = 0; | 1889 | bf->bf_buf_addr = 0; |
1887 | 1890 | ||
1888 | if (bf->bf_state.bfs_paprd) { | 1891 | if (bf->bf_state.bfs_paprd) { |
1889 | if (!sc->paprd_pending) | 1892 | if (time_after(jiffies, |
1893 | bf->bf_state.bfs_paprd_timestamp + | ||
1894 | msecs_to_jiffies(ATH_PAPRD_TIMEOUT))) | ||
1890 | dev_kfree_skb_any(skb); | 1895 | dev_kfree_skb_any(skb); |
1891 | else | 1896 | else |
1892 | complete(&sc->paprd_complete); | 1897 | complete(&sc->paprd_complete); |
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c index 939a0e96ed1f..84866a4b8350 100644 --- a/drivers/net/wireless/ath/carl9170/rx.c +++ b/drivers/net/wireless/ath/carl9170/rx.c | |||
@@ -564,7 +564,7 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len) | |||
564 | cam = ieee80211_check_tim(tim_ie, tim_len, ar->common.curaid); | 564 | cam = ieee80211_check_tim(tim_ie, tim_len, ar->common.curaid); |
565 | 565 | ||
566 | /* 2. Maybe the AP wants to send multicast/broadcast data? */ | 566 | /* 2. Maybe the AP wants to send multicast/broadcast data? */ |
567 | cam = !!(tim_ie->bitmap_ctrl & 0x01); | 567 | cam |= !!(tim_ie->bitmap_ctrl & 0x01); |
568 | 568 | ||
569 | if (!cam) { | 569 | if (!cam) { |
570 | /* back to low-power land. */ | 570 | /* back to low-power land. */ |