diff options
author | David S. Miller <davem@davemloft.net> | 2009-09-17 02:01:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-17 02:01:24 +0200 |
commit | c127bdf9f6c8a8aaa531321721b29ab15f250a72 (patch) | |
tree | 1799546ce128e5425002ea9a0893cf86a2747490 /net/wireless/scan.c | |
parent | RxRPC: Use uX/sX rather than uintX_t/intX_t types (diff) | |
parent | cfg80211: fix SME connect (diff) | |
download | linux-c127bdf9f6c8a8aaa531321721b29ab15f250a72.tar.xz linux-c127bdf9f6c8a8aaa531321721b29ab15f250a72.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 4c210c2debc6..e5f92ee758f4 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -662,7 +662,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, int k; int wiphy_freq = wiphy->bands[band]->channels[j].center_freq; for (k = 0; k < wreq->num_channels; k++) { - int wext_freq = wreq->channel_list[k].m / 100000; + int wext_freq = cfg80211_wext_freq(wiphy, &wreq->channel_list[k]); if (wext_freq == wiphy_freq) goto wext_freq_found; } @@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev, wext_freq_not_found: ; } } + /* No channels found? */ + if (!i) { + err = -EINVAL; + goto out; + } /* Set real number of channels specified in creq->channels[] */ creq->n_channels = i; |