Search Linux Wireless

[PATCH] ieee80211: Output frequency rather than channel in scan results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In ieee80211, the output of scan results lists channels rather than
frequencies; however, NetworkManager needs frequency. This patch
changes the output from channel to frequency.

Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---

Index: wireless-2.6/net/ieee80211/ieee80211_wx.c
===================================================================
--- wireless-2.6.orig/net/ieee80211/ieee80211_wx.c
+++ wireless-2.6/net/ieee80211/ieee80211_wx.c
@@ -89,12 +89,15 @@ static char *ieee80211_translate_scan(st
 		start = iwe_stream_add_event(start, stop, &iwe, IW_EV_UINT_LEN);
 	}
 
-	/* Add frequency/channel */
+	/* Add frequency */
 	iwe.cmd = SIOCGIWFREQ;
-/*	iwe.u.freq.m = ieee80211_frequency(network->channel, network->mode);
-	iwe.u.freq.e = 3; */
-	iwe.u.freq.m = network->channel;
-	iwe.u.freq.e = 0;
+	if (network->channel < 15)
+		iwe.u.freq.m = 2407 + 5 * network->channel;
+	else
+		iwe.u.freq.m = 5000 + 5 * network->channel;
+	if (network->channel == 14)
+		iwe.u.freq.m = 2484;    /* special case for Japan */
+	iwe.u.freq.e = 6;
 	iwe.u.freq.i = 0;
 	start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux