diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2014-05-09 13:11:45 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-05-15 14:54:32 +0200 |
commit | 387910cc79da2e529f2fb4ca9428e861b9402975 (patch) | |
tree | 430ff1ed030166453f5cf645bcfabd7c93e7b584 /net/mac80211/tx.c | |
parent | cfg80211: Add API to update CSA counters in mgmt frames (diff) | |
download | linux-387910cc79da2e529f2fb4ca9428e861b9402975.tar.xz linux-387910cc79da2e529f2fb4ca9428e861b9402975.zip |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 19d36d4117e0..263dea5a5cbb 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(); } } |