cfg80211: use cfg80211_wext_freq() for freq conversion
authorHolger Schurig <h.schurig@mn-solutions.de>
Fri, 11 Sep 2009 08:13:53 +0000 (10:13 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Sep 2009 18:36:04 +0000 (14:36 -0400)
WEXT's "struct iw_freq" can also be used to handle a channel. This patch now
uses cfg80211_wext_freq() instead of hand-converting the frequency. That
allows user-space to specify channels as well, like with SIOCSIWFREQ.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/scan.c

index 4c210c2debc6773e3b84b703a3ca3b5b3fd941b2..6c20b6515ab08ad694a2efea0fe76e3b4aeea6dd 100644 (file)
@@ -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;
                                }