diff mbox

cfg80211: use cfg80211_wext_freq() for freq conversion

Message ID 200909111013.53585.h.schurig@mn-solutions.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Holger Schurig Sept. 11, 2009, 8:13 a.m. UTC
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>
diff mbox

Patch

Index: linux-wl/net/wireless/scan.c
===================================================================
--- linux-wl.orig/net/wireless/scan.c	2009-09-11 09:05:27.000000000 +0200
+++ linux-wl/net/wireless/scan.c	2009-09-11 09:05:39.000000000 +0200
@@ -662,7 +662,7 @@  int cfg80211_wext_siwscan(struct net_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;
 				}