summaryrefslogtreecommitdiffstats
path: root/net/wireless/sme.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-01-13 14:40:59 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-01-13 14:40:59 -0500
commitf13352519ee8c4b22b87fc1a47743d1f53ea193e (patch)
tree48c18144f3e5e530ec61d5eadbb5a34675a69fe8 /net/wireless/sme.c
parent559c33d84da71e07816e692bfd73ad92675256a6 (diff)
parent26b0e411d37a2ca5992d02884dc3fa4e1907e598 (diff)
downloadop-kernel-dev-f13352519ee8c4b22b87fc1a47743d1f53ea193e.zip
op-kernel-dev-f13352519ee8c4b22b87fc1a47743d1f53ea193e.tar.gz
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r--net/wireless/sme.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 5d6e7bb..a635091 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -70,18 +70,11 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev)
if (rdev->scan_req)
return -EBUSY;
- if (wdev->conn->params.channel) {
+ if (wdev->conn->params.channel)
n_channels = 1;
- } else {
- enum ieee80211_band band;
- n_channels = 0;
+ else
+ n_channels = ieee80211_get_num_supported_channels(wdev->wiphy);
- for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
- if (!wdev->wiphy->bands[band])
- continue;
- n_channels += wdev->wiphy->bands[band]->n_channels;
- }
- }
request = kzalloc(sizeof(*request) + sizeof(request->ssids[0]) +
sizeof(request->channels[0]) * n_channels,
GFP_KERNEL);
OpenPOWER on IntegriCloud