Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/wl/include/bcmwifi_channels.h
Views: 3959
/*1* Misc utility routines for WL and Apps2* This header file housing the define and function prototype use by3* both the wl driver, tools & Apps.4*5* $Copyright Open Broadcom Corporation$6*7* $Id: bcmwifi_channels.h 309193 2012-01-19 00:03:57Z stafford $8*/910#ifndef _bcmwifi_channels_h_11#define _bcmwifi_channels_h_121314/* A chanspec holds the channel number, band, bandwidth and control sideband */15typedef uint16 chanspec_t;1617/* channel defines */18#define CH_UPPER_SB 0x0119#define CH_LOWER_SB 0x0220#define CH_EWA_VALID 0x0421#define CH_80MHZ_APART 1622#define CH_40MHZ_APART 823#define CH_20MHZ_APART 424#define CH_10MHZ_APART 225#define CH_5MHZ_APART 1 /* 2G band channels are 5 Mhz apart */26#define CH_MAX_2G_CHANNEL 14 /* Max channel in 2G band */27#define MAXCHANNEL 224 /* max # supported channels. The max channel no is 216,28* this is that + 1 rounded up to a multiple of NBBY (8).29* DO NOT MAKE it > 255: channels are uint8's all over30*/31#define CHSPEC_CTLOVLP(sp1, sp2, sep) (ABS(wf_chspec_ctlchan(sp1) - wf_chspec_ctlchan(sp2)) < \32(sep))333435#ifndef D11AC_IOTYPES3637#define WL_CHANSPEC_CHAN_MASK 0x00ff38#define WL_CHANSPEC_CHAN_SHIFT 03940#define WL_CHANSPEC_CTL_SB_MASK 0x030041#define WL_CHANSPEC_CTL_SB_SHIFT 842#define WL_CHANSPEC_CTL_SB_LOWER 0x010043#define WL_CHANSPEC_CTL_SB_UPPER 0x020044#define WL_CHANSPEC_CTL_SB_NONE 0x03004546#define WL_CHANSPEC_BW_MASK 0x0C0047#define WL_CHANSPEC_BW_SHIFT 1048#define WL_CHANSPEC_BW_10 0x040049#define WL_CHANSPEC_BW_20 0x080050#define WL_CHANSPEC_BW_40 0x0C005152#define WL_CHANSPEC_BAND_MASK 0xf00053#define WL_CHANSPEC_BAND_SHIFT 1254#ifdef WL_CHANSPEC_BAND_5G55#undef WL_CHANSPEC_BAND_5G56#endif57#ifdef WL_CHANSPEC_BAND_2G58#undef WL_CHANSPEC_BAND_2G59#endif60#define WL_CHANSPEC_BAND_5G 0x100061#define WL_CHANSPEC_BAND_2G 0x200062#define INVCHANSPEC 2556364/* channel defines */65#define LOWER_20_SB(channel) (((channel) > CH_10MHZ_APART) ? ((channel) - CH_10MHZ_APART) : 0)66#define UPPER_20_SB(channel) (((channel) < (MAXCHANNEL - CH_10MHZ_APART)) ? \67((channel) + CH_10MHZ_APART) : 0)6869#define LL_20_SB(channel) (((channel) > 3 * CH_10MHZ_APART) ? ((channel) - 3 * CH_10MHZ_APART) : 0)70#define UU_20_SB(channel) (((channel) < (MAXCHANNEL - 3 * CH_10MHZ_APART)) ? \71((channel) + 3 * CH_10MHZ_APART) : 0)72#define LU_20_SB(channel) LOWER_20_SB(channel)73#define UL_20_SB(channel) UPPER_20_SB(channel)7475#define CHSPEC_WLCBANDUNIT(chspec) (CHSPEC_IS5G(chspec) ? BAND_5G_INDEX : BAND_2G_INDEX)76#define CH20MHZ_CHSPEC(channel) (chanspec_t)((chanspec_t)(channel) | WL_CHANSPEC_BW_20 | \77WL_CHANSPEC_CTL_SB_NONE | (((channel) <= CH_MAX_2G_CHANNEL) ? \78WL_CHANSPEC_BAND_2G : WL_CHANSPEC_BAND_5G))79#define NEXT_20MHZ_CHAN(channel) (((channel) < (MAXCHANNEL - CH_20MHZ_APART)) ? \80((channel) + CH_20MHZ_APART) : 0)81#define CH40MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \82((channel) | (ctlsb) | WL_CHANSPEC_BW_40 | \83((channel) <= CH_MAX_2G_CHANNEL ? WL_CHANSPEC_BAND_2G : \84WL_CHANSPEC_BAND_5G))85#define CHSPEC_CHANNEL(chspec) ((uint8)((chspec) & WL_CHANSPEC_CHAN_MASK))86#define CHSPEC_BAND(chspec) ((chspec) & WL_CHANSPEC_BAND_MASK)8788/* chanspec stores radio channel & flags to indicate control channel location, i.e. upper/lower */89#define CHSPEC_CTL_SB(chspec) ((chspec) & WL_CHANSPEC_CTL_SB_MASK)90#define CHSPEC_BW(chspec) ((chspec) & WL_CHANSPEC_BW_MASK)9192#ifdef WL11N_20MHZONLY9394#define CHSPEC_IS10(chspec) 095#define CHSPEC_IS20(chspec) 196#ifndef CHSPEC_IS4097#define CHSPEC_IS40(chspec) 098#endif99100#else /* !WL11N_20MHZONLY */101102#define CHSPEC_IS10(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_10)103#define CHSPEC_IS20(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_20)104#ifndef CHSPEC_IS40105#define CHSPEC_IS40(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_40)106#endif107108#endif /* !WL11N_20MHZONLY */109110#define CHSPEC_IS5G(chspec) (((chspec) & WL_CHANSPEC_BAND_MASK) == WL_CHANSPEC_BAND_5G)111#define CHSPEC_IS2G(chspec) (((chspec) & WL_CHANSPEC_BAND_MASK) == WL_CHANSPEC_BAND_2G)112#define CHSPEC_SB_NONE(chspec) (((chspec) & WL_CHANSPEC_CTL_SB_MASK) == WL_CHANSPEC_CTL_SB_NONE)113#define CHSPEC_SB_UPPER(chspec) (((chspec) & WL_CHANSPEC_CTL_SB_MASK) == WL_CHANSPEC_CTL_SB_UPPER)114#define CHSPEC_SB_LOWER(chspec) (((chspec) & WL_CHANSPEC_CTL_SB_MASK) == WL_CHANSPEC_CTL_SB_LOWER)115#define CHSPEC_CTL_CHAN(chspec) ((CHSPEC_SB_LOWER(chspec)) ? \116(LOWER_20_SB(((chspec) & WL_CHANSPEC_CHAN_MASK))) : \117(UPPER_20_SB(((chspec) & WL_CHANSPEC_CHAN_MASK))))118#define CHSPEC2WLC_BAND(chspec) (CHSPEC_IS5G(chspec) ? WLC_BAND_5G : WLC_BAND_2G)119120#define CHANSPEC_STR_LEN 8121122#else /* D11AC_IOTYPES */123124#define WL_CHANSPEC_CHAN_MASK 0x00ff125#define WL_CHANSPEC_CHAN_SHIFT 0126#define WL_CHANSPEC_CHAN1_MASK 0x000f127#define WL_CHANSPEC_CHAN1_SHIFT 0128#define WL_CHANSPEC_CHAN2_MASK 0x00f0129#define WL_CHANSPEC_CHAN2_SHIFT 4130131#define WL_CHANSPEC_CTL_SB_MASK 0x0700132#define WL_CHANSPEC_CTL_SB_SHIFT 8133#define WL_CHANSPEC_CTL_SB_LLL 0x0000134#define WL_CHANSPEC_CTL_SB_LLU 0x0100135#define WL_CHANSPEC_CTL_SB_LUL 0x0200136#define WL_CHANSPEC_CTL_SB_LUU 0x0300137#define WL_CHANSPEC_CTL_SB_ULL 0x0400138#define WL_CHANSPEC_CTL_SB_ULU 0x0500139#define WL_CHANSPEC_CTL_SB_UUL 0x0600140#define WL_CHANSPEC_CTL_SB_UUU 0x0700141#define WL_CHANSPEC_CTL_SB_LL WL_CHANSPEC_CTL_SB_LLL142#define WL_CHANSPEC_CTL_SB_LU WL_CHANSPEC_CTL_SB_LLU143#define WL_CHANSPEC_CTL_SB_UL WL_CHANSPEC_CTL_SB_LUL144#define WL_CHANSPEC_CTL_SB_UU WL_CHANSPEC_CTL_SB_LUU145#define WL_CHANSPEC_CTL_SB_L WL_CHANSPEC_CTL_SB_LLL146#define WL_CHANSPEC_CTL_SB_U WL_CHANSPEC_CTL_SB_LLU147#define WL_CHANSPEC_CTL_SB_LOWER WL_CHANSPEC_CTL_SB_LLL148#define WL_CHANSPEC_CTL_SB_UPPER WL_CHANSPEC_CTL_SB_LLU149150#define WL_CHANSPEC_BW_MASK 0x3800151#define WL_CHANSPEC_BW_SHIFT 11152#define WL_CHANSPEC_BW_5 0x0000153#define WL_CHANSPEC_BW_10 0x0800154#define WL_CHANSPEC_BW_20 0x1000155#define WL_CHANSPEC_BW_40 0x1800156#define WL_CHANSPEC_BW_80 0x2000157#define WL_CHANSPEC_BW_160 0x2800158#define WL_CHANSPEC_BW_8080 0x3000159160#define WL_CHANSPEC_BAND_MASK 0xc000161#define WL_CHANSPEC_BAND_SHIFT 14162#define WL_CHANSPEC_BAND_2G 0x0000163#define WL_CHANSPEC_BAND_3G 0x4000164#define WL_CHANSPEC_BAND_4G 0x8000165#define WL_CHANSPEC_BAND_5G 0xc000166#define INVCHANSPEC 255167168/* channel defines */169#define LOWER_20_SB(channel) (((channel) > CH_10MHZ_APART) ? \170((channel) - CH_10MHZ_APART) : 0)171#define UPPER_20_SB(channel) (((channel) < (MAXCHANNEL - CH_10MHZ_APART)) ? \172((channel) + CH_10MHZ_APART) : 0)173174#define LL_20_SB(channel) (((channel) > 3 * CH_10MHZ_APART) ? ((channel) - 3 * CH_10MHZ_APART) : 0)175#define UU_20_SB(channel) (((channel) < (MAXCHANNEL - 3 * CH_10MHZ_APART)) ? \176((channel) + 3 * CH_10MHZ_APART) : 0)177#define LU_20_SB(channel) LOWER_20_SB(channel)178#define UL_20_SB(channel) UPPER_20_SB(channel)179180#define LOWER_40_SB(channel) ((channel) - CH_20MHZ_APART)181#define UPPER_40_SB(channel) ((channel) + CH_20MHZ_APART)182#define CHSPEC_WLCBANDUNIT(chspec) (CHSPEC_IS5G(chspec) ? BAND_5G_INDEX : BAND_2G_INDEX)183#define CH20MHZ_CHSPEC(channel) (chanspec_t)((chanspec_t)(channel) | WL_CHANSPEC_BW_20 | \184(((channel) <= CH_MAX_2G_CHANNEL) ? \185WL_CHANSPEC_BAND_2G : WL_CHANSPEC_BAND_5G))186#define NEXT_20MHZ_CHAN(channel) (((channel) < (MAXCHANNEL - CH_20MHZ_APART)) ? \187((channel) + CH_20MHZ_APART) : 0)188#define CH40MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \189((channel) | (ctlsb) | WL_CHANSPEC_BW_40 | \190((channel) <= CH_MAX_2G_CHANNEL ? WL_CHANSPEC_BAND_2G : \191WL_CHANSPEC_BAND_5G))192#define CH80MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \193((channel) | (ctlsb) | \194WL_CHANSPEC_BW_80 | WL_CHANSPEC_BAND_5G)195#define CH160MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \196((channel) | (ctlsb) | \197WL_CHANSPEC_BW_160 | WL_CHANSPEC_BAND_5G)198199/* simple MACROs to get different fields of chanspec */200#define CHSPEC_CHANNEL(chspec) ((uint8)((chspec) & WL_CHANSPEC_CHAN_MASK))201#define CHSPEC_CHAN1(chspec) ((chspec) & WL_CHANSPEC_CHAN1_MASK)202#define CHSPEC_CHAN2(chspec) ((chspec) & WL_CHANSPEC_CHAN2_MASK)203#define CHSPEC_BAND(chspec) ((chspec) & WL_CHANSPEC_BAND_MASK)204#define CHSPEC_CTL_SB(chspec) ((chspec) & WL_CHANSPEC_CTL_SB_MASK)205#define CHSPEC_BW(chspec) ((chspec) & WL_CHANSPEC_BW_MASK)206207#ifdef WL11N_20MHZONLY208209#define CHSPEC_IS10(chspec) 0210#define CHSPEC_IS20(chspec) 1211#ifndef CHSPEC_IS40212#define CHSPEC_IS40(chspec) 0213#endif214#ifndef CHSPEC_IS80215#define CHSPEC_IS80(chspec) 0216#endif217#ifndef CHSPEC_IS160218#define CHSPEC_IS160(chspec) 0219#endif220#ifndef CHSPEC_IS8080221#define CHSPEC_IS8080(chspec) 0222#endif223224#else /* !WL11N_20MHZONLY */225226#define CHSPEC_IS10(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_10)227#define CHSPEC_IS20(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_20)228#ifndef CHSPEC_IS40229#define CHSPEC_IS40(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_40)230#endif231#ifndef CHSPEC_IS80232#define CHSPEC_IS80(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_80)233#endif234#ifndef CHSPEC_IS160235#define CHSPEC_IS160(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_160)236#endif237#ifndef CHSPEC_IS8080238#define CHSPEC_IS8080(chspec) (((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_8080)239#endif240241#endif /* !WL11N_20MHZONLY */242243#define CHSPEC_IS5G(chspec) (((chspec) & WL_CHANSPEC_BAND_MASK) == WL_CHANSPEC_BAND_5G)244#define CHSPEC_IS2G(chspec) (((chspec) & WL_CHANSPEC_BAND_MASK) == WL_CHANSPEC_BAND_2G)245#define CHSPEC_SB_UPPER(chspec) \246((((chspec) & WL_CHANSPEC_CTL_SB_MASK) == WL_CHANSPEC_CTL_SB_UPPER) && \247(((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_40))248#define CHSPEC_SB_LOWER(chspec) \249((((chspec) & WL_CHANSPEC_CTL_SB_MASK) == WL_CHANSPEC_CTL_SB_LOWER) && \250(((chspec) & WL_CHANSPEC_BW_MASK) == WL_CHANSPEC_BW_40))251#define CHSPEC2WLC_BAND(chspec) (CHSPEC_IS5G(chspec) ? WLC_BAND_5G : WLC_BAND_2G)252253/**254* Number of chars needed for wf_chspec_ntoa() destination character buffer.255*/256#define CHANSPEC_STR_LEN 20257258259/* Legacy Chanspec defines260* These are the defines for the previous format of the chanspec_t261*/262#define WL_LCHANSPEC_CHAN_MASK 0x00ff263#define WL_LCHANSPEC_CHAN_SHIFT 0264265#define WL_LCHANSPEC_CTL_SB_MASK 0x0300266#define WL_LCHANSPEC_CTL_SB_SHIFT 8267#define WL_LCHANSPEC_CTL_SB_LOWER 0x0100268#define WL_LCHANSPEC_CTL_SB_UPPER 0x0200269#define WL_LCHANSPEC_CTL_SB_NONE 0x0300270271#define WL_LCHANSPEC_BW_MASK 0x0C00272#define WL_LCHANSPEC_BW_SHIFT 10273#define WL_LCHANSPEC_BW_10 0x0400274#define WL_LCHANSPEC_BW_20 0x0800275#define WL_LCHANSPEC_BW_40 0x0C00276277#define WL_LCHANSPEC_BAND_MASK 0xf000278#define WL_LCHANSPEC_BAND_SHIFT 12279#define WL_LCHANSPEC_BAND_5G 0x1000280#define WL_LCHANSPEC_BAND_2G 0x2000281282#define LCHSPEC_CHANNEL(chspec) ((uint8)((chspec) & WL_LCHANSPEC_CHAN_MASK))283#define LCHSPEC_BAND(chspec) ((chspec) & WL_LCHANSPEC_BAND_MASK)284#define LCHSPEC_CTL_SB(chspec) ((chspec) & WL_LCHANSPEC_CTL_SB_MASK)285#define LCHSPEC_BW(chspec) ((chspec) & WL_LCHANSPEC_BW_MASK)286#define LCHSPEC_IS10(chspec) (((chspec) & WL_LCHANSPEC_BW_MASK) == WL_LCHANSPEC_BW_10)287#define LCHSPEC_IS20(chspec) (((chspec) & WL_LCHANSPEC_BW_MASK) == WL_LCHANSPEC_BW_20)288#define LCHSPEC_IS40(chspec) (((chspec) & WL_LCHANSPEC_BW_MASK) == WL_LCHANSPEC_BW_40)289#define LCHSPEC_IS5G(chspec) (((chspec) & WL_LCHANSPEC_BAND_MASK) == WL_LCHANSPEC_BAND_5G)290#define LCHSPEC_IS2G(chspec) (((chspec) & WL_LCHANSPEC_BAND_MASK) == WL_LCHANSPEC_BAND_2G)291292#define LCHSPEC_CREATE(chan, band, bw, sb) ((uint16)((chan) | (sb) | (bw) | (band)))293294#endif /* D11AC_IOTYPES */295296/*297* WF_CHAN_FACTOR_* constants are used to calculate channel frequency298* given a channel number.299* chan_freq = chan_factor * 500Mhz + chan_number * 5300*/301302/**303* Channel Factor for the starting frequence of 2.4 GHz channels.304* The value corresponds to 2407 MHz.305*/306#define WF_CHAN_FACTOR_2_4_G 4814 /* 2.4 GHz band, 2407 MHz */307308/**309* Channel Factor for the starting frequence of 5 GHz channels.310* The value corresponds to 5000 MHz.311*/312#define WF_CHAN_FACTOR_5_G 10000 /* 5 GHz band, 5000 MHz */313314/**315* Channel Factor for the starting frequence of 4.9 GHz channels.316* The value corresponds to 4000 MHz.317*/318#define WF_CHAN_FACTOR_4_G 8000 /* 4.9 GHz band for Japan */319320#define WLC_2G_25MHZ_OFFSET 5 /* 2.4GHz band channel offset */321322/**323* Convert chanspec to ascii string324*325* @param chspec chanspec format326* @param buf ascii string of chanspec327*328* @return pointer to buf with room for at least CHANSPEC_STR_LEN bytes329*330* @see CHANSPEC_STR_LEN331*/332extern char * wf_chspec_ntoa(chanspec_t chspec, char *buf);333334/**335* Convert ascii string to chanspec336*337* @param a pointer to input string338*339* @return >= 0 if successful or 0 otherwise340*/341extern chanspec_t wf_chspec_aton(const char *a);342343/**344* Verify the chanspec fields are valid.345*346* Verify the chanspec is using a legal set field values, i.e. that the chanspec347* specified a band, bw, ctl_sb and channel and that the combination could be348* legal given some set of circumstances.349*350* @param chanspec input chanspec to verify351*352* @return TRUE if the chanspec is malformed, FALSE if it looks good.353*/354extern bool wf_chspec_malformed(chanspec_t chanspec);355356/**357* Verify the chanspec specifies a valid channel according to 802.11.358*359* @param chanspec input chanspec to verify360*361* @return TRUE if the chanspec is a valid 802.11 channel362*/363extern bool wf_chspec_valid(chanspec_t chanspec);364365/**366* Return the primary (control) channel.367*368* This function returns the channel number of the primary 20MHz channel. For369* 20MHz channels this is just the channel number. For 40MHz or wider channels370* it is the primary 20MHz channel specified by the chanspec.371*372* @param chspec input chanspec373*374* @return Returns the channel number of the primary 20MHz channel375*/376extern uint8 wf_chspec_ctlchan(chanspec_t chspec);377378/**379* Return the primary (control) chanspec.380*381* This function returns the chanspec of the primary 20MHz channel. For 20MHz382* channels this is just the chanspec. For 40MHz or wider channels it is the383* chanspec of the primary 20MHZ channel specified by the chanspec.384*385* @param chspec input chanspec386*387* @return Returns the chanspec of the primary 20MHz channel388*/389extern chanspec_t wf_chspec_ctlchspec(chanspec_t chspec);390391/**392* Return a channel number corresponding to a frequency.393*394* This function returns the chanspec for the primary 40MHz of an 80MHz channel.395* The control sideband specifies the same 20MHz channel that the 80MHz channel is using396* as the primary 20MHz channel.397*/398extern chanspec_t wf_chspec_primary40_chspec(chanspec_t chspec);399400/*401* Return the channel number for a given frequency and base frequency.402* The returned channel number is relative to the given base frequency.403* If the given base frequency is zero, a base frequency of 5 GHz is assumed for404* frequencies from 5 - 6 GHz, and 2.407 GHz is assumed for 2.4 - 2.5 GHz.405*406* Frequency is specified in MHz.407* The base frequency is specified as (start_factor * 500 kHz).408* Constants WF_CHAN_FACTOR_2_4_G, WF_CHAN_FACTOR_5_G are defined for409* 2.4 GHz and 5 GHz bands.410*411* The returned channel will be in the range [1, 14] in the 2.4 GHz band412* and [0, 200] otherwise.413* -1 is returned if the start_factor is WF_CHAN_FACTOR_2_4_G and the414* frequency is not a 2.4 GHz channel, or if the frequency is not and even415* multiple of 5 MHz from the base frequency to the base plus 1 GHz.416*417* Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2418*419* @param freq frequency in MHz420* @param start_factor base frequency in 500 kHz units, e.g. 10000 for 5 GHz421*422* @return Returns a channel number423*424* @see WF_CHAN_FACTOR_2_4_G425* @see WF_CHAN_FACTOR_5_G426*/427extern int wf_mhz2channel(uint freq, uint start_factor);428429/**430* Return the center frequency in MHz of the given channel and base frequency.431*432* Return the center frequency in MHz of the given channel and base frequency.433* The channel number is interpreted relative to the given base frequency.434*435* The valid channel range is [1, 14] in the 2.4 GHz band and [0, 200] otherwise.436* The base frequency is specified as (start_factor * 500 kHz).437* Constants WF_CHAN_FACTOR_2_4_G, WF_CHAN_FACTOR_5_G are defined for438* 2.4 GHz and 5 GHz bands.439* The channel range of [1, 14] is only checked for a start_factor of440* WF_CHAN_FACTOR_2_4_G (4814).441* Odd start_factors produce channels on .5 MHz boundaries, in which case442* the answer is rounded down to an integral MHz.443* -1 is returned for an out of range channel.444*445* Reference 802.11 REVma, section 17.3.8.3, and 802.11B section 18.4.6.2446*447* @param channel input channel number448* @param start_factor base frequency in 500 kHz units, e.g. 10000 for 5 GHz449*450* @return Returns a frequency in MHz451*452* @see WF_CHAN_FACTOR_2_4_G453* @see WF_CHAN_FACTOR_5_G454*/455extern int wf_channel2mhz(uint channel, uint start_factor);456457/**458* Convert ctl chan and bw to chanspec459*460* @param ctl_ch channel461* @param bw bandwidth462*463* @return > 0 if successful or 0 otherwise464*465*/466extern uint16 wf_channel2chspec(uint ctl_ch, uint bw);467468extern uint wf_channel2freq(uint channel);469extern uint wf_freq2channel(uint freq);470471472#endif /* _bcmwifi_channels_h_ */473474475