diff options
author | Karl Beldan <karl.beldan@rivierawaves.com> | 2014-10-07 05:42:18 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-10-10 11:11:13 -0400 |
commit | 2a84ee8625953fbce38b541aed77344044688a3e (patch) | |
tree | 47201745f406e428bf98acfb14482812e03d0372 /net | |
parent | 486cf4c08fe8b2b049bfccb76ce445ec1088fa25 (diff) |
cfg80211: set the rates mask in connection probes over specified freq
ATM, specifying the frequency when connecting sends a void 'supported
rates' EID.
Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
[fix memory leak in error path]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/sme.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index dc1668ff543b..0ab3711c79a0 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -80,9 +80,18 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) | |||
80 | if (!request) | 80 | if (!request) |
81 | return -ENOMEM; | 81 | return -ENOMEM; |
82 | 82 | ||
83 | if (wdev->conn->params.channel) | 83 | if (wdev->conn->params.channel) { |
84 | enum ieee80211_band band = wdev->conn->params.channel->band; | ||
85 | struct ieee80211_supported_band *sband = | ||
86 | wdev->wiphy->bands[band]; | ||
87 | |||
88 | if (!sband) { | ||
89 | kfree(request); | ||
90 | return -EINVAL; | ||
91 | } | ||
84 | request->channels[0] = wdev->conn->params.channel; | 92 | request->channels[0] = wdev->conn->params.channel; |
85 | else { | 93 | request->rates[band] = (1 << sband->n_bitrates) - 1; |
94 | } else { | ||
86 | int i = 0, j; | 95 | int i = 0, j; |
87 | enum ieee80211_band band; | 96 | enum ieee80211_band band; |
88 | struct ieee80211_supported_band *bands; | 97 | struct ieee80211_supported_band *bands; |