Home | History | Annotate | Download | only in ap

Lines Matching defs:hapd

34 int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
64 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
87 sta = ap_get_sta(hapd, addr);
89 ap_sta_no_session_timeout(hapd, sta);
90 accounting_sta_stop(hapd, sta);
98 sta = ap_sta_add(hapd, addr);
100 hostapd_drv_sta_disassoc(hapd, addr,
126 if (hapd->conf->wpa) {
129 if (hapd->conf->wps_state) {
142 if (hapd->conf->wps_state && ie[0] == 0xdd && ie[1] >= 4 &&
161 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth,
169 res = wpa_validate_wpa_ie(hapd->wpa_auth, sta->wpa_sm,
204 ap_check_sa_query_timeout(hapd, sta);
215 ap_sta_start_sa_query(hapd, sta);
220 p = hostapd_eid_assoc_comeback_time(hapd, sta, p);
222 hostapd_sta_assoc(hapd, addr, reassoc, status, buf,
249 } else if (hapd->conf->wps_state) {
285 hostapd_sta_assoc(hapd, addr, reassoc, status, buf, p - buf);
300 hostapd_new_assoc_sta(hapd, sta, !new_assoc);
306 p2p_group_notif_assoc(hapd->p2p_group, sta->addr,
315 hostapd_sta_assoc(hapd, addr, reassoc, status, buf, p - buf);
317 hostapd_drv_sta_disassoc(hapd, sta->addr, reason);
318 ap_free_sta(hapd, sta);
323 void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr)
340 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
343 sta = ap_get_sta(hapd, addr);
350 ap_sta_set_authorized(hapd, sta, 0);
355 ap_free_sta(hapd, sta);
359 void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr)
361 struct sta_info *sta = ap_get_sta(hapd, addr);
363 if (!sta || !hapd->conf->disassoc_low_ack)
366 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
369 hostapd_drv_sta_disassoc(hapd, addr, WLAN_REASON_DISASSOC_LOW_ACK);
371 ap_sta_disassociate(hapd, sta, WLAN_REASON_DISASSOC_LOW_ACK);
375 void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
381 hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
385 hapd->iface->freq = freq;
387 channel = hostapd_hw_get_channel(hapd, freq);
389 hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
395 hapd->iconf->channel = channel;
396 hapd->iconf->ieee80211n = ht;
397 hapd->iconf->secondary_channel = offset;
402 void hostapd_event_connect_failed_reason(struct hostapd_data *hapd,
407 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_REJECTED_MAX_STA MACSTR,
411 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_REJECTED_BLOCKED_STA MACSTR,
418 int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
429 for (i = 0; hapd->probereq_cb && i < hapd->num_probereq_cb; i++) {
430 if (hapd->probereq_cb[i].cb(hapd->probereq_cb[i].ctx,
449 struct hostapd_data *hapd = ctx;
452 sta = ap_get_sta(hapd, dst);
456 hostapd_logger(hapd, dst, HOSTAPD_MODULE_IEEE80211,
460 hostapd_sta_auth(hapd, dst, auth_transaction, status, ies, ies_len);
465 static void hostapd_notif_auth(struct hostapd_data *hapd,
473 sta = ap_get_sta(hapd, rx_auth->peer);
475 sta = ap_sta_add(hapd, rx_auth->peer);
484 if (rx_auth->auth_type == WLAN_AUTH_FT && hapd->wpa_auth) {
487 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth,
498 hostapd_notify_auth_ft_finish, hapd);
503 hostapd_sta_auth(hapd, rx_auth->peer, rx_auth->auth_transaction + 1,
508 static void hostapd_action_rx(struct hostapd_data *hapd,
516 sta = ap_get_sta(hapd, action->sa);
532 ieee802_11_sa_query_action(hapd, action->sa,
541 ieee802_11_rx_wnm_action_ap(hapd, action);
571 static void hostapd_rx_from_unknown_sta(struct hostapd_data *hapd,
575 hapd = get_hapd_bssid(hapd->iface, bssid);
576 if (hapd == NULL || hapd == HAPD_BROADCAST)
579 ieee802_11_rx_from_unknown(hapd, addr, wds);
583 static void hostapd_mgmt_rx(struct hostapd_data *hapd, struct rx_mgmt *rx_mgmt)
585 struct hostapd_iface *iface = hapd->iface;
595 hapd = get_hapd_bssid(iface, bssid);
596 if (hapd == NULL) {
606 hapd = iface->bss[0];
615 if (hapd == HAPD_BROADCAST) {
621 ieee802_11_mgmt(hapd, rx_mgmt->frame, rx_mgmt->frame_len, &fi);
627 static void hostapd_rx_action(struct hostapd_data *hapd,
662 hostapd_mgmt_rx(hapd, &rx_mgmt);
667 static void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, const u8 *buf,
672 hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len));
673 if (hapd == NULL || hapd == HAPD_BROADCAST)
675 ieee802_11_mgmt_cb(hapd, buf, len, stype, ok);
681 static int hostapd_event_new_sta(struct hostapd_data *hapd, const u8 *addr)
683 struct sta_info *sta = ap_get_sta(hapd, addr);
689 sta = ap_sta_add(hapd, addr);
691 hostapd_new_assoc_sta(hapd, sta, 0);
702 static void hostapd_event_eapol_rx(struct hostapd_data *hapd, const u8 *src,
705 struct hostapd_iface *iface = hapd->iface;
712 hapd = iface->bss[j];
718 ieee802_1x_receive(hapd, src, data, data_len);
758 static void hostapd_event_get_survey(struct hostapd_data *hapd,
761 struct hostapd_iface *iface = hapd->iface;
791 struct hostapd_data *hapd = ctx;
809 wpa_dbg(hapd->msg_ctx, level, "Event %s (%d) received",
815 michael_mic_failure(hapd, data->michael_mic_failure.src, 1);
818 if (hapd->iface->scan_cb)
819 hapd->iface->scan_cb(hapd->iface);
823 wpa_ft_rrb_rx(hapd->wpa_auth, data->ft_rrb_rx.src,
828 hostapd_wps_button_pushed(hapd, NULL);
834 hostapd_mgmt_tx_cb(hapd, data->tx_status.data,
840 hostapd_tx_status(hapd, data->tx_status.dst,
848 hostapd_eapol_tx_status(hapd, data->eapol_tx_status.dst,
854 hostapd_client_poll_ok(hapd, data->client_poll.addr);
857 hostapd_rx_from_unknown_sta(hapd, data->rx_from_unknown.bssid,
862 hostapd_mgmt_rx(hapd, &data->rx_mgmt);
869 hostapd_probe_req_rx(hapd, data->rx_probe_req.sa,
877 hostapd_event_new_sta(hapd, data->new_sta.addr);
880 hostapd_event_eapol_rx(hapd, data->eapol_rx.src,
885 hostapd_notif_assoc(hapd, data->assoc_info.addr,
892 hostapd_notif_disassoc(hapd, data->disassoc_info.addr);
896 hostapd_notif_disassoc(hapd, data->deauth_info.addr);
901 hostapd_event_sta_low_ack(hapd, data->low_ack.addr);
908 hostapd_rx_action(hapd, &data->rx_action);
910 hostapd_action_rx(hapd, &data->rx_action);
913 hostapd_notif_auth(hapd, &data->auth);
918 hostapd_event_ch_switch(hapd, data->ch_switch.freq,
926 hapd, data->connect_failed_reason.addr,
930 hostapd_event_get_survey(hapd, &data->survey_results);