Lines Matching defs:mode
82 enum hostapd_hw_mode mode = HOSTAPD_MODE_IEEE80211ANY;
104 * hw mode is valid. Clear iface->current_mode temporarily as
105 * the mode instance will be replaced with a new instance and
109 mode = iface->current_mode->mode;
122 /* Restore orignal mode if possible */
123 if (orig_mode_valid && feature->mode == mode &&
155 wpa_printf(MSG_MSGDUMP, "Allowed channel: mode=%d "
157 feature->mode,
176 struct hostapd_hw_modes *mode)
186 else switch (mode->mode) {
216 os_calloc(mode->num_rates, sizeof(struct hostapd_rate_data));
223 for (i = 0; i < mode->num_rates; i++) {
228 mode->rates[i]))
232 rate->rate = mode->rates[i];
265 p_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq, NULL,
269 s_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq, NULL,
273 return allowed_ht40_channel_pair(iface->current_mode->mode,
304 pri_chan = hw_get_channel_freq(iface->current_mode->mode, pri_freq,
307 sec_chan = hw_get_channel_freq(iface->current_mode->mode, sec_freq,
356 if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A)
381 iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G &&
417 struct hostapd_hw_modes *mode;
437 mode = iface->current_mode;
438 params->freqs = os_calloc(mode->num_channels + 1, sizeof(int));
443 for (i = 0; i < mode->num_channels; i++) {
444 struct hostapd_channel_data *chan = &mode->channels[i];
462 struct hostapd_hw_modes *mode;
478 mode = iface->current_mode;
479 params->freqs = os_calloc(mode->num_channels + 1, sizeof(int));
484 for (i = 0; i < mode->num_channels; i++) {
485 struct hostapd_channel_data *chan = &mode->channels[i];
504 if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)
535 "Failed to request a scan in device, bringing up in HT20 mode");
561 if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)
689 struct hostapd_hw_modes *mode = iface->current_mode;
690 u32 hw = mode->vht_capab;
696 if (mode->mode == HOSTAPD_MODE_IEEE80211G &&
698 mode->vht_capab == 0 && iface->hw_features) {
702 if (iface->hw_features[i].mode ==
704 mode = &iface->hw_features[i];
705 hw = mode->vht_capab;
736 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211B &&
737 iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G &&
768 struct hostapd_hw_modes *mode = iface->hw_features;
779 if (mode->edmg.channels && ieee802_edmg_is_allowed(mode->edmg, edmg))
784 mode->edmg.channels, mode->edmg.bw_config);
850 chan = hw_get_channel_freq(iface->current_mode->mode, frequency, NULL,
860 "Frequency %d (%s) not allowed for AP mode, flags: 0x%x%s%s",
887 pri_chan = hw_get_channel_freq(iface->current_mode->mode,
1019 pri_chan = hw_get_channel_freq(iface->current_mode->mode,
1076 struct hostapd_hw_modes *mode)
1080 if (iface->freq > 0 && !hw_mode_get_channel(mode, iface->freq, &chan))
1084 !mode->is_6ghz)
1108 struct hostapd_hw_modes *mode;
1110 mode = &iface->hw_features[i];
1111 if (mode->mode == target_mode) {
1112 if (skip_mode(iface, mode))
1115 iface->current_mode = mode;
1116 iface->conf->hw_mode = mode->mode;
1122 wpa_printf(MSG_ERROR, "ACS/CSA: Cannot decide mode");
1169 "Hardware does not support configured mode");
1175 "Configured channel (%d) or frequency (%d) (secondary_channel=%d) not found from the channel list of the current mode (%d) %s",
1178 iface->current_mode->mode,
1179 hostapd_hw_mode_txt(iface->current_mode->mode));
1231 * hostapd_csa_update_hwmode - Update hardware mode
1235 * Update hardware mode when the operating channel changed because of CSA.
1250 * hostapd_select_hw_mode - Select the hardware mode
1254 * Sets up the hardware mode, channel, rates, and passive scanning
1278 struct hostapd_hw_modes *mode = &iface->hw_features[i];
1280 if (mode->mode == iface->conf->hw_mode) {
1281 if (skip_mode(iface, mode))
1284 iface->current_mode = mode;
1300 "Hardware does not support configured mode");
1304 "Hardware does not support configured mode (%d) (hw_mode in hostapd.conf)",
1327 const char * hostapd_hw_mode_txt(int mode)
1329 switch (mode) {
1353 struct hostapd_hw_modes *mode;
1356 channel = hw_get_chan(hapd->iface->current_mode->mode, freq,
1364 * mode did not include the specified frequency. */
1368 mode = &hapd->iface->hw_features[i];
1369 channel = hw_get_chan(mode->mode, freq,
1380 struct hostapd_hw_modes *mode)
1385 return mode != iface->current_mode;
1386 if (mode->mode != HOSTAPD_MODE_IEEE80211B)
1389 if (iface->hw_features[i].mode == HOSTAPD_MODE_IEEE80211G)