diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 116f4aba08d6..32f75007a825 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -1268,14 +1268,9 @@ static struct cfg80211_scan_request * | |||
1268 | _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) | 1268 | _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) |
1269 | { | 1269 | { |
1270 | struct cfg80211_scan_request *creq = NULL; | 1270 | struct cfg80211_scan_request *creq = NULL; |
1271 | int i, n_channels = 0; | 1271 | int i, n_channels = ieee80211_get_num_supported_channels(wiphy); |
1272 | enum ieee80211_band band; | 1272 | enum ieee80211_band band; |
1273 | 1273 | ||
1274 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | ||
1275 | if (wiphy->bands[band]) | ||
1276 | n_channels += wiphy->bands[band]->n_channels; | ||
1277 | } | ||
1278 | |||
1279 | creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) + | 1274 | creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) + |
1280 | n_channels * sizeof(void *), | 1275 | n_channels * sizeof(void *), |
1281 | GFP_ATOMIC); | 1276 | GFP_ATOMIC); |