Lines Matching +full:two +full:- +full:channel

6  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
27 for (i = 0; i < mode->num_channels; i++) { in allow_channel()
30 chan_is_6ghz = is_6ghz_freq(mode->channels[i].freq); in allow_channel()
31 if (is_6ghz == chan_is_6ghz && mode->channels[i].chan == chan) in allow_channel()
35 if (i == mode->num_channels || in allow_channel()
36 (mode->channels[i].flag & HOSTAPD_CHAN_DISABLED)) in allow_channel()
40 *flags = mode->channels[i].flag; in allow_channel()
42 if (mode->channels[i].flag & HOSTAPD_CHAN_NO_IR) in allow_channel()
49 static int get_center_80mhz(struct hostapd_hw_modes *mode, u8 channel, in get_center_80mhz() argument
54 if (mode->mode != HOSTAPD_MODE_IEEE80211A) in get_center_80mhz()
59 * In 80 MHz, the bandwidth "spans" 12 channels (e.g., 36-48), in get_center_80mhz()
60 * so the center channel is 6 channels away from the start/end. in get_center_80mhz()
62 if (channel >= center_channels[i] - 6 && in get_center_80mhz()
63 channel <= center_channels[i] + 6) in get_center_80mhz()
72 u8 op_class, u8 channel) in verify_80mhz() argument
91 center_chan = get_center_80mhz(mode, channel, center_channels, in verify_80mhz()
99 u8 adj_chan = center_chan - 6 + i * 4; in verify_80mhz()
119 static int get_center_160mhz(struct hostapd_hw_modes *mode, u8 channel, in get_center_160mhz() argument
124 if (mode->mode != HOSTAPD_MODE_IEEE80211A) in get_center_160mhz()
129 * In 160 MHz, the bandwidth "spans" 28 channels (e.g., 36-64), in get_center_160mhz()
130 * so the center channel is 14 channels away from the start/end. in get_center_160mhz()
132 if (channel >= center_channels[i] - 14 && in get_center_160mhz()
133 channel <= center_channels[i] + 14) in get_center_160mhz()
142 u8 op_class, u8 channel) in verify_160mhz() argument
160 center_chan = get_center_160mhz(mode, channel, center_channels, in verify_160mhz()
168 u8 adj_chan = center_chan - 14 + i * 4; in verify_160mhz()
189 static int get_center_320mhz(struct hostapd_hw_modes *mode, u8 channel, in get_center_320mhz() argument
194 if (mode->mode != HOSTAPD_MODE_IEEE80211A || !mode->is_6ghz) in get_center_320mhz()
199 * In 320 MHz, the bandwidth "spans" 60 channels (e.g., 65-125), in get_center_320mhz()
200 * so the center channel is 30 channels away from the start/end. in get_center_320mhz()
202 if (channel >= center_channels[i] - 30 && in get_center_320mhz()
203 channel <= center_channels[i] + 30) in get_center_320mhz()
212 u8 op_class, u8 channel) in verify_320mhz() argument
224 center_chan = get_center_320mhz(mode, channel, center_channels, in verify_320mhz()
232 u8 adj_chan = center_chan - 30 + i * 4; in verify_320mhz()
253 u8 channel, u8 bw) in verify_channel() argument
258 res2 = res = allow_channel(mode, op_class, channel, &flag); in verify_channel()
259 if (bw == BW40MINUS || (bw == BW40 && (((channel - 1) / 4) % 2))) { in verify_channel()
262 res2 = allow_channel(mode, op_class, channel - 4, NULL); in verify_channel()
266 res2 = allow_channel(mode, op_class, channel + 4, NULL); in verify_channel()
268 if (get_6ghz_sec_channel(channel) < 0) in verify_channel()
269 res2 = allow_channel(mode, op_class, channel - 4, NULL); in verify_channel()
271 res2 = allow_channel(mode, op_class, channel + 4, NULL); in verify_channel()
274 * channel is a center channel and as such, not necessarily a in verify_channel()
278 res2 = res = verify_80mhz(mode, op_class, channel); in verify_channel()
281 * channel is a center channel and as such, not necessarily a in verify_channel()
285 res2 = res = verify_160mhz(mode, op_class, channel); in verify_channel()
288 * channel is a center channel and as such, not necessarily a in verify_channel()
292 res2 = res = verify_80mhz(mode, op_class, channel); in verify_channel()
295 * channel is a center channel and as such, not necessarily a in verify_channel()
299 res2= res = verify_320mhz(mode, op_class, channel); in verify_channel()
325 mode = get_mode(wpa_s->hw.modes, wpa_s->hw.num_modes, op_class->mode, in wpas_op_class_supported()
326 is_6ghz_op_class(op_class->op_class)); in wpas_op_class_supported()
332 if (ssid && ssid->freq_list && ssid->freq_list[0]) { in wpas_op_class_supported()
334 int f = ssid->freq_list[z]; in wpas_op_class_supported()
352 if (is_6ghz_op_class(op_class->op_class) && !freq6) in wpas_op_class_supported()
354 if (op_class->op_class >= 115 && op_class->op_class <= 130 && !freq5) in wpas_op_class_supported()
356 if (op_class->op_class >= 81 && op_class->op_class <= 84 && !freq2) in wpas_op_class_supported()
360 if (ssid && ssid->disable_ht) { in wpas_op_class_supported()
361 switch (op_class->op_class) { in wpas_op_class_supported()
384 if (ssid && ssid->disable_vht) { in wpas_op_class_supported()
385 if (op_class->op_class >= 128 && op_class->op_class <= 130) { in wpas_op_class_supported()
392 if (op_class->op_class == 128) { in wpas_op_class_supported()
396 if (verify_channel(mode, op_class->op_class, in wpas_op_class_supported()
397 channels[i], op_class->bw) != in wpas_op_class_supported()
405 if (op_class->op_class == 129) { in wpas_op_class_supported()
407 return verify_channel(mode, op_class->op_class, 50, in wpas_op_class_supported()
408 op_class->bw) != NOT_ALLOWED || in wpas_op_class_supported()
409 verify_channel(mode, op_class->op_class, 114, in wpas_op_class_supported()
410 op_class->bw) != NOT_ALLOWED || in wpas_op_class_supported()
411 verify_channel(mode, op_class->op_class, 163, in wpas_op_class_supported()
412 op_class->bw) != NOT_ALLOWED; in wpas_op_class_supported()
415 if (op_class->op_class == 130) { in wpas_op_class_supported()
416 /* Need at least two non-contiguous 80 MHz segments */ in wpas_op_class_supported()
419 if (verify_channel(mode, op_class->op_class, 42, in wpas_op_class_supported()
420 op_class->bw) != NOT_ALLOWED || in wpas_op_class_supported()
421 verify_channel(mode, op_class->op_class, 58, in wpas_op_class_supported()
422 op_class->bw) != NOT_ALLOWED) in wpas_op_class_supported()
424 if (verify_channel(mode, op_class->op_class, 106, in wpas_op_class_supported()
425 op_class->bw) != NOT_ALLOWED || in wpas_op_class_supported()
426 verify_channel(mode, op_class->op_class, 122, in wpas_op_class_supported()
427 op_class->bw) != NOT_ALLOWED || in wpas_op_class_supported()
428 verify_channel(mode, op_class->op_class, 138, in wpas_op_class_supported()
429 op_class->bw) != NOT_ALLOWED || in wpas_op_class_supported()
430 verify_channel(mode, op_class->op_class, 155, in wpas_op_class_supported()
431 op_class->bw) != NOT_ALLOWED || in wpas_op_class_supported()
432 verify_channel(mode, op_class->op_class, 171, in wpas_op_class_supported()
433 op_class->bw) != NOT_ALLOWED) in wpas_op_class_supported()
435 if (verify_channel(mode, op_class->op_class, 106, in wpas_op_class_supported()
436 op_class->bw) != NOT_ALLOWED && in wpas_op_class_supported()
437 verify_channel(mode, op_class->op_class, 138, in wpas_op_class_supported()
438 op_class->bw) != NOT_ALLOWED) in wpas_op_class_supported()
440 if (verify_channel(mode, op_class->op_class, 122, in wpas_op_class_supported()
441 op_class->bw) != NOT_ALLOWED && in wpas_op_class_supported()
442 verify_channel(mode, op_class->op_class, 155, in wpas_op_class_supported()
443 op_class->bw) != NOT_ALLOWED) in wpas_op_class_supported()
445 if (verify_channel(mode, op_class->op_class, 138, in wpas_op_class_supported()
446 op_class->bw) != NOT_ALLOWED && in wpas_op_class_supported()
447 verify_channel(mode, op_class->op_class, 171, in wpas_op_class_supported()
448 op_class->bw) != NOT_ALLOWED) in wpas_op_class_supported()
457 if (op_class->op_class == 135) { in wpas_op_class_supported()
458 /* Need at least two 80 MHz segments which do not fall under the in wpas_op_class_supported()
464 for (chan = op_class->min_chan; chan <= op_class->max_chan; in wpas_op_class_supported()
465 chan += op_class->inc) { in wpas_op_class_supported()
467 if (verify_channel(mode, op_class->op_class, chan, in wpas_op_class_supported()
468 op_class->bw) != NOT_ALLOWED) { in wpas_op_class_supported()
474 /* Supported if at least two non-consecutive 80 in wpas_op_class_supported()
477 if ((curr_seg - first_seg) > 1) in wpas_op_class_supported()
493 for (chan = op_class->min_chan; chan <= op_class->max_chan; in wpas_op_class_supported()
494 chan += op_class->inc) { in wpas_op_class_supported()
495 if (verify_channel(mode, op_class->op_class, chan, in wpas_op_class_supported()
496 op_class->bw) != NOT_ALLOWED) { in wpas_op_class_supported()
507 u8 *channel) in wpas_sta_secondary_channel_offset() argument
515 return -1; in wpas_sta_secondary_channel_offset()
517 ies_len = bss->ie_len ? bss->ie_len : bss->beacon_ie_len; in wpas_sta_secondary_channel_offset()
518 return wpas_get_op_chan_phy(bss->freq, ies, ies_len, current, in wpas_sta_secondary_channel_offset()
519 channel, &phy_type); in wpas_sta_secondary_channel_offset()
540 ieee80211_freq_to_channel_ext(bss->freq, 0, in wpas_supp_op_class_ie()
583 /* Add a 1-octet operating class to the Operating Class field */ in wpas_supp_op_class_ie()
587 /* Add the 2-octet operating classes (i.e., 80+80 MHz cases), if any */ in wpas_supp_op_class_ie()
605 *ie_len = wpabuf_len(buf) - 2; in wpas_supp_op_class_ie()