summaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/318-ath9k-Use-a-helper-function-for-offchannel-NoA.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-18 17:38:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-18 17:38:59 +0000
commitf0d9e712e459332ec527802f7eaca104c47b14c2 (patch)
treeb03de3247dbdd3f785bda5318729be5ab75f5f95 /package/kernel/mac80211/patches/318-ath9k-Use-a-helper-function-for-offchannel-NoA.patch
parent6d3fd947e4aa0430f592e9e3b0eb6b78cbe21f7b (diff)
downloadmaster-31e0f0ae-f0d9e712e459332ec527802f7eaca104c47b14c2.tar.gz
master-31e0f0ae-f0d9e712e459332ec527802f7eaca104c47b14c2.tar.bz2
master-31e0f0ae-f0d9e712e459332ec527802f7eaca104c47b14c2.zip
mac80211: update to 2014-10-08
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42952
Diffstat (limited to 'package/kernel/mac80211/patches/318-ath9k-Use-a-helper-function-for-offchannel-NoA.patch')
-rw-r--r--package/kernel/mac80211/patches/318-ath9k-Use-a-helper-function-for-offchannel-NoA.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/318-ath9k-Use-a-helper-function-for-offchannel-NoA.patch b/package/kernel/mac80211/patches/318-ath9k-Use-a-helper-function-for-offchannel-NoA.patch
new file mode 100644
index 0000000000..e51e2f84f5
--- /dev/null
+++ b/package/kernel/mac80211/patches/318-ath9k-Use-a-helper-function-for-offchannel-NoA.patch
@@ -0,0 +1,68 @@
+From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
+Date: Fri, 17 Oct 2014 07:40:23 +0530
+Subject: [PATCH] ath9k: Use a helper function for offchannel NoA
+
+Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/channel.c
++++ b/drivers/net/wireless/ath/ath9k/channel.c
+@@ -366,6 +366,32 @@ static void ath_chanctx_setup_timer(stru
+ "Setup chanctx timer with timeout: %d ms\n", jiffies_to_msecs(tsf_time));
+ }
+
++static void ath_chanctx_offchannel_noa(struct ath_softc *sc,
++ struct ath_chanctx *ctx,
++ struct ath_vif *avp,
++ u32 tsf_time)
++{
++ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
++
++ avp->noa_index++;
++ avp->offchannel_start = tsf_time;
++ avp->offchannel_duration = sc->sched.offchannel_duration;
++
++ ath_dbg(common, CHAN_CTX,
++ "offchannel noa_duration: %d, noa_start: %d, noa_index: %d\n",
++ avp->offchannel_duration,
++ avp->offchannel_start,
++ avp->noa_index);
++
++ /*
++ * When multiple contexts are active, the NoA
++ * has to be recalculated and advertised after
++ * an offchannel operation.
++ */
++ if (ctx->active && avp->noa_duration)
++ avp->noa_duration = 0;
++}
++
+ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
+ enum ath_chanctx_event ev)
+ {
+@@ -461,24 +487,7 @@ void ath_chanctx_event(struct ath_softc
+ * values and increment the index.
+ */
+ if (sc->next_chan == &sc->offchannel.chan) {
+- avp->noa_index++;
+- avp->offchannel_start = tsf_time;
+- avp->offchannel_duration = sc->sched.offchannel_duration;
+-
+- ath_dbg(common, CHAN_CTX,
+- "offchannel noa_duration: %d, noa_start: %d, noa_index: %d\n",
+- avp->offchannel_duration,
+- avp->offchannel_start,
+- avp->noa_index);
+-
+- /*
+- * When multiple contexts are active, the NoA
+- * has to be recalculated and advertised after
+- * an offchannel operation.
+- */
+- if (ctx->active && avp->noa_duration)
+- avp->noa_duration = 0;
+-
++ ath_chanctx_offchannel_noa(sc, ctx, avp, tsf_time);
+ break;
+ }
+