Lines Matching +full:convert +full:- +full:channels
8 * Copyright (C) 1999-2017, Broadcom Corporation
29 * <<Broadcom-WL-IPTag/Open:>>
31 * $Id: bcmwifi_channels.h 695288 2017-04-19 17:20:39Z $
48 #define CH_5MHZ_APART 1 /* 2G band channels are 5 Mhz apart */
55 /* maximum # channels the s/w supports */
56 #define MAXCHANNEL 224 /* max # supported channels. The max channel no is above,
58 * DO NOT MAKE it > 255: channels are uint8's all over
60 #define MAXCHANNEL_NUM (MAXCHANNEL - 1) /* max channel number */
66 uint8 vec[MAXCHANNEL/8]; /* bitvec of channels */
73 (ABS(wf_chspec_ctlchan(sp1) - wf_chspec_ctlchan(sp2)) < (sep))
130 ((channel) - CH_10MHZ_APART) : 0)
131 #define UPPER_20_SB(channel) (((channel) < (MAXCHANNEL - CH_10MHZ_APART)) ? \
135 #define LL_20_SB(channel) (((channel) > 3 * CH_10MHZ_APART) ? ((channel) - 3 * CH_10MHZ_APART) : 0)
136 #define UU_20_SB(channel) (((channel) < (MAXCHANNEL - 3 * CH_10MHZ_APART)) ? \
141 #define LOWER_40_SB(channel) ((channel) - CH_20MHZ_APART)
147 #define NEXT_20MHZ_CHAN(channel) (((channel) < (MAXCHANNEL - CH_20MHZ_APART)) ? \
218 (((channel) > (WL_CHANSPEC_CHAN_MASK & ((uint16)((-(offset)) * CH_10MHZ_APART)))) ?\
220 (((channel) < (uint16)(MAXCHANNEL - (offset) * CH_10MHZ_APART)) ? \
225 #define LLL_20_SB_160(channel) CH_OFF_10MHZ_MULTIPLES(channel, -7)
226 #define LLU_20_SB_160(channel) CH_OFF_10MHZ_MULTIPLES(channel, -5)
227 #define LUL_20_SB_160(channel) CH_OFF_10MHZ_MULTIPLES(channel, -3)
228 #define LUU_20_SB_160(channel) CH_OFF_10MHZ_MULTIPLES(channel, -1)
245 #define LLL_20_SB_8080(chspec) CH_OFF_10MHZ_MULTIPLES(LOWER_80_SB(chspec), -3)
246 #define LLU_20_SB_8080(chspec) CH_OFF_10MHZ_MULTIPLES(LOWER_80_SB(chspec), -1)
249 #define ULL_20_SB_8080(chspec) CH_OFF_10MHZ_MULTIPLES(UPPER_80_SB(chspec), -3)
250 #define ULU_20_SB_8080(chspec) CH_OFF_10MHZ_MULTIPLES(UPPER_80_SB(chspec), -1)
394 * This function returns TRUE if both the chanspec can co-exist in PHY.
395 * Addition to primary20 channel, the function checks for side band for 2g 40 channels
485 * Channel Factor for the starting frequence of 2.4 GHz channels.
491 * Channel Factor for the starting frequence of 5 GHz channels.
497 * Channel Factor for the starting frequence of 4.9 GHz channels.
505 * No of sub-band vlaue of the specified Mhz chanspec
523 * Convert chanspec to ascii string
536 * Convert chanspec to ascii string
549 * Convert ascii string to chanspec
558 * Convert ascii string to chanspec
593 * 20MHz channels this is just the channel number. For 40MHz or wider channels
626 * channels this is just the chanspec. For 40MHz or wider channels it is the
651 * frequencies from 5 - 6 GHz, and 2.407 GHz is assumed for 2.4 - 2.5 GHz.
660 * -1 is returned if the start_factor is WF_CHAN_FACTOR_2_4_G and the
664 * Reference 802.11-2016, section 17.3.8.3 and section 16.3.6.3
688 * Odd start_factors produce channels on .5 MHz boundaries, in which case
690 * -1 is returned for an out of range channel.
692 * Reference 802.11-2016, section 17.3.8.3 and section 16.3.6.3
708 * primary_channel - primary 20Mhz channel
709 * center_channel - center frequecny of the 80Mhz channel
718 * Convert ctl chan and bw to chanspec
734 * primary_20mhz - Primary 20 MHz channel
735 * chan0_80MHz - center channel number of one frequency segment
736 * chan1_80MHz - center channel number of the other frequency segment
739 * The primary channel must be contained in one of the 80MHz channels. This routine
744 * Refer to 802.11-2016 section 22.3.14 "Channelization".
750 * Returns the center channel of the primary 80 MHz sub-band of the provided chanspec
754 * @return center channel number of the primary 80MHz sub-band of the input.
761 * Returns the center channel of the secondary 80 MHz sub-band of the provided chanspec
765 * @return center channel number of the secondary 80MHz sub-band of the input.
771 * Returns the chanspec for the primary 80MHz sub-band of an 160MHz or 80+80 channel
775 * @return An 80MHz chanspec describing the primary 80MHz sub-band of the input.
782 * Returns the chanspec for the secondary 80MHz sub-band of an 160MHz or 80+80 channel
783 * The sideband in the chanspec is always set to WL_CHANSPEC_CTL_SB_LL since this sub-band
788 * @return An 80MHz chanspec describing the secondary 80MHz sub-band of the input.
794 * For 160MHz or 80P80 chanspec, set ch[0]/ch[1] to be the low/high 80 Mhz channels
796 * For 20/40/80MHz chanspec, set ch[0] to be the center freq, and chan[1]=-1