summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cfg.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-27 14:44:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-27 14:44:53 +0100
commitcc11f372e9371ec3a3dad02396dbe0a55eec0b8f (patch)
treefd22bdac975ee61053e787ad96c912fddc485370 /drivers/net/wireless/libertas/cfg.c
parentStaging: rtl8812ae: disable due to build errors (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml (diff)
downloadlinux-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.tar.xz
linux-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.zip
Merge branch 'master' into staging-next
We need the network changes in staging-next in order to be able to fix up the rtl8821ae driver to build properly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/wireless/libertas/cfg.c')
-rw-r--r--drivers/net/wireless/libertas/cfg.c7
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 *
_new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme)
{
struct cfg80211_scan_request *creq = NULL;
- int i, n_channels = 0;
+ int i, n_channels = ieee80211_get_num_supported_channels(wiphy);
enum ieee80211_band band;
- for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
- if (wiphy->bands[band])
- n_channels += wiphy->bands[band]->n_channels;
- }
-
creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) +
n_channels * sizeof(void *),
GFP_ATOMIC);