Search Linux Wireless

[PATCH] cfg80211: Convert 6 GHz channel frequency to channel number

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

 



Enhance function ieee80211_frequency_to_channel by adding 6 GHz
channels.

Signed-off-by: Amar Singhal <asinghal@xxxxxxxxxxxxxx>
---
 net/wireless/util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index cf63b63..9aba8d54 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -111,8 +111,10 @@ int ieee80211_frequency_to_channel(int freq)
 		return (freq - 2407) / 5;
 	else if (freq >= 4910 && freq <= 4980)
 		return (freq - 4000) / 5;
-	else if (freq <= 45000) /* DMG band lower limit */
+	else if (freq > 5000 && freq <= 5920)
 		return (freq - 5000) / 5;
+	else if (freq >= 5945 && freq <= 7205)
+		  return (freq - 5940) / 5;
 	else if (freq >= 58320 && freq <= 70200)
 		return (freq - 56160) / 2160;
 	else
--
1.9.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux