Lines Matching refs:iface
29 if (!hapd->iconf->ieee80211n || !hapd->iface->current_mode || in hostapd_eid_ht_capabilities()
39 cap->a_mpdu_params = hapd->iface->current_mode->a_mpdu_params; in hostapd_eid_ht_capabilities()
40 os_memcpy(cap->supported_mcs_set, hapd->iface->current_mode->mcs_set, in hostapd_eid_ht_capabilities()
98 oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode); in hostapd_eid_ht_operation()
123 int hostapd_ht_operation_update(struct hostapd_iface *iface) in hostapd_ht_operation_update() argument
128 if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed) in hostapd_ht_operation_update()
132 __func__, iface->ht_op_mode); in hostapd_ht_operation_update()
134 if (!(iface->ht_op_mode & HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT) in hostapd_ht_operation_update()
135 && iface->num_sta_ht_no_gf) { in hostapd_ht_operation_update()
136 iface->ht_op_mode |= HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT; in hostapd_ht_operation_update()
138 } else if ((iface->ht_op_mode & in hostapd_ht_operation_update()
140 iface->num_sta_ht_no_gf == 0) { in hostapd_ht_operation_update()
141 iface->ht_op_mode &= ~HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT; in hostapd_ht_operation_update()
145 if (!(iface->ht_op_mode & HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT) && in hostapd_ht_operation_update()
146 (iface->num_sta_no_ht || iface->olbc_ht)) { in hostapd_ht_operation_update()
147 iface->ht_op_mode |= HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT; in hostapd_ht_operation_update()
149 } else if ((iface->ht_op_mode & in hostapd_ht_operation_update()
151 (iface->num_sta_no_ht == 0 && !iface->olbc_ht)) { in hostapd_ht_operation_update()
152 iface->ht_op_mode &= ~HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT; in hostapd_ht_operation_update()
156 if (iface->num_sta_no_ht) in hostapd_ht_operation_update()
158 else if (iface->conf->secondary_channel && iface->num_sta_ht_20mhz) in hostapd_ht_operation_update()
160 else if (iface->olbc_ht) in hostapd_ht_operation_update()
165 cur_op_mode = iface->ht_op_mode & HT_OPER_OP_MODE_HT_PROT_MASK; in hostapd_ht_operation_update()
167 iface->ht_op_mode &= ~HT_OPER_OP_MODE_HT_PROT_MASK; in hostapd_ht_operation_update()
168 iface->ht_op_mode |= new_op_mode; in hostapd_ht_operation_update()
173 __func__, iface->ht_op_mode, op_mode_changes); in hostapd_ht_operation_update()
179 static int is_40_allowed(struct hostapd_iface *iface, int channel) in is_40_allowed() argument
185 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) in is_40_allowed()
188 pri_freq = hostapd_hw_get_freq(iface->bss[0], iface->conf->channel); in is_40_allowed()
190 if (iface->conf->secondary_channel > 0) in is_40_allowed()
210 struct hostapd_iface *iface = hapd->iface; in hostapd_2040_coex_action() local
227 if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)) { in hostapd_2040_coex_action()
313 if (chan == iface->conf->channel) in hostapd_2040_coex_action()
315 if (is_40_allowed(iface, chan)) in hostapd_2040_coex_action()
328 is_ht40_allowed, iface->num_sta_ht40_intolerant); in hostapd_2040_coex_action()
331 (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) { in hostapd_2040_coex_action()
332 if (iface->conf->secondary_channel) { in hostapd_2040_coex_action()
337 iface->conf->secondary_channel = 0; in hostapd_2040_coex_action()
338 ieee802_11_set_beacons(iface); in hostapd_2040_coex_action()
340 if (!iface->num_sta_ht40_intolerant && in hostapd_2040_coex_action()
341 iface->conf->obss_interval) { in hostapd_2040_coex_action()
344 iface->conf->obss_interval; in hostapd_2040_coex_action()
345 eloop_cancel_timeout(ap_ht2040_timeout, hapd->iface, in hostapd_2040_coex_action()
348 hapd->iface, NULL); in hostapd_2040_coex_action()
388 void ht40_intolerant_add(struct hostapd_iface *iface, struct sta_info *sta) in ht40_intolerant_add() argument
390 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) in ht40_intolerant_add()
400 iface->num_sta_ht40_intolerant++; in ht40_intolerant_add()
401 eloop_cancel_timeout(ap_ht2040_timeout, iface, NULL); in ht40_intolerant_add()
403 if (iface->conf->secondary_channel && in ht40_intolerant_add()
404 (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) { in ht40_intolerant_add()
405 iface->conf->secondary_channel = 0; in ht40_intolerant_add()
406 ieee802_11_set_beacons(iface); in ht40_intolerant_add()
411 void ht40_intolerant_remove(struct hostapd_iface *iface, struct sta_info *sta) in ht40_intolerant_remove() argument
417 iface->num_sta_ht40_intolerant--; in ht40_intolerant_remove()
419 if (iface->num_sta_ht40_intolerant == 0 && in ht40_intolerant_remove()
420 (iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET) && in ht40_intolerant_remove()
421 (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) { in ht40_intolerant_remove()
423 iface->conf->obss_interval; in ht40_intolerant_remove()
427 eloop_cancel_timeout(ap_ht2040_timeout, iface, NULL); in ht40_intolerant_remove()
429 iface, NULL); in ht40_intolerant_remove()
444 hapd->iface->num_sta_ht_no_gf++; in update_sta_ht()
449 hapd->iface->num_sta_ht_no_gf); in update_sta_ht()
454 hapd->iface->num_sta_ht_20mhz++; in update_sta_ht()
459 hapd->iface->num_sta_ht_20mhz); in update_sta_ht()
463 ht40_intolerant_add(hapd->iface, sta); in update_sta_ht()
471 hapd->iface->num_sta_no_ht++; in update_sta_no_ht()
477 hapd->iface->num_sta_no_ht); in update_sta_no_ht()
489 return hostapd_ht_operation_update(hapd->iface); in update_ht_state()
528 struct hostapd_iface *iface = eloop_data; in ap_ht2040_timeout() local
532 iface->conf->secondary_channel = iface->secondary_ch; in ap_ht2040_timeout()
533 ieee802_11_set_beacons(iface); in ap_ht2040_timeout()