Lines Matching +full:5 +full:mhz

51 /* Definitions for D11AC capable (80MHz+) Chanspec type */
59 * (optional) 2, 4, 5, 6 for 2.4GHz, 4GHz, 5GHz, and 6GHz respectively.
60 * Default value is 2g if channel <= 14, otherwise 5g.
62 * channel number of the 20MHz channel,
63 * or primary 20 MHz channel of 40MHz, 80MHz, 160MHz, 80+80MHz,
64 * 240MHz, 320MHz, or 160+160MHz channels.
68 * 'u' or 'l' (only for 2.4GHz band 40MHz)
70 * For 2.4GHz band 40MHz channels, the same primary channel may be the
71 * upper sideband for one 40MHz channel, and the lower sideband for an
72 * overlapping 40MHz channel. The {u: upper, l: lower} primary sideband
73 * indication disambiguates which 40MHz channel is being specified.
75 * For 40MHz in the 5GHz or 6GHz band and all channel bandwidths greater than
76 * 40MHz, the U/L specification is not necessary or allowed since the channels are
77 * non-overlapping and the primary 20MHz channel position is derived from its
82 * These fields specify the center channel of the first and the second 80MHz
83 * or 160MHz channels.
85 * In its simplest form, it is a 20MHz channel number, with the implied band
86 * of 2.4GHz if channel number <= 14, and 5GHz otherwise.
89 * 40MHz channels is also allowed: <channel><primary-sideband>
92 * primary channel of 40MHz, channel <= 14 is 2GHz, otherwise 5GHz
96 * 5 GHz Examples:
98 * 5g8 20MHz 8 - -
99 * 52 20MHz 52 - -
100 * 52/40 40MHz 54 52-56 52
101 * 56/40 40MHz 54 52-56 56
102 * 52/80 80MHz 58 52-64 52
103 * 56/80 80MHz 58 52-64 56
104 * 60/80 80MHz 58 52-64 60
105 * 64/80 80MHz 58 52-64 64
106 * 52/160 160MHz 50 36-64 52
108 * 36/80+80/42-106 80+80MHz 42,106 36-48,100-112 36
112 * 2g8 20MHz 8 - -
113 * 8 20MHz 8 - -
114 * 6 20MHz 6 - -
115 * 6/40l 40MHz 8 6-10 6
116 * 6l 40MHz 8 6-10 6
117 * 6/40u 40MHz 4 2-6 6
118 * 6u 40MHz 4 2-6 6
139 /* 40MHz channels in 2.4GHz band */
141 3, 4, 5, 6, 7, 8, 9, 10, 11
145 /* 40MHz channels in 5GHz band */
151 /* 80MHz channels in 5GHz band */
157 /* 160MHz channels in 5GHz band */
163 /** 80MHz channels in 6GHz band */
166 /** 160MHz channels in 6GHz band */
169 /** 240MHz channels in 6GHz band */
172 /** 320MHz channels in 6GHz band */
196 * Return the chanspec bandwidth in MHz
197 * Bandwidth of 160 MHz will be returned for 80+80MHz chanspecs.
201 * @return bandwidth of chspec in MHz units
212 /* bw in MHz, return the channel count from the center channel to the
220 /* edge channels separated by BW - 10MHz on each side in center_chan_to_edge()
224 /* 10 MHz */ in center_chan_to_edge()
227 /* 30 MHz */ in center_chan_to_edge()
230 /* 70 MHz */ in center_chan_to_edge()
233 /* 110 MHz */ in center_chan_to_edge()
236 /* 150 MHz */ in center_chan_to_edge()
270 /* sb must be a index to a 20MHz channel in range */ in channel_to_sb()
291 /* return index of 80MHz channel from channel number
306 /* return index of the 6G 80MHz channel from channel number
322 /* return index of the 5G 160MHz channel from channel number
338 /* return index of the 6G 160MHz channel from channel number
354 /* return index of the 6G 240MHz channel from channel number
370 /* return index of the 6G 320MHz channel from channel number
387 * This function returns the the 6GHz 240MHz center channel for the given chanspec 240MHz ID
389 * @param chan_240MHz_id 240MHz chanspec ID
401 * starting from the first 240MHz center in wf_chspec_6G_id240_to_ch()
423 * This function returns the the 6GHz 320MHz center channel for the given chanspec 320MHz ID
425 * @param chan_320MHz_id 320MHz chanspec ID
437 * starting from the first 320MHz center in wf_chspec_6G_id320_to_ch()
513 band = "5g"; in wf_chspec_ntoa()
545 /* primary20 sideband string if needed for 2g 40MHz */ in wf_chspec_ntoa()
552 /* primary20 sideband string instead of BW for 40MHz */ in wf_chspec_ntoa()
613 /* band must be "2", "5", or "6" */ in wf_chspec_aton()
616 else if (num == 5) in wf_chspec_aton()
636 /* default BW of 20MHz */ in wf_chspec_aton()
726 /* If the bw is 40/80/160/240/320 (and not 40MHz 2G), the channels are in wf_chspec_aton()
727 * non-overlapping in 5G or 6G bands. Each primary channel is contained in wf_chspec_aton()
729 * will create the chanspec. 2G 40MHz is handled just above, assuming a {u,l} in wf_chspec_aton()
779 /* bad 240MHz channel ID for the band */ in BCMPOSTTRAPFN()
793 /* bad 320MHz channel ID for the band */ in BCMPOSTTRAPFN()
831 /* both 80MHz and 80+80MHz use 80MHz side bands. in BCMPOSTTRAPFN()
832 * 80+80 SB info is relative to the primary 80MHz sub-band. in BCMPOSTTRAPFN()
890 * the 20MHz channel, in wf_chspec_valid()
892 * or both center channels for an 80+80MHz channel, in wf_chspec_valid()
894 * Also, 80+80MHz channels need to be non-contiguous. in wf_chspec_valid()
926 /* 5G band 20MHz channel ranges with even (+4) channel spacing */
1005 /* if BW unspecified (INVCHANSPEC), start with 20 MHz */ in wf_chanspec_iter_firstchan()
1012 /* 2g has overlapping 40MHz channels, so cannot just use the in wf_chanspec_iter_firstchan()
1158 * This is the _iter_next() helper for 5g band chanspec iteration.
1159 * The 5g iterator uses ranges of primary 20MHz channels, and the current BW, to create
1161 * When a 5g range is exhausted, wf_chanspec_iter_next_5g_range() is called to get the next
1174 * step to the next 20MHz channel and create the current BW in wf_chanspec_iter_next_5g()
1175 * channel with that new primary 20MHz. in wf_chanspec_iter_next_5g()
1213 * Helper function to set up the next range of primary 20MHz channels to
1278 * The 6g iterator uses ranges of primary 20MHz channels, and the current BW, to create
1280 * Each BW in 6g has one contiguous range of primary 20MHz channels. When a range is
1293 * step to the next 20MHz channel and create the current BW in wf_chanspec_iter_next_6g()
1294 * channel with that new primary 20MHz. in wf_chanspec_iter_next_6g()
1359 * Verify that the channel is a valid 20MHz channel according to 802.11.
1361 * @param channel 20MHz channel number to validate
1378 /* We don't have an array of legal 20MHz 5G channels, but they are in wf_valid_20MHz_chan()
1379 * each side of the legal 40MHz channels. Check the chanspec in wf_valid_20MHz_chan()
1380 * channel against either side of the 40MHz channels. in wf_valid_20MHz_chan()
1391 * of 40MHz 5G channel in wf_valid_20MHz_chan()
1411 /* Use the simple pattern of 6GHz 20MHz channels for validity check */ in wf_valid_20MHz_chan()
1424 * Verify that the center channel is a valid 40MHz center channel according to 802.11.
1426 * @param center_channel 40MHz center channel to validate
1441 /* use the 5GHz lookup of 40MHz channels */ in wf_valid_40MHz_center_chan()
1461 * Verify that the center channel is a valid 80MHz center channel according to 802.11.
1463 * @param center_channel 80MHz center channel to validate
1472 /* use the 80MHz ID lookup to validate the center channel */ in wf_valid_80MHz_center_chan()
1477 /* use the 80MHz ID lookup to validate the center channel */ in wf_valid_80MHz_center_chan()
1487 * Verify that the center channel is a valid 160MHz center channel according to 802.11.
1489 * @param center_channel 160MHz center channel to validate
1500 /* use the 5GHz lookup of 40MHz channels */ in wf_valid_160MHz_center_chan()
1519 * Verify that the center channel is a valid 240MHz center channel according to 802.11.
1521 * @param center_channel 240MHz center channel to validate
1542 * Verify that the center channel is a valid 320MHz center channel according to 802.11.
1544 * @param center_channel 320MHz center channel to validate
1584 * Create a 20MHz chanspec for the given band.
1586 * This function returns a 20MHz chanspec in the given band.
1588 * @param channel 20MHz channel number
1591 * @return Returns a 20MHz chanspec, or IVNCHANSPEC in case of error.
1614 * Returns the chanspec for a 40MHz channel given the primary 20MHz channel number,
1617 * @param primary_channel primary 20Mhz channel
1618 * @param center_channel center channel of the 40MHz channel
1619 * @param band band of the 40MHz channel (chanspec_band_t value)
1621 * The center_channel can be one of the 802.11 spec valid 40MHz chenter channels
1624 * @return returns a 40MHz chanspec, or INVCHANSPEC in case of error
1633 * Will return -1 if not a valid pair for 40MHz in wf_create_40MHz_chspec()
1644 /* othewise construct and return the valid 40MHz chanspec */ in wf_create_40MHz_chspec()
1650 * Returns the chanspec for a 40MHz channel given the primary 20MHz channel number,
1651 * the sub-band for the primary 20MHz channel, and the band.
1653 * @param primary_channel primary 20Mhz channel
1654 * @param primary_subband sub-band of the 20MHz primary channel (chanspec_subband_t value)
1655 * @param band band of the 40MHz channel (chanspec_band_t value)
1658 * 40MHz channels in the given band.
1660 * @return returns a 40MHz chanspec, or INVCHANSPEC in case of error
1681 * Returns the chanspec for an 80MHz channel given the primary 20MHz channel number,
1684 * @param primary_channel primary 20Mhz channel
1685 * @param center_channel center channel of the 80MHz channel
1686 * @param band band of the 80MHz channel (chanspec_band_t value)
1688 * The center_channel can be one of {42, 58, 106, 122, 138, 155} for 5G,
1691 * @return returns an 80MHz chanspec, or INVCHANSPEC in case of error
1700 * Will return -1 if not a valid pair for 80MHz in wf_create_80MHz_chspec()
1711 /* othewise construct and return the valid 80MHz chanspec */ in wf_create_80MHz_chspec()
1717 * Returns the chanspec for an 160MHz channel given the primary 20MHz channel number,
1720 * @param primary_channel primary 20Mhz channel
1721 * @param center_channel center channel of the 160MHz channel
1722 * @param band band of the 160MHz channel (chanspec_band_t value)
1724 * The center_channel can be one of {50, 114} for 5G,
1727 * @return returns an 160MHz chanspec, or INVCHANSPEC in case of error
1735 * Will return -1 if not a valid pair for 160MHz in wf_create_160MHz_chspec()
1746 /* othewise construct and return the valid 160MHz chanspec */ in wf_create_160MHz_chspec()
1752 * Returns the chanspec for an 80+80MHz channel given the primary 20MHz channel number,
1755 * @param primary_channel primary 20 Mhz channel
1758 * @param band band of the 80+80 MHz channel (chanspec_band_t value)
1760 * Parameters chan0 and chan1 are valid 80 MHz center channel numbers for the given band.
1761 * The primary channel must be contained in one of the 80 MHz channels. This routine
1762 * will determine which frequency segment is the primary 80 MHz segment.
1764 * @return returns an 80+80 MHz chanspec, or INVCHANSPEC in case of error
1778 * to be greater than 80MHz in wf_create_8080MHz_chspec()
1797 /* does the primary channel fit with the 1st 80MHz channel ? */ in wf_create_8080MHz_chspec()
1804 /* no, so does the primary channel fit with the 2nd 80MHz channel ? */ in wf_create_8080MHz_chspec()
1807 /* no match for pri_ch to either 80MHz center channel */ in wf_create_8080MHz_chspec()
1825 * Returns the chanspec for an 160+160MHz channel given the primary 20MHz channel number,
1828 * @param primary_channel primary 20 Mhz channel
1831 * @param band band of the 160+160 MHz channel (chanspec_band_t value)
1833 * Parameters chan0 and chan1 are valid 160 MHz center channel numbers for the given band.
1834 * The primary channel must be contained in one of the 160 MHz channels. This routine
1835 * will determine which frequency segment is the primary 160 MHz segment.
1837 * @return returns an 160+160 MHz chanspec, or INVCHANSPEC in case of error
1851 * to be greater than 160MHz in wf_create_160160MHz_chspec()
1870 /* does the primary channel fit with the 1st 160MHz channel ? */ in wf_create_160160MHz_chspec()
1877 /* no, so does the primary channel fit with the 2nd 160MHz channel ? */ in wf_create_160160MHz_chspec()
1880 /* no match for pri_ch to either 160MHz center channel */ in wf_create_160160MHz_chspec()
1898 * Returns the chanspec for an 240MHz channel given the primary 20MHz channel number,
1901 * @param primary_channel primary 20 Mhz channel
1903 * @param band band of the 240 MHz channel (chanspec_band_t value)
1905 * @return returns an 240 MHz chanspec, or INVCHANSPEC in case of error
1926 * Will return -1 if not a valid pair for 240MHz in wf_create_240MHz_chspec()
1946 * Returns the chanspec for an 320MHz channel given the primary 20MHz channel number,
1949 * @param primary_channel primary 20 Mhz channel
1951 * @param band band of the 320 MHz channel (chanspec_band_t value)
1953 * Parameters chan is valid 320 MHz center channel numbers for the given band.
1954 * The primary channel must be contained in one of the 320 MHz channels.
1956 * @return returns an 320 MHz chanspec, or INVCHANSPEC in case of error
1977 * Will return -1 if not a valid pair for 320MHz in wf_create_320MHz_chspec()
1997 * Returns the chanspec given the primary 20MHz channel number,
1999 * must be 20, 40, 80, 160, 240 or 320 MHz.
2000 * 80+80 or 160+160 MHz chanspec creation is not handled by this function,
2003 * @param primary_channel primary 20Mhz channel
2021 /* 20MHz channels have matching center and primary channels */ in wf_create_chspec()
2068 * Returns the chanspec given the primary 20MHz channel number,
2071 * @param primary_channel primary 20Mhz channel
2078 * center_channel parameter. As a result, it can not create 40MHz channels on
2081 * This function supports creating 20MHz bandwidth chanspecs on any band.
2083 * For the 2GHz band, 40MHz channels overlap, so two 40MHz channels may
2084 * have the same primary 20MHz channel. This function will return INVCHANSPEC
2085 * whenever called with a bandwidth of 40MHz or wider for the 2GHz band.
2087 * 5GHz and 6GHz bands have non-overlapping 40/80/160 MHz channels, so a
2088 * 20MHz primary channel uniquely specifies a wider channel in a given band.
2090 * 80+80MHz channels also cannot be uniquely defined. This function will return
2101 /* For 5GHz, use the lookup tables for valid 40/80/160 center channels in wf_create_chspec_from_primary()
2171 * Return the primary 20MHz channel.
2173 * This function returns the channel number of the primary 20MHz channel. For
2174 * 20MHz channels this is just the channel number. For 40MHz or wider channels
2175 * it is the primary 20MHz channel specified by the chanspec.
2179 * @return Returns the channel number of the primary 20MHz channel
2201 /* use bw 240MHz for the primary channel lookup */ in wf_chspec_primary20_chan()
2209 /* use bw 320MHz for the primary channel lookup */ in wf_chspec_primary20_chan()
2244 * Return the primary 20MHz chanspec of a given chanspec
2246 * This function returns the chanspec of the primary 20MHz channel. For 20MHz
2247 * channels this is just the chanspec. For 40MHz or wider channels it is the
2248 * chanspec of the primary 20MHz channel specified by the chanspec.
2252 * @return Returns the chanspec of the primary 20MHz channel
2271 /* return chanspec given primary 20MHz channel and bandwidth
2327 * Return the primary 40MHz chanspec or a 40MHz or wider channel
2329 * This function returns the chanspec for the primary 40MHz of an 80MHz or wider channel.
2330 * The primary 40MHz channel is the 40MHz sub-band that contains the primary 20MHz channel.
2331 * The primary 20MHz channel of the returned 40MHz chanspec is the same as the primary 20MHz
2336 * @return Returns the chanspec of the primary 20MHz channel
2347 /* if the chanspec is > 80MHz, use the helper routine to find the primary 80 MHz channel */ in wf_chspec_primary40_chspec()
2352 /* determine primary 40 MHz sub-channel of an 80 MHz chanspec */ in wf_chspec_primary40_chspec()
2358 /* Primary 40MHz is on lower side */ in wf_chspec_primary40_chspec()
2362 /* Primary 40MHz is on upper side */ in wf_chspec_primary40_chspec()
2368 /* Create primary 40MHz chanspec */ in wf_chspec_primary40_chspec()
2379 * @param freq frequency in MHz of the channel center
2388 * defined for 2.4 GHz, 5 GHz, and 6 GHz bands.
2394 * 5G band 5.0 - 5.940 5.000
2405 * must be an even 5 MHz multiple greater than the base frequency.
2407 * For a start_factor WF_CHAN_FACTOR_6_G, the frequency may be up to 7.205 MHz
2434 /* channel #2 is an oddball, 10MHz below chan #1 */ in wf_mhz2channel()
2448 ch = offset / 5; in wf_mhz2channel()
2450 /* check that frequency is a 5MHz multiple from the base */ in wf_mhz2channel()
2451 if (offset != (ch * 5)) in wf_mhz2channel()
2457 * handled above as it is a non-5MHz offset in wf_mhz2channel()
2464 /* 6G has a higher channel range than 5G channelization specifies [1,200] */ in wf_mhz2channel()
2476 * Return the center frequency in MHz of the given channel and base frequency.
2484 * defined for 2.4 GHz, 5 GHz, and 6 GHz bands.
2487 * Odd start_factors produce channels on .5 MHz boundaries, in which case
2488 * the answer is rounded down to an integral MHz.
2494 * @param start_factor base frequency in 500 kHz units, e.g. 10000 for 5 GHz
2496 * @return Returns a frequency in MHz
2516 freq = ch * 5 + start_factor / 2; in wf_channel2mhz()
2530 * Returns the chanspec 80Mhz channel corresponding to the following input
2533 * primary_channel - primary 20Mhz channel
2534 * center_channel - center frequecny of the 80Mhz channel
2558 * find a 80MHz chanspec with the given center_channel that had a primary channel in wf_chspec_80()
2567 * primary_20mhz - Primary 20 MHz channel
2572 * The primary channel must be contained in one of the 80MHz channels. This routine
2573 * will determine which frequency segment is the primary 80 MHz segment.
2596 /* does the primary channel fit with the 1st 80MHz channel ? */ in wf_chspec_get8080_chspec()
2603 /* no, so does the primary channel fit with the 2nd 80MHz channel ? */ in wf_chspec_get8080_chspec()
2606 /* no match for pri_ch to either 80MHz center channel */ in wf_chspec_get8080_chspec()
2624 * Returns the center channel of the primary 80 MHz sub-band of the provided chanspec
2644 * Returns the center channel of the secondary 80 MHz sub-band of the provided chanspec
2664 * Returns the chanspec for the primary 80MHz sub-band of an 160MHz or 80+80 channel
2682 /* Primary 80MHz is on lower side */ in wf_chspec_primary80_chspec()
2686 /* Primary 80MHz is on upper side */ in wf_chspec_primary80_chspec()
2691 /* Create primary 80MHz chanspec */ in wf_chspec_primary80_chspec()
2702 * Returns the chanspec for the secondary 80MHz sub-band of an 160MHz or 80+80 channel
2716 /* Primary 80MHz is on lower side, so the secondary is on in wf_chspec_secondary80_chspec()
2721 /* Primary 80MHz is on upper side, so the secondary is on in wf_chspec_secondary80_chspec()
2727 /* Create secondary 80MHz chanspec */ in wf_chspec_secondary80_chspec()
2741 * For 160MHz or 80P80 chanspec, set ch[0]/ch[1] to be the low/high 80 Mhz channels
2743 * For 20/40/80MHz chanspec, set ch[0] to be the center freq, and chan[1]=-1
2755 /* for 20, 40, and 80 Mhz */ in wf_chspec_get_80p80_channels()
2764 * Returns the center channel of the primary 160MHz sub-band of the provided chanspec
2784 * Returns the chanspec for the primary 160MHz sub-band of an 240/320MHz or 160+160 channel
2807 /* Primary 160MHz is on lower side */ in wf_chspec_primary160_chspec()
2810 /* Primary 160MHz is on upper side */ in wf_chspec_primary160_chspec()
2818 /* Create primary 160MHz chanspec */ in wf_chspec_primary160_chspec()
2828 /* Primary 160MHz is on lower side */ in wf_chspec_primary160_chspec()
2832 /* Primary 160MHz is on upper side */ in wf_chspec_primary160_chspec()
2837 /* Create primary 160MHz chanspec */ in wf_chspec_primary160_chspec()
2850 /* Populates array with all 20MHz side bands of a given chanspec_t in the following order:
2855 * Works with 20, 40, 80, and 160MHz chspec
2860 chanspec_t t = (CHSPEC_IS160(chspec)) ? /* if bw > 80MHz */ in wf_get_all_ext()
2866 return; /* nothing more to do since 20MHz chspec */ in wf_get_all_ext()
2868 /* 20MHz EXT */ in wf_get_all_ext()
2872 return; /* nothing more to do since 40MHz chspec */ in wf_get_all_ext()
2874 /* center 40MHz EXT */ in wf_get_all_ext()
2877 GET_ALL_SB(t, &((pext)[2])); /* get the 20MHz side bands in 40MHz EXT */ in wf_get_all_ext()
2880 return; /* nothing more to do since 80MHz chspec */ in wf_get_all_ext()
2883 /* get the 20MHz side bands in 80MHz EXT (secondary) */ in wf_get_all_ext()
2889 * (Overlap: At least one 20MHz subband is common between the two chanspecs provided)
2965 * separation needs to be greater than 160MHz in wf_create_160160MHz_chspec_sb()