|
@@ -80,9 +80,18 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev)
|
|
if (!request)
|
|
if (!request)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
- if (wdev->conn->params.channel)
|
|
|
|
|
|
+ if (wdev->conn->params.channel) {
|
|
|
|
+ enum ieee80211_band band = wdev->conn->params.channel->band;
|
|
|
|
+ struct ieee80211_supported_band *sband =
|
|
|
|
+ wdev->wiphy->bands[band];
|
|
|
|
+
|
|
|
|
+ if (!sband) {
|
|
|
|
+ kfree(request);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
request->channels[0] = wdev->conn->params.channel;
|
|
request->channels[0] = wdev->conn->params.channel;
|
|
- else {
|
|
|
|
|
|
+ request->rates[band] = (1 << sband->n_bitrates) - 1;
|
|
|
|
+ } else {
|
|
int i = 0, j;
|
|
int i = 0, j;
|
|
enum ieee80211_band band;
|
|
enum ieee80211_band band;
|
|
struct ieee80211_supported_band *bands;
|
|
struct ieee80211_supported_band *bands;
|