wireless part: 2.3 gh band

From: Dorijan Jelincic <dorijan_at_kset.org>
Date: Wed, 24 Aug 2005 11:23:11 +0200
Hello freebsd-current,

  I am using 2.3 gh band since it is legal radioamater band, and it
  would be great if you could implement it in ieee80211.c

ieee80211_mhz2ieee(u_int freq, u_int flags)
{
        if (flags & IEEE80211_CHAN_2GHZ) {      /* 2GHz band */
                if (freq == 2484)
                        return 14;
                if (freq<=2402)
                        return (255 - (2402-freq)/5);           /* 2.3GHz band */
                if (freq < 2484)
                        return (freq - 2407) / 5;
                else
                        return 15 + ((freq - 2512) / 20);}

.....


ieee80211_ieee2mhz(u_int chan, u_int flags)
{
        if (flags & IEEE80211_CHAN_2GHZ) {      /* 2GHz band */
                if (chan == 14)
                        return 2484;
                if (chan>236)
                        return 2402 - (255-chan)*5;                /* 2.3GHz band */

                if (chan < 14)
                        return 2407 + chan*5;
                else
                        return 2512 + ((chan-15)*20);}


This way channel list is compatibile even with Mikrotik and StarOS...

                        
-- 
"Well it's just that lately I've noticed 
everyone seems to trust me. It's quite 
unnerving." - Garak, DS9 : Empok Nor

                Dorijan Jelincic, 9a3ajd
Received on Wed Aug 24 2005 - 07:23:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:42 UTC