aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-05-09 07:11:46 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-15 09:00:42 -0400
commit9a774c78e2114c7e8605e3a168ccd552cbe3d922 (patch)
treed1ba64609c6fc1b0b7609630635ee66c601e30cc /net/mac80211
parent387910cc79da2e529f2fb4ca9428e861b9402975 (diff)
cfg80211: Support multiple CSA counters
Change the type of NL80211_ATTR_CSA_C_OFF_BEACON and NL80211_ATTR_CSA_C_OFF_PRESP to be NLA_BINARY which allows userspace to use beacons and probe responses with multiple CSA counters. This isn't breaking the API since userspace can continue to use nla_put_u16 for this attributes, which is equivalent to a single element u16 array. In addition advertise max number of supported CSA counters. This is needed when using CSA and eCSA IEs together. 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')
-rw-r--r--net/mac80211/cfg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 8e4754ebc2d8..7a6f8aba5c46 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3192,8 +3192,14 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
3192 break; 3192 break;
3193 3193
3194 sdata->csa_counter_offset_beacon = 3194 sdata->csa_counter_offset_beacon =
3195 params->counter_offset_beacon; 3195 params->counter_offsets_beacon[0];
3196 sdata->csa_counter_offset_presp = params->counter_offset_presp; 3196
3197 if (params->n_counter_offsets_presp)
3198 sdata->csa_counter_offset_presp =
3199 params->counter_offsets_presp[0];
3200 else
3201 sdata->csa_counter_offset_presp = 0;
3202
3197 err = ieee80211_assign_beacon(sdata, &params->beacon_csa); 3203 err = ieee80211_assign_beacon(sdata, &params->beacon_csa);
3198 if (err < 0) { 3204 if (err < 0) {
3199 kfree(sdata->u.ap.next_beacon); 3205 kfree(sdata->u.ap.next_beacon);