Lines Matching refs:sta

36 static int fils_dhcp_request(struct hostapd_data *hapd, struct sta_info *sta,  in fils_dhcp_request()  argument
45 if (!sta->hlp_dhcp_discover) { in fils_dhcp_request()
53 pos = wpabuf_mhead(sta->hlp_dhcp_discover); in fils_dhcp_request()
54 end = pos + wpabuf_len(sta->hlp_dhcp_discover); in fils_dhcp_request()
91 sta->hlp_dhcp_discover->used = pos - (u8 *) dhcp; in fils_dhcp_request()
117 if (wpabuf_resize(&sta->hlp_dhcp_discover, in fils_dhcp_request()
121 wpabuf_put_data(sta->hlp_dhcp_discover, server_id, in fils_dhcp_request()
123 wpabuf_put_u8(sta->hlp_dhcp_discover, DHCP_OPT_REQUESTED_IP_ADDRESS); in fils_dhcp_request()
124 wpabuf_put_u8(sta->hlp_dhcp_discover, 4); in fils_dhcp_request()
125 wpabuf_put_data(sta->hlp_dhcp_discover, &dhcpoffer->your_ip, 4); in fils_dhcp_request()
126 wpabuf_put_u8(sta->hlp_dhcp_discover, DHCP_OPT_END); in fils_dhcp_request()
132 res = sendto(hapd->dhcp_sock, wpabuf_head(sta->hlp_dhcp_discover), in fils_dhcp_request()
133 wpabuf_len(sta->hlp_dhcp_discover), 0, in fils_dhcp_request()
143 wpabuf_free(sta->hlp_dhcp_discover); in fils_dhcp_request()
144 sta->hlp_dhcp_discover = NULL; in fils_dhcp_request()
145 sta->fils_dhcp_rapid_commit_proxy = 1; in fils_dhcp_request()
153 struct sta_info *sta; in fils_dhcp_handler() local
232 sta = ap_get_sta(hapd, dhcp->hw_addr); in fils_dhcp_handler()
233 if (!sta || !sta->fils_pending_assoc_req) { in fils_dhcp_handler()
244 if (fils_dhcp_request(hapd, sta, dhcp, end) == 0) in fils_dhcp_handler()
257 wpabuf_put_data(resp, sta->addr, ETH_ALEN); in fils_dhcp_handler()
276 !rapid_commit && sta->fils_dhcp_rapid_commit_proxy && end_opt) { in fils_dhcp_handler()
285 if (wpabuf_resize(&sta->fils_hlp_resp, wpabuf_len(resp) + in fils_dhcp_handler()
294 wpabuf_put_u8(sta->fils_hlp_resp, WLAN_EID_EXTENSION); /* Element ID */ in fils_dhcp_handler()
299 wpabuf_put_u8(sta->fils_hlp_resp, len); /* Length */ in fils_dhcp_handler()
301 wpabuf_put_u8(sta->fils_hlp_resp, WLAN_EID_EXT_FILS_HLP_CONTAINER); in fils_dhcp_handler()
305 wpabuf_put_data(sta->fils_hlp_resp, rpos, len - 1); in fils_dhcp_handler()
309 wpabuf_put_u8(sta->fils_hlp_resp, WLAN_EID_FRAGMENT); in fils_dhcp_handler()
311 wpabuf_put_u8(sta->fils_hlp_resp, len); in fils_dhcp_handler()
312 wpabuf_put_data(sta->fils_hlp_resp, rpos, len); in fils_dhcp_handler()
318 if (sta->fils_drv_assoc_finish) in fils_dhcp_handler()
319 hostapd_notify_assoc_fils_finish(hapd, sta); in fils_dhcp_handler()
321 fils_hlp_finish_assoc(hapd, sta); in fils_dhcp_handler()
326 struct sta_info *sta, in fils_process_hlp_dhcp() argument
468 wpabuf_free(sta->hlp_dhcp_discover); in fils_process_hlp_dhcp()
469 sta->hlp_dhcp_discover = dhcp_buf; in fils_process_hlp_dhcp()
479 struct sta_info *sta, const u8 *dst, in fils_process_hlp_udp() argument
501 return fils_process_hlp_dhcp(hapd, sta, (const u8 *) (udph + 1), in fils_process_hlp_udp()
510 struct sta_info *sta, const u8 *dst, in fils_process_hlp_ip() argument
532 return fils_process_hlp_udp(hapd, sta, dst, pos, len); in fils_process_hlp_ip()
540 struct sta_info *sta, in fils_process_hlp_req() argument
547 MAC2STR(sta->addr), MAC2STR(pos), MAC2STR(pos + ETH_ALEN), in fils_process_hlp_req()
549 if (!ether_addr_equal(sta->addr, pos + ETH_ALEN)) { in fils_process_hlp_req()
568 return fils_process_hlp_ip(hapd, sta, pos, pkt + 2, in fils_process_hlp_req()
576 int fils_process_hlp(struct hostapd_data *hapd, struct sta_info *sta, in fils_process_hlp() argument
583 if (sta->fils_pending_assoc_req && in fils_process_hlp()
584 eloop_is_timeout_registered(fils_hlp_timeout, hapd, sta)) { in fils_process_hlp()
592 MAC2STR(sta->addr)); in fils_process_hlp()
597 wpabuf_free(sta->hlp_dhcp_discover); in fils_process_hlp()
598 sta->hlp_dhcp_discover = NULL; in fils_process_hlp()
599 sta->fils_dhcp_rapid_commit_proxy = 0; in fils_process_hlp()
637 if (fils_process_hlp_req(hapd, sta, tmp, tmp_pos - tmp) > 0) in fils_process_hlp()