Add missing code to handle nullfunc frame completion in
ath_tx_edma_tasklet().
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath9k/xmit.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 3db1917..debb62d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2277,6 +2277,17 @@ void ath_tx_edma_tasklet(struct ath_softc *sc)
txok = !(txs.ts_status & ATH9K_TXERR_MASK);
+ /*
+ * Make sure null func frame is acked before configuring
+ * hw into ps mode.
+ */
+ if (bf->bf_isnullfunc && txok) {
+ if ((sc->ps_flags & PS_ENABLED))
+ ath9k_enable_ps(sc);
+ else
+ sc->ps_flags |= PS_NULLFUNC_COMPLETED;
+ }
+
if (!bf_isampdu(bf)) {
bf->bf_retries = txs.ts_longretry;
if (txs.ts_status & ATH9K_TXERR_XRETRY)
--
1.7.0.4
On Sun, May 23, 2010 at 12:13:54AM +0530, Kalle Valo wrote:
> Vasanthakumar Thiagarajan <[email protected]> writes:
>
> > Add missing code to handle nullfunc frame completion in
> > ath_tx_edma_tasklet().
>
> [...]
>
> > + /*
> > + * Make sure null func frame is acked before configuring
> > + * hw into ps mode.
> > + */
> > + if (bf->bf_isnullfunc && txok) {
> > + if ((sc->ps_flags & PS_ENABLED))
> > + ath9k_enable_ps(sc);
> > + else
> > + sc->ps_flags |= PS_NULLFUNC_COMPLETED;
> > + }
>
> Few months ago a similar test was added to mac80211. Why does ath9k
> need this also in the driver?
>
Right, but this patch is needed unless the logic which checks for
completion of null func in driver is cleaned up. I'll do this clean
up later. thanks.
Vasanth
Rx should not be disabed/disabled when hw supports auto sleeping.
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath9k/main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 893b552..53e9c8f 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1296,7 +1296,8 @@ static int ath9k_tx(struct ieee80211_hw *hw,
* completed and if needed, also for RX of buffered frames.
*/
ath9k_ps_wakeup(sc);
- ath9k_hw_setrxabort(sc->sc_ah, 0);
+ if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
+ ath9k_hw_setrxabort(sc->sc_ah, 0);
if (ieee80211_is_pspoll(hdr->frame_control)) {
ath_print(common, ATH_DBG_PS,
"Sending PS-Poll to pick a buffered frame\n");
@@ -1560,8 +1561,8 @@ void ath9k_enable_ps(struct ath_softc *sc)
ah->imask |= ATH9K_INT_TIM_TIMER;
ath9k_hw_set_interrupts(ah, ah->imask);
}
+ ath9k_hw_setrxabort(ah, 1);
}
- ath9k_hw_setrxabort(ah, 1);
}
static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
--
1.7.0.4
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath9k/hw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 1985d19..7997d0f 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2165,7 +2165,7 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
pCap->hw_caps |= ATH9K_HW_CAP_RFSILENT;
}
#endif
- if (AR_SREV_9271(ah))
+ if (AR_SREV_9271(ah) || AR_SREV_9300_20_OR_LATER(ah))
pCap->hw_caps |= ATH9K_HW_CAP_AUTOSLEEP;
else
pCap->hw_caps &= ~ATH9K_HW_CAP_AUTOSLEEP;
--
1.7.0.4
Vasanthakumar Thiagarajan <[email protected]> writes:
> Add missing code to handle nullfunc frame completion in
> ath_tx_edma_tasklet().
[...]
> + /*
> + * Make sure null func frame is acked before configuring
> + * hw into ps mode.
> + */
> + if (bf->bf_isnullfunc && txok) {
> + if ((sc->ps_flags & PS_ENABLED))
> + ath9k_enable_ps(sc);
> + else
> + sc->ps_flags |= PS_NULLFUNC_COMPLETED;
> + }
Few months ago a similar test was added to mac80211. Why does ath9k
need this also in the driver?
--
Kalle Valo