summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-05-09 15:11:50 +0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-15 17:01:00 +0400
commit1af586c9116cdf6863823a830593c48cd9bcecde (patch)
tree4026e2cc9aa1172aaaadc70025a74fcd083cf8eb /net/mac80211/cfg.c
parent6ec8c332a0f93959e615158cc212b3abfd52abe7 (diff)
downloadlinux-1af586c9116cdf6863823a830593c48cd9bcecde.tar.xz
mac80211: Handle the CSA counters correctly
Make the beacon CSA counters part of ieee80211_mutable_offsets and don't decrement CSA counters when generating a beacon template. This permits the driver to offload the CSA counters handling. Since mac80211 updates the probe responses with the correct counter, the driver should sync the counter's value with mac80211 using ieee80211_csa_update_counter function. 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/cfg.c')
-rw-r--r--net/mac80211/cfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d44dca56b8ff..bfd2534e5a4d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3502,10 +3502,10 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
sdata->vif.type == NL80211_IFTYPE_ADHOC) &&
params->n_csa_offsets) {
int i;
+ u8 c = sdata->csa_current_counter;
for (i = 0; i < params->n_csa_offsets; i++)
- data[params->csa_offsets[i]] =
- sdata->csa_current_counter;
+ data[params->csa_offsets[i]] = c;
}
IEEE80211_SKB_CB(skb)->flags = flags;