Lines Matching defs:iface

29 	if (!hapd->iconf->ieee80211n || !hapd->iface->current_mode ||
39 cap->a_mpdu_params = hapd->iface->current_mode->a_mpdu_params;
40 os_memcpy(cap->supported_mcs_set, hapd->iface->current_mode->mcs_set,
97 oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode);
122 int hostapd_ht_operation_update(struct hostapd_iface *iface)
127 if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed)
131 __func__, iface->ht_op_mode);
133 if (!(iface->ht_op_mode & HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT)
134 && iface->num_sta_ht_no_gf) {
135 iface->ht_op_mode |= HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT;
137 } else if ((iface->ht_op_mode &
139 iface->num_sta_ht_no_gf == 0) {
140 iface->ht_op_mode &= ~HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT;
144 if (!(iface->ht_op_mode & HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT) &&
145 (iface->num_sta_no_ht || iface->olbc_ht)) {
146 iface->ht_op_mode |= HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT;
148 } else if ((iface->ht_op_mode &
150 (iface->num_sta_no_ht == 0 && !iface->olbc_ht)) {
151 iface->ht_op_mode &= ~HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT;
155 if (iface->num_sta_no_ht)
157 else if (iface->conf->secondary_channel && iface->num_sta_ht_20mhz)
159 else if (iface->olbc_ht)
164 cur_op_mode = iface->ht_op_mode & HT_OPER_OP_MODE_HT_PROT_MASK;
166 iface->ht_op_mode &= ~HT_OPER_OP_MODE_HT_PROT_MASK;
167 iface->ht_op_mode |= new_op_mode;
172 __func__, iface->ht_op_mode, op_mode_changes);
178 static int is_40_allowed(struct hostapd_iface *iface, int channel)
184 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
187 pri_freq = hostapd_hw_get_freq(iface->bss[0], iface->conf->channel);
189 if (iface->conf->secondary_channel > 0)
209 struct hostapd_iface *iface = hapd->iface;
221 if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET))
272 if (is_40_allowed(iface, chan))
283 is_ht40_allowed, iface->num_sta_ht40_intolerant);
286 (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) {
287 if (iface->conf->secondary_channel) {
292 iface->conf->secondary_channel = 0;
293 ieee802_11_set_beacons(iface);
295 if (!iface->num_sta_ht40_intolerant &&
296 iface->conf->obss_interval) {
299 iface->conf->obss_interval;
300 eloop_cancel_timeout(ap_ht2040_timeout, hapd->iface,
303 hapd->iface, NULL);
343 void ht40_intolerant_add(struct hostapd_iface *iface, struct sta_info *sta)
345 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
355 iface->num_sta_ht40_intolerant++;
356 eloop_cancel_timeout(ap_ht2040_timeout, iface, NULL);
358 if (iface->conf->secondary_channel &&
359 (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) {
360 iface->conf->secondary_channel = 0;
361 ieee802_11_set_beacons(iface);
366 void ht40_intolerant_remove(struct hostapd_iface *iface, struct sta_info *sta)
372 iface->num_sta_ht40_intolerant--;
374 if (iface->num_sta_ht40_intolerant == 0 &&
375 (iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET) &&
376 (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) {
378 iface->conf->obss_interval;
382 eloop_cancel_timeout(ap_ht2040_timeout, iface, NULL);
384 iface, NULL);
399 hapd->iface->num_sta_ht_no_gf++;
404 hapd->iface->num_sta_ht_no_gf);
409 hapd->iface->num_sta_ht_20mhz++;
414 hapd->iface->num_sta_ht_20mhz);
418 ht40_intolerant_add(hapd->iface, sta);
426 hapd->iface->num_sta_no_ht++;
432 hapd->iface->num_sta_no_ht);
444 if (hostapd_ht_operation_update(hapd->iface) > 0)
445 ieee802_11_set_beacons(hapd->iface);
484 struct hostapd_iface *iface = eloop_data;
488 iface->conf->secondary_channel = iface->secondary_ch;
489 ieee802_11_set_beacons(iface);