Home | History | Annotate | Download | only in include

Lines Matching refs:channel

27 /* A chanspec holds the channel number, band, bandwidth and control sideband */
30 /* channel defines */
39 #define CH_MAX_2G_CHANNEL 14 /* Max channel in 2G band */
40 #define MAXCHANNEL 224 /* max # supported channels. The max channel no is 216,
80 /* channel defines */
81 #define LOWER_20_SB(channel) (((channel) > CH_10MHZ_APART) ? ((channel) - CH_10MHZ_APART) : 0)
82 #define UPPER_20_SB(channel) (((channel) < (MAXCHANNEL - CH_10MHZ_APART)) ? \
83 ((channel) + CH_10MHZ_APART) : 0)
85 #define LL_20_SB(channel) (((channel) > 3 * CH_10MHZ_APART) ? ((channel) - 3 * CH_10MHZ_APART) : 0)
86 #define UU_20_SB(channel) (((channel) < (MAXCHANNEL - 3 * CH_10MHZ_APART)) ? \
87 ((channel) + 3 * CH_10MHZ_APART) : 0)
88 #define LU_20_SB(channel) LOWER_20_SB(channel)
89 #define UL_20_SB(channel) UPPER_20_SB(channel)
92 #define CH20MHZ_CHSPEC(channel) (chanspec_t)((chanspec_t)(channel) | WL_CHANSPEC_BW_20 | \
93 WL_CHANSPEC_CTL_SB_NONE | (((channel) <= CH_MAX_2G_CHANNEL) ? \
95 #define NEXT_20MHZ_CHAN(channel) (((channel) < (MAXCHANNEL - CH_20MHZ_APART)) ? \
96 ((channel) + CH_20MHZ_APART) : 0)
97 #define CH40MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \
98 ((channel) | (ctlsb) | WL_CHANSPEC_BW_40 | \
99 ((channel) <= CH_MAX_2G_CHANNEL ? WL_CHANSPEC_BAND_2G : \
104 /* chanspec stores radio channel & flags to indicate control channel location, i.e. upper/lower */
184 /* channel defines */
185 #define LOWER_20_SB(channel) (((channel) > CH_10MHZ_APART) ? \
186 ((channel) - CH_10MHZ_APART) : 0)
187 #define UPPER_20_SB(channel) (((channel) < (MAXCHANNEL - CH_10MHZ_APART)) ? \
188 ((channel) + CH_10MHZ_APART) : 0)
190 #define LL_20_SB(channel) (((channel) > 3 * CH_10MHZ_APART) ? ((channel) - 3 * CH_10MHZ_APART) : 0)
191 #define UU_20_SB(channel) (((channel) < (MAXCHANNEL - 3 * CH_10MHZ_APART)) ? \
192 ((channel) + 3 * CH_10MHZ_APART) : 0)
193 #define LU_20_SB(channel) LOWER_20_SB(channel)
194 #define UL_20_SB(channel) UPPER_20_SB(channel)
196 #define LOWER_40_SB(channel) ((channel) - CH_20MHZ_APART)
197 #define UPPER_40_SB(channel) ((channel) + CH_20MHZ_APART)
199 #define CH20MHZ_CHSPEC(channel) (chanspec_t)((chanspec_t)(channel) | WL_CHANSPEC_BW_20 | \
200 (((channel) <= CH_MAX_2G_CHANNEL) ? \
202 #define NEXT_20MHZ_CHAN(channel) (((channel) < (MAXCHANNEL - CH_20MHZ_APART)) ? \
203 ((channel) + CH_20MHZ_APART) : 0)
204 #define CH40MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \
205 ((channel) | (ctlsb) | WL_CHANSPEC_BW_40 | \
206 ((channel) <= CH_MAX_2G_CHANNEL ? WL_CHANSPEC_BAND_2G : \
208 #define CH80MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \
209 ((channel) | (ctlsb) | \
211 #define CH160MHZ_CHSPEC(channel, ctlsb) (chanspec_t) \
212 ((channel) | (ctlsb) | \
313 * WF_CHAN_FACTOR_* constants are used to calculate channel frequency
314 * given a channel number.
319 * Channel Factor for the starting frequence of 2.4 GHz channels.
325 * Channel Factor for the starting frequence of 5 GHz channels.
331 * Channel Factor for the starting frequence of 4.9 GHz channels.
336 #define WLC_2G_25MHZ_OFFSET 5 /* 2.4GHz band channel offset */
363 * specified a band, bw, ctl_sb and channel and that the combination could be
373 * Verify the chanspec specifies a valid channel according to 802.11.
377 * @return TRUE if the chanspec is a valid 802.11 channel
382 * Return the primary (control) channel.
384 * This function returns the channel number of the primary 20MHz channel. For
385 * 20MHz channels this is just the channel number. For 40MHz or wider channels
386 * it is the primary 20MHz channel specified by the chanspec.
390 * @return Returns the channel number of the primary 20MHz channel
397 * This function returns the chanspec of the primary 20MHz channel. For 20MHz
399 * chanspec of the primary 20MHZ channel specified by the chanspec.
403 * @return Returns the chanspec of the primary 20MHz channel
408 * Return a channel number corresponding to a frequency.
410 * This function returns the chanspec for the primary 40MHz of an 80MHz channel.
411 * The control sideband specifies the same 20MHz channel that the 80MHz channel is using
412 * as the primary 20MHz channel.
417 * Return the channel number for a given frequency and base frequency.
418 * The returned channel number is relative to the given base frequency.
427 * The returned channel will be in the range [1, 14] in the 2.4 GHz band
430 * frequency is not a 2.4 GHz channel, or if the frequency is not and even
438 * @return Returns a channel number
446 * Return the center frequency in MHz of the given channel and base frequency.
448 * Return the center frequency in MHz of the given channel and base frequency.
449 * The channel number is interpreted relative to the given base frequency.
451 * The valid channel range is [1, 14] in the 2.4 GHz band and [0, 200] otherwise.
455 * The channel range of [1, 14] is only checked for a start_factor of
459 * -1 is returned for an out of range channel.
463 * @param channel input channel number
471 extern int wf_channel2mhz(uint channel, uint start_factor);
476 * @param ctl_ch channel
484 extern uint wf_channel2freq(uint channel);