Search Linux Wireless

[PATCH 4/4] Fix print channel number for 60g

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

 



    Signed-off-by: Vladimir Kondratiev <qca_vkondrat@xxxxxxxxxxxxxxxx>
---
 util.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/util.c b/util.c
index 26d27c3..20d3d06 100644
--- a/util.c
+++ b/util.c
@@ -269,7 +269,13 @@ int ieee80211_frequency_to_channel(int freq)
 		return (freq - 2407) / 5;
 
 	/* FIXME: dot11ChannelStartingFactor (802.11-2007 17.3.8.3.2) */
-	return freq/5 - 1000;
+	if (freq < 45000)
+		return freq/5 - 1000;
+
+	if (freq >= 58320 && freq <= 64800)
+		return (freq - 56160) / 2160;
+
+    return 0;
 }
 
 void print_ssid_escaped(const uint8_t len, const uint8_t *data)
-- 
1.7.9.5

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux