summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-05-09 14:11:45 +0300
committerJohannes Berg <johannes.berg@intel.com>2014-05-15 14:54:32 +0200
commit387910cc79da2e529f2fb4ca9428e861b9402975 (patch)
tree430ff1ed030166453f5cf645bcfabd7c93e7b584 /net/mac80211/tx.c
parent34d22ce22b0b249804816990a3b62b08b1a62546 (diff)
downloadop-kernel-dev-387910cc79da2e529f2fb4ca9428e861b9402975.zip
op-kernel-dev-387910cc79da2e529f2fb4ca9428e861b9402975.tar.gz
mac80211: Update CSA counters in mgmt frames
Track current csa counter value and use it to update mgmt frames at the provided offsets. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 19d36d4..263dea5 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2449,7 +2449,8 @@ static void ieee80211_update_csa(struct ieee80211_sub_if_data *sdata,
if (WARN_ON(beacon_data[counter_offset_beacon] == 1))
return;
- beacon_data[counter_offset_beacon]--;
+ sdata->csa_current_counter--;
+ beacon_data[counter_offset_beacon] = sdata->csa_current_counter;
if (sdata->vif.type == NL80211_IFTYPE_AP && counter_offset_presp) {
rcu_read_lock();
@@ -2460,7 +2461,7 @@ static void ieee80211_update_csa(struct ieee80211_sub_if_data *sdata,
rcu_read_unlock();
return;
}
- resp->data[counter_offset_presp]--;
+ resp->data[counter_offset_presp] = sdata->csa_current_counter;
rcu_read_unlock();
}
}
OpenPOWER on IntegriCloud