Lines Matching refs:sta
47 struct sta_info *sta; in rsn_preauth_receive() local
67 sta = ap_get_sta(hapd, ethhdr->h_source); in rsn_preauth_receive()
68 if (sta && (sta->flags & WLAN_STA_ASSOC)) { in rsn_preauth_receive()
70 "STA " MACSTR, MAC2STR(sta->addr)); in rsn_preauth_receive()
73 if (!sta && hdr->type == IEEE802_1X_TYPE_EAPOL_START) { in rsn_preauth_receive()
74 sta = ap_sta_add(hapd, ethhdr->h_source); in rsn_preauth_receive()
75 if (sta == NULL) in rsn_preauth_receive()
77 sta->flags = WLAN_STA_PREAUTH; in rsn_preauth_receive()
79 ieee802_1x_new_station(hapd, sta); in rsn_preauth_receive()
80 if (sta->eapol_sm == NULL) { in rsn_preauth_receive()
81 ap_free_sta(hapd, sta); in rsn_preauth_receive()
82 sta = NULL; in rsn_preauth_receive()
84 sta->eapol_sm->radius_identifier = -1; in rsn_preauth_receive()
85 sta->eapol_sm->portValid = true; in rsn_preauth_receive()
86 sta->eapol_sm->flags |= EAPOL_SM_PREAUTH; in rsn_preauth_receive()
89 if (sta == NULL) in rsn_preauth_receive()
91 sta->preauth_iface = piface; in rsn_preauth_receive()
188 struct sta_info *sta = timeout_ctx; in rsn_preauth_finished_cb() local
190 MACSTR, MAC2STR(sta->addr)); in rsn_preauth_finished_cb()
191 ap_free_sta(hapd, sta); in rsn_preauth_finished_cb()
195 void rsn_preauth_finished(struct hostapd_data *hapd, struct sta_info *sta, in rsn_preauth_finished() argument
200 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_WPA, in rsn_preauth_finished()
204 key = ieee802_1x_get_key(sta->eapol_sm, &len); in rsn_preauth_finished()
209 sta->addr, in rsn_preauth_finished()
211 sta->eapol_sm) == 0) { in rsn_preauth_finished()
212 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_WPA, in rsn_preauth_finished()
216 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_WPA, in rsn_preauth_finished()
227 eloop_register_timeout(0, 0, rsn_preauth_finished_cb, hapd, sta); in rsn_preauth_finished()
231 void rsn_preauth_send(struct hostapd_data *hapd, struct sta_info *sta, in rsn_preauth_send() argument
239 if (piface == sta->preauth_iface) in rsn_preauth_send()
246 "interface for " MACSTR, MAC2STR(sta->addr)); in rsn_preauth_send()
254 os_memcpy(ethhdr->h_dest, sta->addr, ETH_ALEN); in rsn_preauth_send()
259 if (l2_packet_send(piface->l2, sta->addr, ETH_P_PREAUTH, (u8 *) ethhdr, in rsn_preauth_send()
268 void rsn_preauth_free_station(struct hostapd_data *hapd, struct sta_info *sta) in rsn_preauth_free_station() argument
270 eloop_cancel_timeout(rsn_preauth_finished_cb, hapd, sta); in rsn_preauth_free_station()