diff options
author | sam <sam@FreeBSD.org> | 2006-04-26 16:00:37 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-04-26 16:00:37 +0000 |
commit | c8ffa2a506733319004d3fa1e61175a7c57c8e77 (patch) | |
tree | af6cff8e8013602d120e8bf10ef648ef1f493440 /sys/net80211 | |
parent | 6b4573613f3117da53b383f4bb1f3ff3094be0d9 (diff) | |
download | FreeBSD-src-c8ffa2a506733319004d3fa1e61175a7c57c8e77.zip FreeBSD-src-c8ffa2a506733319004d3fa1e61175a7c57c8e77.tar.gz |
back out public safety-specific channel number mapping; we can't do
it until we know it should be applied as otherwise we can map 11a
channels into the 2.4G range and choose the wrong item from the
chanenl array
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 8420dbc..33cea93 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -236,7 +236,6 @@ ieee80211_ifdetach(struct ieee80211com *ic) int ieee80211_mhz2ieee(u_int freq, u_int flags) { -#define IS_CHAN_IN_PUBLIC_SAFETY_BAND(_c) ((_c) > 4940 && (_c) < 4990) if (flags & IEEE80211_CHAN_2GHZ) { /* 2GHz band */ if (freq == 2484) return 14; @@ -245,9 +244,6 @@ ieee80211_mhz2ieee(u_int freq, u_int flags) else return 15 + ((freq - 2512) / 20); } else if (flags & IEEE80211_CHAN_5GHZ) { /* 5Ghz band */ - if (IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) - return ((freq * 10) + - (((freq % 5) == 2) ? 5 : 0) - 49400) / 5; if (freq <= 5000) return (freq - 4000) / 5; else @@ -258,17 +254,13 @@ ieee80211_mhz2ieee(u_int freq, u_int flags) if (freq < 2484) return ((int) freq - 2407) / 5; if (freq < 5000) { - if (IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) - return ((freq * 10) + - (((freq % 5) == 2) ? 5 : 0) - 49400)/5; - else if (freq > 4900) + if (freq > 4900) return (freq - 4000) / 5; else return 15 + ((freq - 2512) / 20); } return (freq - 5000) / 5; } -#undef IS_CHAN_IN_PUBLIC_SAFETY_BAND } /* |