diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-07-18 16:08:35 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-19 20:49:58 (GMT) |
commit | 34850ab25d74ab4eead62c3b4a9e8036a25cc669 (patch) | |
tree | c1aa56f2d94851804969b71523ade13bb9db693c /net/wireless/scan.c | |
parent | 0b5dd734d3545a9833c0bceeed5088ad9a1ca5e3 (diff) | |
download | linux-34850ab25d74ab4eead62c3b4a9e8036a25cc669.tar.xz |
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>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 1c4672e..1e7ff94 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -862,6 +862,9 @@ int cfg80211_wext_siwscan(struct net_device *dev, creq->n_ssids = 0; } + for (i = 0; i < IEEE80211_NUM_BANDS; i++) + creq->rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1; + rdev->scan_req = creq; err = rdev->ops->scan(wiphy, dev, creq); if (err) { |