summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-09-05 08:03:12 +0530
committerJohn W. Linville <linville@tuxdriver.com>2014-09-09 15:27:20 -0400
commitbd81533dbd79344232299b4669e9e3f596e618c5 (patch)
treeb1b108b34010f6a62030d537bdc225e40f0f7615
parent9bf30ff93dae035bb60ea2f3812e44ac79b31478 (diff)
ath9k: Fix NoA start time calculation
The start time field in the NoA attribute needs to be updated based on the TSF timer when an absence notification is sent by the P2P GO. When two channel contexts are active, continuous, cyclic NoA is announced by setting the count value to 255, but the start time is updated only once, for one beacon and the same value is sent in all subsequent beacons, even though the timestamp keeps moving. Fix this by removing the check for 'periodic_noa_duration' and assign the interface's start_time/duration values directly when there is more than one active context. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index 409f912a67c7..047a76fe2e7f 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -377,13 +377,13 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
tsf_time - avp->periodic_noa_start > BIT(30))
avp->periodic_noa_duration = 0;
- if (ctx->active && !avp->periodic_noa_duration) {
+ if (ctx->active) {
avp->periodic_noa_start = tsf_time;
avp->periodic_noa_duration =
TU_TO_USEC(cur_conf->beacon_interval) / 2 -
sc->sched.channel_switch_time;
noa_changed = true;
- } else if (!ctx->active && avp->periodic_noa_duration) {
+ } else if (!ctx->active) {
avp->periodic_noa_duration = 0;
noa_changed = true;
}