Lines Matching defs:mode

20 static enum chan_allowed allow_channel(struct hostapd_hw_modes *mode,
27 for (i = 0; i < mode->num_channels; i++) {
30 chan_is_6ghz = is_6ghz_freq(mode->channels[i].freq);
31 if (is_6ghz == chan_is_6ghz && mode->channels[i].chan == chan)
35 if (i == mode->num_channels ||
36 (mode->channels[i].flag & HOSTAPD_CHAN_DISABLED))
40 *flags = mode->channels[i].flag;
42 if (mode->channels[i].flag & HOSTAPD_CHAN_NO_IR)
49 static int get_center_80mhz(struct hostapd_hw_modes *mode, u8 channel,
54 if (mode->mode != HOSTAPD_MODE_IEEE80211A)
71 static enum chan_allowed verify_80mhz(struct hostapd_hw_modes *mode,
91 center_chan = get_center_80mhz(mode, channel, center_channels,
101 if (allow_channel(mode, op_class, adj_chan, &flags) ==
119 static int get_center_160mhz(struct hostapd_hw_modes *mode, u8 channel,
124 if (mode->mode != HOSTAPD_MODE_IEEE80211A)
141 static enum chan_allowed verify_160mhz(struct hostapd_hw_modes *mode,
160 center_chan = get_center_160mhz(mode, channel, center_channels,
170 if (allow_channel(mode, op_class, adj_chan, &flags) ==
189 static int get_center_320mhz(struct hostapd_hw_modes *mode, u8 channel,
194 if (mode->mode != HOSTAPD_MODE_IEEE80211A || !mode->is_6ghz)
211 static enum chan_allowed verify_320mhz(struct hostapd_hw_modes *mode,
224 center_chan = get_center_320mhz(mode, channel, center_channels,
234 if (allow_channel(mode, op_class, adj_chan, &flags) ==
252 enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 op_class,
258 res2 = res = allow_channel(mode, op_class, channel, &flag);
262 res2 = allow_channel(mode, op_class, channel - 4, NULL);
266 res2 = allow_channel(mode, op_class, channel + 4, NULL);
269 res2 = allow_channel(mode, op_class, channel - 4, NULL);
271 res2 = allow_channel(mode, op_class, channel + 4, NULL);
278 res2 = res = verify_80mhz(mode, op_class, channel);
285 res2 = res = verify_160mhz(mode, op_class, channel);
292 res2 = res = verify_80mhz(mode, op_class, channel);
299 res2= res = verify_320mhz(mode, op_class, channel);
318 struct hostapd_hw_modes *mode;
325 mode = get_mode(wpa_s->hw.modes, wpa_s->hw.num_modes, op_class->mode,
327 if (!mode)
396 if (verify_channel(mode, op_class->op_class,
407 return verify_channel(mode, op_class->op_class, 50,
409 verify_channel(mode, op_class->op_class, 114,
411 verify_channel(mode, op_class->op_class, 163,
419 if (verify_channel(mode, op_class->op_class, 42,
421 verify_channel(mode, op_class->op_class, 58,
424 if (verify_channel(mode, op_class->op_class, 106,
426 verify_channel(mode, op_class->op_class, 122,
428 verify_channel(mode, op_class->op_class, 138,
430 verify_channel(mode, op_class->op_class, 155,
432 verify_channel(mode, op_class->op_class, 171,
435 if (verify_channel(mode, op_class->op_class, 106,
437 verify_channel(mode, op_class->op_class, 138,
440 if (verify_channel(mode, op_class->op_class, 122,
442 verify_channel(mode, op_class->op_class, 155,
445 if (verify_channel(mode, op_class->op_class, 138,
447 verify_channel(mode, op_class->op_class, 171,
467 if (verify_channel(mode, op_class->op_class, chan,
495 if (verify_channel(mode, op_class->op_class, chan,
534 * Determine the current operating class correct mode based on