ath9k: Fix channel switch time duration
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Wed, 10 Sep 2014 13:45:59 +0000 (19:15 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 11 Sep 2014 19:27:39 +0000 (15:27 -0400)
Since the NoA duration is the maximum time the GO interface
can be offline, it needs to include the time take to
switch channels in the HW.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/channel.c

index 09ff8a6e89666e2789a41ce2f10392bedb4c64ea..a42fd85def2ade1016752aaf47b4870ef2cbf9f2 100644 (file)
@@ -419,7 +419,7 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
                        avp->noa_index++;
                        avp->noa_start = tsf_time;
                        avp->noa_duration =
-                               TU_TO_USEC(cur_conf->beacon_interval) / 2 -
+                               TU_TO_USEC(cur_conf->beacon_interval) / 2 +
                                sc->sched.channel_switch_time;
 
                        if (test_bit(ATH_OP_SCANNING, &common->op_flags))