Lines Matching defs:sta

44 				       struct sta_info *sta);
52 static int ap_sta_remove(struct hostapd_data *hapd, struct sta_info *sta);
56 int (*cb)(struct hostapd_data *hapd, struct sta_info *sta,
60 struct sta_info *sta;
62 for (sta = hapd->sta_list; sta; sta = sta->next) {
63 if (cb(hapd, sta, ctx))
71 struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta)
75 s = hapd->sta_hash[STA_HASH(sta)];
76 while (s != NULL && os_memcmp(s->addr, sta, 6) != 0)
85 struct sta_info *sta;
87 for (sta = hapd->sta_list; sta; sta = sta->next) {
90 if (sta->p2p_ie == NULL)
93 p2p_dev_addr = p2p_get_go_dev_addr(sta->p2p_ie);
98 return sta;
106 static void ap_sta_list_del(struct hostapd_data *hapd, struct sta_info *sta)
110 if (hapd->sta_list == sta) {
111 hapd->sta_list = sta->next;
116 while (tmp != NULL && tmp->next != sta)
120 "list.", MAC2STR(sta->addr));
122 tmp->next = sta->next;
126 void ap_sta_hash_add(struct hostapd_data *hapd, struct sta_info *sta)
128 sta->hnext = hapd->sta_hash[STA_HASH(sta->addr)];
129 hapd->sta_hash[STA_HASH(sta->addr)] = sta;
133 static void ap_sta_hash_del(struct hostapd_data *hapd, struct sta_info *sta)
137 s = hapd->sta_hash[STA_HASH(sta->addr)];
139 if (os_memcmp(s->addr, sta->addr, 6) == 0) {
140 hapd->sta_hash[STA_HASH(sta->addr)] = s->hnext;
145 os_memcmp(s->hnext->addr, sta->addr, ETH_ALEN) != 0)
151 " from hash table", MAC2STR(sta->addr));
155 void ap_sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta)
157 sta_ip6addr_del(hapd, sta);
161 void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
165 accounting_sta_stop(hapd, sta);
168 ap_sta_set_authorized(hapd, sta, 0);
170 if (sta->flags & (WLAN_STA_WDS | WLAN_STA_MULTI_AP))
171 hostapd_set_wds_sta(hapd, NULL, sta->addr, sta->aid, 0);
173 if (sta->ipaddr)
174 hostapd_drv_br_delete_ip_neigh(hapd, 4, (u8 *) &sta->ipaddr);
175 ap_sta_ip6addr_del(hapd, sta);
178 !(sta->flags & WLAN_STA_PREAUTH)) {
179 hostapd_drv_sta_remove(hapd, sta->addr);
180 sta->added_unassoc = 0;
183 ap_sta_hash_del(hapd, sta);
184 ap_sta_list_del(hapd, sta);
186 if (sta->aid > 0)
187 hapd->sta_aid[(sta->aid - 1) / 32] &=
188 ~BIT((sta->aid - 1) % 32);
191 if (sta->nonerp_set) {
192 sta->nonerp_set = 0;
198 if (sta->no_short_slot_time_set) {
199 sta->no_short_slot_time_set = 0;
207 if (sta->no_short_preamble_set) {
208 sta->no_short_preamble_set = 0;
216 if (sta->no_ht_gf_set) {
217 sta->no_ht_gf_set = 0;
221 if (sta->no_ht_set) {
222 sta->no_ht_set = 0;
226 if (sta->ht_20mhz_set) {
227 sta->ht_20mhz_set = 0;
232 wpabuf_free(sta->probe_ie_taxonomy);
233 sta->probe_ie_taxonomy = NULL;
234 wpabuf_free(sta->assoc_ie_taxonomy);
235 sta->assoc_ie_taxonomy = NULL;
239 ht40_intolerant_remove(hapd->iface, sta);
243 if (sta->no_p2p_set) {
244 sta->no_p2p_set = 0;
258 hapd->mesh_sta_free_cb(hapd, sta);
265 __func__, MAC2STR(sta->addr));
266 eloop_cancel_timeout(ap_handle_timer, hapd, sta);
267 eloop_cancel_timeout(ap_handle_session_timer, hapd, sta);
268 eloop_cancel_timeout(ap_handle_session_warning_timer, hapd, sta);
269 ap_sta_clear_disconnect_timeouts(hapd, sta);
270 sae_clear_retransmit_timer(hapd, sta);
272 ieee802_1x_free_station(hapd, sta);
273 wpa_auth_sta_deinit(sta->wpa_sm);
274 rsn_preauth_free_station(hapd, sta);
277 radius_client_flush_auth(hapd->radius, sta->addr);
282 * sta->wpa_sm->group needs to be released before so that
286 if (sta->vlan_id)
287 vlan_remove_dynamic(hapd, sta->vlan_id);
288 if (sta->vlan_id_bound) {
294 !(sta->flags & WLAN_STA_PREAUTH)) {
295 hostapd_drv_sta_remove(hapd, sta->addr);
296 sta->added_unassoc = 0;
298 vlan_remove_dynamic(hapd, sta->vlan_id_bound);
302 os_free(sta->challenge);
305 os_free(sta->sa_query_trans_id);
306 eloop_cancel_timeout(ap_sa_query_timer, hapd, sta);
310 p2p_group_notif_disassoc(hapd->p2p_group, sta->addr);
314 if (sta->gas_dialog) {
317 gas_serv_dialog_clear(&sta->gas_dialog[i]);
318 os_free(sta->gas_dialog);
322 wpabuf_free(sta->wps_ie);
323 wpabuf_free(sta->p2p_ie);
324 wpabuf_free(sta->hs20_ie);
325 wpabuf_free(sta->roaming_consortium);
327 wpabuf_free(sta->mb_ies);
330 os_free(sta->ht_capabilities);
331 os_free(sta->vht_capabilities);
332 os_free(sta->vht_operation);
333 os_free(sta->he_capab);
334 hostapd_free_psk_list(sta->psk);
335 os_free(sta->identity);
336 os_free(sta->radius_cui);
337 os_free(sta->remediation_url);
338 os_free(sta->t_c_url);
339 wpabuf_free(sta->hs20_deauth_req);
340 os_free(sta->hs20_session_info_url);
343 sae_clear_data(sta->sae);
344 os_free(sta->sae);
347 mbo_ap_sta_free(sta);
348 os_free(sta->supp_op_classes);
351 os_free(sta->fils_pending_assoc_req);
352 wpabuf_free(sta->fils_hlp_resp);
353 wpabuf_free(sta->hlp_dhcp_discover);
354 eloop_cancel_timeout(fils_hlp_timeout, hapd, sta);
356 crypto_ecdh_deinit(sta->fils_ecdh);
357 wpabuf_clear_free(sta->fils_dh_ss);
358 wpabuf_free(sta->fils_g_sta);
363 bin_clear_free(sta->owe_pmk, sta->owe_pmk_len);
364 crypto_ecdh_deinit(sta->owe_ecdh);
368 dpp_pfs_free(sta->dpp_pfs);
369 sta->dpp_pfs = NULL;
372 os_free(sta->ext_capability);
375 eloop_cancel_timeout(ap_sta_reset_steer_flag_timer, hapd, sta);
378 os_free(sta->ifname_wds);
380 os_free(sta);
386 struct sta_info *sta, *prev;
388 sta = hapd->sta_list;
390 while (sta) {
391 prev = sta;
392 if (sta->flags & WLAN_STA_AUTH) {
394 hapd, sta, WLAN_REASON_UNSPECIFIED);
396 sta = sta->next;
415 struct sta_info *sta = timeout_ctx;
420 hapd->conf->iface, __func__, MAC2STR(sta->addr), sta->flags,
421 sta->timeout_next);
422 if (sta->timeout_next == STA_REMOVE) {
423 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
426 ap_free_sta(hapd, sta);
430 if ((sta->flags & WLAN_STA_ASSOC) &&
431 (sta->timeout_next == STA_NULLFUNC ||
432 sta->timeout_next == STA_DISASSOC)) {
440 inactive_sec = hostapd_drv_get_inact_sec(hapd, sta->addr);
445 MACSTR, MAC2STR(sta->addr));
455 MAC2STR(sta->addr));
458 sta->timeout_next = STA_DISASSOC;
464 MAC2STR(sta->addr), inactive_sec);
465 sta->timeout_next = STA_NULLFUNC;
472 MAC2STR(sta->addr), inactive_sec,
476 sta->timeout_next = STA_DISASSOC;
480 if ((sta->flags & WLAN_STA_ASSOC) &&
481 sta->timeout_next == STA_DISASSOC &&
482 !(sta->flags & WLAN_STA_PENDING_POLL) &&
485 " has ACKed data poll", MAC2STR(sta->addr));
488 sta->timeout_next = STA_NULLFUNC;
496 __func__, MAC2STR(sta->addr), next_time);
498 sta);
502 if (sta->timeout_next == STA_NULLFUNC &&
503 (sta->flags & WLAN_STA_ASSOC)) {
505 sta->flags |= WLAN_STA_PENDING_POLL;
506 hostapd_drv_poll_client(hapd, hapd->own_addr, sta->addr,
507 sta->flags & WLAN_STA_WMM);
508 } else if (sta->timeout_next != STA_REMOVE) {
509 int deauth = sta->timeout_next == STA_DEAUTH;
511 if (!deauth && !(sta->flags & WLAN_STA_ASSOC)) {
514 sta->timeout_next = STA_DEAUTH;
521 MAC2STR(sta->addr));
525 hapd, sta->addr,
528 reason = (sta->timeout_next == STA_DISASSOC) ?
532 hostapd_drv_sta_disassoc(hapd, sta->addr, reason);
536 switch (sta->timeout_next) {
538 sta->timeout_next = STA_DISASSOC;
541 __func__, MAC2STR(sta->addr), AP_DISASSOC_DELAY);
543 hapd, sta);
547 ap_sta_set_authorized(hapd, sta, 0);
548 sta->flags &= ~WLAN_STA_ASSOC;
549 ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
550 if (!sta->acct_terminate_cause)
551 sta->acct_terminate_cause =
553 accounting_sta_stop(hapd, sta);
554 ieee802_1x_free_station(hapd, sta);
555 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
558 reason = (sta->timeout_next == STA_DISASSOC) ?
561 sta->timeout_next = STA_DEAUTH;
564 __func__, MAC2STR(sta->addr), AP_DEAUTH_DELAY);
566 hapd, sta);
567 mlme_disassociate_indication(hapd, sta, reason);
571 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
574 if (!sta->acct_terminate_cause)
575 sta->acct_terminate_cause =
578 hapd, sta,
580 ap_free_sta(hapd, sta);
589 struct sta_info *sta = timeout_ctx;
592 hapd->conf->iface, MAC2STR(sta->addr));
593 if (!(sta->flags & WLAN_STA_AUTH)) {
594 if (sta->flags & WLAN_STA_GAS) {
596 "entry " MACSTR, MAC2STR(sta->addr));
597 ap_free_sta(hapd, sta);
602 hostapd_drv_sta_deauth(hapd, sta->addr,
604 mlme_deauthenticate_indication(hapd, sta,
606 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
609 sta->acct_terminate_cause =
611 ap_free_sta(hapd, sta);
615 void ap_sta_replenish_timeout(struct hostapd_data *hapd, struct sta_info *sta,
619 ap_handle_session_timer, hapd, sta) == 1) {
620 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
627 void ap_sta_session_timeout(struct hostapd_data *hapd, struct sta_info *sta,
630 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
633 eloop_cancel_timeout(ap_handle_session_timer, hapd, sta);
635 hapd, sta);
639 void ap_sta_no_session_timeout(struct hostapd_data *hapd, struct sta_info *sta)
641 eloop_cancel_timeout(ap_handle_session_timer, hapd, sta);
649 struct sta_info *sta = timeout_ctx;
652 MACSTR, hapd->conf->iface, MAC2STR(sta->addr));
653 if (sta->hs20_session_info_url == NULL)
656 wnm_send_ess_disassoc_imminent(hapd, sta, sta->hs20_session_info_url,
657 sta->hs20_disassoc_timer);
663 struct sta_info *sta, int warning_time)
665 eloop_cancel_timeout(ap_handle_session_warning_timer, hapd, sta);
667 hapd, sta);
673 struct sta_info *sta;
676 sta = ap_get_sta(hapd, addr);
677 if (sta)
678 return sta;
688 sta = os_zalloc(sizeof(struct sta_info));
689 if (sta == NULL) {
693 sta->acct_interim_interval = hapd->conf->acct_interim_interval;
694 if (accounting_sta_get_id(hapd, sta) < 0) {
695 os_free(sta);
704 sta->supported_rates[i] = hapd->iface->basic_rates[i] / 5;
706 sta->supported_rates_len = i;
714 ap_handle_timer, hapd, sta);
718 os_memcpy(sta->addr, addr, ETH_ALEN);
719 sta->next = hapd->sta_list;
720 hapd->sta_list = sta;
722 ap_sta_hash_add(hapd, sta);
723 ap_sta_remove_in_other_bss(hapd, sta);
724 sta->last_seq_ctrl = WLAN_INVALID_MGMT_SEQ;
725 dl_list_init(&sta->ip6addr);
729 &sta->probe_ie_taxonomy);
732 return sta;
736 static int ap_sta_remove(struct hostapd_data *hapd, struct sta_info *sta)
738 ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
740 if (sta->ipaddr)
741 hostapd_drv_br_delete_ip_neigh(hapd, 4, (u8 *) &sta->ipaddr);
742 ap_sta_ip6addr_del(hapd, sta);
745 hapd->conf->iface, MAC2STR(sta->addr));
746 if (hostapd_drv_sta_remove(hapd, sta->addr) &&
747 sta->flags & WLAN_STA_ASSOC) {
750 hapd->conf->iface, MAC2STR(sta->addr));
753 sta->added_unassoc = 0;
759 struct sta_info *sta)
773 sta2 = ap_get_sta(bss, sta->addr);
790 struct sta_info *sta = timeout_ctx;
793 hapd->conf->iface, MAC2STR(sta->addr));
794 ap_sta_remove(hapd, sta);
795 mlme_disassociate_indication(hapd, sta, sta->disassoc_reason);
799 void ap_sta_disassociate(struct hostapd_data *hapd, struct sta_info *sta,
803 hapd->conf->iface, MAC2STR(sta->addr));
804 sta->last_seq_ctrl = WLAN_INVALID_MGMT_SEQ;
808 sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC |
810 sta->timeout_next = STA_REMOVE;
812 sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
813 sta->timeout_next = STA_DEAUTH;
815 ap_sta_set_authorized(hapd, sta, 0);
819 __func__, MAC2STR(sta->addr),
821 eloop_cancel_timeout(ap_handle_timer, hapd, sta);
823 ap_handle_timer, hapd, sta);
824 accounting_sta_stop(hapd, sta);
825 ieee802_1x_free_station(hapd, sta);
826 wpa_auth_sta_deinit(sta->wpa_sm);
827 sta->wpa_sm = NULL;
829 sta->disassoc_reason = reason;
830 sta->flags |= WLAN_STA_PENDING_DISASSOC_CB;
831 eloop_cancel_timeout(ap_sta_disassoc_cb_timeout, hapd, sta);
834 ap_sta_disassoc_cb_timeout, hapd, sta);
841 struct sta_info *sta = timeout_ctx;
844 hapd->conf->iface, MAC2STR(sta->addr));
845 ap_sta_remove(hapd, sta);
846 mlme_deauthenticate_indication(hapd, sta, sta->deauth_reason);
850 void ap_sta_deauthenticate(struct hostapd_data *hapd, struct sta_info *sta,
857 ap_sta_disassociate(hapd, sta, reason);
862 hapd->conf->iface, MAC2STR(sta->addr));
863 sta->last_seq_ctrl = WLAN_INVALID_MGMT_SEQ;
864 sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
865 ap_sta_set_authorized(hapd, sta, 0);
866 sta->timeout_next = STA_REMOVE;
870 __func__, MAC2STR(sta->addr),
872 eloop_cancel_timeout(ap_handle_timer, hapd, sta);
874 ap_handle_timer, hapd, sta);
875 accounting_sta_stop(hapd, sta);
876 ieee802_1x_free_station(hapd, sta);
878 sta->deauth_reason = reason;
879 sta->flags |= WLAN_STA_PENDING_DEAUTH_CB;
880 eloop_cancel_timeout(ap_sta_deauth_cb_timeout, hapd, sta);
883 ap_sta_deauth_cb_timeout, hapd, sta);
889 struct sta_info *sta, void *ctx)
891 if (sta && (sta->flags & WLAN_STA_WPS)) {
892 ap_sta_deauthenticate(hapd, sta,
894 wpa_printf(MSG_DEBUG, "WPS: %s: Deauth sta=" MACSTR,
895 __func__, MAC2STR(sta->addr));
920 int ap_sta_set_vlan(struct hostapd_data *hapd, struct sta_info *sta,
927 if (hapd->conf->ssid.per_sta_vif && !sta->vlan_id) {
928 /* This sta is lacking its own vif */
930 !hapd->conf->ssid.per_sta_vif && sta->vlan_id) {
931 /* sta->vlan_id needs to be reset */
932 } else if (!vlan_compare(vlan_desc, sta->vlan_desc)) {
947 hostapd_logger(hapd, sta->addr,
972 hostapd_logger(hapd, sta->addr,
987 hostapd_logger(hapd, sta->addr,
999 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
1005 hostapd_logger(hapd, sta->addr,
1012 old_vlan_id = sta->vlan_id;
1013 sta->vlan_id = vlan_id;
1014 sta->vlan_desc = vlan ? &vlan->vlan_desc : NULL;
1023 int ap_sta_bind_vlan(struct hostapd_data *hapd, struct sta_info *sta)
1029 int old_vlanid = sta->vlan_id_bound;
1035 if (sta->vlan_id > 0) {
1037 if (vlan->vlan_id == sta->vlan_id)
1049 if (sta->vlan_id == old_vlanid)
1052 if (sta->vlan_id > 0 && vlan == NULL) {
1053 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
1056 sta->vlan_id);
1061 hostapd_logger(hapd, sta->addr,
1069 sta->vlan_id_bound = sta->vlan_id;
1072 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
1076 if (wpa_auth_sta_set_vlan(sta->wpa_sm, sta->vlan_id) < 0)
1079 ret = hostapd_drv_set_sta_vlan(iface, hapd, sta->addr, sta->vlan_id);
1081 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
1083 "entry to vlan_id=%d", sta->vlan_id);
1087 if (old_vlanid > 0 && old_vlanid != sta->vlan_id)
1100 int ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta)
1105 os_reltime_sub(&now, &sta->sa_query_start, &passed);
1108 hostapd_logger(hapd, sta->addr,
1112 sta->sa_query_timed_out = 1;
1113 os_free(sta->sa_query_trans_id);
1114 sta->sa_query_trans_id = NULL;
1115 sta->sa_query_count = 0;
1116 eloop_cancel_timeout(ap_sa_query_timer, hapd, sta);
1127 struct sta_info *sta = timeout_ctx;
1133 hapd->conf->iface, MAC2STR(sta->addr), sta->sa_query_count);
1135 if (sta->sa_query_count > 0 &&
1136 ap_check_sa_query_timeout(hapd, sta))
1139 nbuf = os_realloc_array(sta->sa_query_trans_id,
1140 sta->sa_query_count + 1,
1144 if (sta->sa_query_count == 0) {
1146 os_get_reltime(&sta->sa_query_start);
1148 trans_id = nbuf + sta->sa_query_count * WLAN_SA_QUERY_TR_ID_LEN;
1149 sta->sa_query_trans_id = nbuf;
1150 sta->sa_query_count++;
1165 eloop_register_timeout(sec, usec, ap_sa_query_timer, hapd, sta);
1167 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
1169 "association SA Query attempt %d", sta->sa_query_count);
1171 ieee802_11_send_sa_query_req(hapd, sta->addr, trans_id);
1175 void ap_sta_start_sa_query(struct hostapd_data *hapd, struct sta_info *sta)
1177 ap_sa_query_timer(hapd, sta);
1181 void ap_sta_stop_sa_query(struct hostapd_data *hapd, struct sta_info *sta)
1183 eloop_cancel_timeout(ap_sa_query_timer, hapd, sta);
1184 os_free(sta->sa_query_trans_id);
1185 sta->sa_query_trans_id = NULL;
1186 sta->sa_query_count = 0;
1193 struct sta_info *sta)
1202 pmk = wpa_auth_get_pmk(sta->wpa_sm, &pmk_len);
1218 void ap_sta_set_authorized(struct hostapd_data *hapd, struct sta_info *sta,
1228 if (!!authorized == !!(sta->flags & WLAN_STA_AUTHORIZED))
1232 sta->flags |= WLAN_STA_AUTHORIZED;
1234 sta->flags &= ~WLAN_STA_AUTHORIZED;
1238 if (sta->p2p_ie != NULL &&
1239 p2p_parse_dev_addr_in_p2p_ie(sta->p2p_ie, addr) == 0)
1242 dev_addr = p2p_group_get_dev_addr(hapd->p2p_group, sta->addr);
1246 MAC2STR(sta->addr), MAC2STR(dev_addr));
1249 os_snprintf(buf, sizeof(buf), MACSTR, MAC2STR(sta->addr));
1253 sta->addr, authorized, dev_addr);
1263 if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
1271 keyid = ap_sta_wpa_get_keyid(hapd, sta);
1297 fst_notify_peer_connected(hapd->iface->fst, sta->addr);
1300 sta->addr);
1306 void ap_sta_disconnect(struct hostapd_data *hapd, struct sta_info *sta,
1309 if (sta)
1311 hapd->conf->iface, __func__, MAC2STR(sta->addr),
1318 if (sta == NULL && addr)
1319 sta = ap_get_sta(hapd, addr);
1324 if (sta == NULL)
1326 ap_sta_set_authorized(hapd, sta, 0);
1327 wpa_auth_sm_event(sta->wpa_sm, WPA_DEAUTH);
1328 ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
1329 sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
1333 hapd->conf->iface, __func__, MAC2STR(sta->addr),
1335 eloop_cancel_timeout(ap_handle_timer, hapd, sta);
1337 ap_handle_timer, hapd, sta);
1338 sta->timeout_next = STA_REMOVE;
1344 sta->disassoc_reason = reason;
1345 sta->flags |= WLAN_STA_PENDING_DISASSOC_CB;
1346 eloop_cancel_timeout(ap_sta_disassoc_cb_timeout, hapd, sta);
1350 hapd, sta);
1354 sta->deauth_reason = reason;
1355 sta->flags |= WLAN_STA_PENDING_DEAUTH_CB;
1356 eloop_cancel_timeout(ap_sta_deauth_cb_timeout, hapd, sta);
1359 ap_sta_deauth_cb_timeout, hapd, sta);
1363 void ap_sta_deauth_cb(struct hostapd_data *hapd, struct sta_info *sta)
1365 if (!(sta->flags & WLAN_STA_PENDING_DEAUTH_CB)) {
1369 sta->flags &= ~WLAN_STA_PENDING_DEAUTH_CB;
1370 eloop_cancel_timeout(ap_sta_deauth_cb_timeout, hapd, sta);
1371 ap_sta_deauth_cb_timeout(hapd, sta);
1375 void ap_sta_disassoc_cb(struct hostapd_data *hapd, struct sta_info *sta)
1377 if (!(sta->flags & WLAN_STA_PENDING_DISASSOC_CB)) {
1381 sta->flags &= ~WLAN_STA_PENDING_DISASSOC_CB;
1382 eloop_cancel_timeout(ap_sta_disassoc_cb_timeout, hapd, sta);
1383 ap_sta_disassoc_cb_timeout(hapd, sta);
1388 struct sta_info *sta)
1390 if (eloop_cancel_timeout(ap_sta_deauth_cb_timeout, hapd, sta) > 0)
1394 hapd->conf->iface, MAC2STR(sta->addr));
1395 if (eloop_cancel_timeout(ap_sta_disassoc_cb_timeout, hapd, sta) > 0)
1399 hapd->conf->iface, MAC2STR(sta->addr));
1400 if (eloop_cancel_timeout(ap_sta_delayed_1x_auth_fail_cb, hapd, sta) > 0)
1405 hapd->conf->iface, MAC2STR(sta->addr));
1406 if (sta->flags & WLAN_STA_WPS)
1449 struct sta_info *sta = timeout_ctx;
1454 " after EAP-Failure", MAC2STR(sta->addr));
1456 reason = sta->disconnect_reason_code;
1459 ap_sta_disconnect(hapd, sta, sta->addr, reason);
1460 if (sta->flags & WLAN_STA_WPS)
1466 struct sta_info *sta)
1470 " after EAP-Failure in 10 ms", MAC2STR(sta->addr));
1477 eloop_cancel_timeout(ap_sta_delayed_1x_auth_fail_cb, hapd, sta);
1479 hapd, sta);
1484 struct sta_info *sta)
1487 hapd, sta);