Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] cfg80211: fix channel to frequency mapping in 5.9GHz range
@ 2013-10-11 11:59 Dennis H Jensen
  2013-10-11 13:56 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Dennis H Jensen @ 2013-10-11 11:59 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes, Dennis H Jensen

Currently the frequencies (5910 - 5980) cannot be used because they
are mapped into the 4.9GHz channels; this patch closes that hole.

Signed-off-by: Dennis H Jensen <dennis.h.jensen@siemens.com>
---
 net/wireless/util.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index 3c8be61..59b763f 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -79,6 +79,8 @@ int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band)
 	case IEEE80211_BAND_5GHZ:
 		if (chan >= 182 && chan <= 196)
 			return 4000 + chan * 5;
+		else if (chan > 196)
+			return 5000 + (chan - 15) * 5;
 		else
 			return 5000 + chan * 5;
 		break;
@@ -102,6 +104,8 @@ int ieee80211_frequency_to_channel(int freq)
 		return (freq - 2407) / 5;
 	else if (freq >= 4910 && freq <= 4980)
 		return (freq - 4000) / 5;
+	else if (freq >= 5910)
+		return (freq - 5000) / 5 + 15;
 	else if (freq <= 45000) /* DMG band lower limit */
 		return (freq - 5000) / 5;
 	else if (freq >= 58320 && freq <= 64800)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-10-17 14:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 11:59 [PATCH] cfg80211: fix channel to frequency mapping in 5.9GHz range Dennis H Jensen
2013-10-11 13:56 ` Johannes Berg
2013-10-11 15:45   ` Dennis H Jensen
2013-10-14 12:02     ` Johannes Berg
2013-10-14 12:16       ` Dennis H Jensen
2013-10-14 14:02         ` Johannes Berg
2013-10-14 14:58           ` Dennis H Jensen
2013-10-14 15:06             ` Johannes Berg
2013-10-15  9:40               ` Dennis H Jensen
2013-10-17 14:33                 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox