cfg80211: allow userspace to control supported rates in scan

Some P2P scans are not allowed to advertise
11b rates, but that is a rather special case
so instead of having that, allow userspace
to request the rate sets (per band) that are
advertised in scan probe request frames.

Since it's needed in two places now, factor
out some common code parsing a rate array.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Johannes Berg
2011-07-18 18:08:35 +02:00
committed by John W. Linville
parent 0b5dd734d3
commit 34850ab25d
6 changed files with 83 additions and 19 deletions

View File

@@ -1014,6 +1014,11 @@ enum nl80211_commands {
* @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information
* necessary for GTK rekeying in the device, see &enum nl80211_rekey_data.
*
* @NL80211_ATTR_SCAN_SUPP_RATES: rates per to be advertised as supported in scan,
* nested array attribute containing an entry for each band, with the entry
* being a list of supported rates as defined by IEEE 802.11 7.3.2.2 but
* without the length restriction (at most %NL80211_MAX_SUPP_RATES).
*
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1217,6 +1222,8 @@ enum nl80211_attrs {
NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS,
NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN,
NL80211_ATTR_SCAN_SUPP_RATES,
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,