summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-06-05 14:21:36 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-06-23 14:22:06 +0200
commitaf296bdb8da4d0a4284de10fc4a61497272ddf11 (patch)
tree5387b60fbc8d858402068f2ee69d57104f961e5f /net/mac80211/ibss.c
parentb49328361bab10d786e321aeae79b4429fdff38c (diff)
mac80211: move csa counters from sdata to beacon/presp
Having csa counters part of beacon and probe_resp structures makes it easier to get rid of possible races between setting a beacon and updating counters on SMP systems by guaranteeing counters are always consistent against given beacon struct. While at it relax WARN_ON into WARN_ON_ONCE to prevent spamming logs and racing. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> [remove pointless array check] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r--net/mac80211/ibss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 18ee0a256b1..713485f9eff 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -143,7 +143,7 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,
*pos++ = csa_settings->block_tx ? 1 : 0;
*pos++ = ieee80211_frequency_to_channel(
csa_settings->chandef.chan->center_freq);
- sdata->csa_counter_offset_beacon[0] = (pos - presp->head);
+ presp->csa_counter_offsets[0] = (pos - presp->head);
*pos++ = csa_settings->count;
}