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>
This commit is contained in:
Andrei Otcheretianski
2014-05-09 14:11:46 +03:00
کامیت شده توسط Johannes Berg
والد 387910cc79
کامیت 9a774c78e2
6فایلهای تغییر یافته به همراه96 افزوده شده و 32 حذف شده

مشاهده پرونده

@@ -3192,8 +3192,14 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata,
break;
sdata->csa_counter_offset_beacon =
params->counter_offset_beacon;
sdata->csa_counter_offset_presp = params->counter_offset_presp;
params->counter_offsets_beacon[0];
if (params->n_counter_offsets_presp)
sdata->csa_counter_offset_presp =
params->counter_offsets_presp[0];
else
sdata->csa_counter_offset_presp = 0;
err = ieee80211_assign_beacon(sdata, &params->beacon_csa);
if (err < 0) {
kfree(sdata->u.ap.next_beacon);