Home | History | Annotate | Download | only in ap

Lines Matching defs:hapd

34 int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
63 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
86 sta = ap_get_sta(hapd, addr);
88 accounting_sta_stop(hapd, sta);
96 sta = ap_sta_add(hapd, addr);
98 hostapd_drv_sta_disassoc(hapd, addr,
122 if (hapd->conf->wpa) {
125 if (hapd->conf->wps_state) {
138 if (hapd->conf->wps_state && ie[0] == 0xdd && ie[1] >= 4 &&
157 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth,
164 res = wpa_validate_wpa_ie(hapd->wpa_auth, sta->wpa_sm,
199 ap_check_sa_query_timeout(hapd, sta);
210 ap_sta_start_sa_query(hapd, sta);
215 p = hostapd_eid_assoc_comeback_time(hapd, sta, p);
217 hostapd_sta_assoc(hapd, addr, reassoc, status, buf,
244 } else if (hapd->conf->wps_state) {
280 hostapd_sta_assoc(hapd, addr, reassoc, status, buf, p - buf);
295 hostapd_new_assoc_sta(hapd, sta, !new_assoc);
301 p2p_group_notif_assoc(hapd->p2p_group, sta->addr,
310 hostapd_sta_assoc(hapd, addr, reassoc, status, buf, p - buf);
312 hostapd_drv_sta_disassoc(hapd, sta->addr, reason);
313 ap_free_sta(hapd, sta);
318 void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr)
335 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
338 sta = ap_get_sta(hapd, addr);
345 ap_sta_set_authorized(hapd, sta, 0);
350 ap_free_sta(hapd, sta);
354 void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr)
356 struct sta_info *sta = ap_get_sta(hapd, addr);
358 if (!sta || !hapd->conf->disassoc_low_ack)
361 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
364 hostapd_drv_sta_disassoc(hapd, addr, WLAN_REASON_DISASSOC_LOW_ACK);
366 ap_sta_disassociate(hapd, sta, WLAN_REASON_DISASSOC_LOW_ACK);
370 void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
376 hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
380 hapd->iface->freq = freq;
382 channel = hostapd_hw_get_channel(hapd, freq);
384 hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
390 hapd->iconf->channel = channel;
391 hapd->iconf->ieee80211n = ht;
392 hapd->iconf->secondary_channel = offset;
397 void hostapd_event_connect_failed_reason(struct hostapd_data *hapd,
402 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_REJECTED_MAX_STA MACSTR,
406 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_REJECTED_BLOCKED_STA MACSTR,
413 int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
424 for (i = 0; hapd->probereq_cb && i < hapd->num_probereq_cb; i++) {
425 if (hapd->probereq_cb[i].cb(hapd->probereq_cb[i].ctx,
444 struct hostapd_data *hapd = ctx;
447 sta = ap_get_sta(hapd, dst);
451 hostapd_logger(hapd, dst, HOSTAPD_MODULE_IEEE80211,
455 hostapd_sta_auth(hapd, dst, auth_transaction, status, ies, ies_len);
460 static void hostapd_notif_auth(struct hostapd_data *hapd,
468 sta = ap_get_sta(hapd, rx_auth->peer);
470 sta = ap_sta_add(hapd, rx_auth->peer);
479 if (rx_auth->auth_type == WLAN_AUTH_FT && hapd->wpa_auth) {
482 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth,
493 hostapd_notify_auth_ft_finish, hapd);
498 hostapd_sta_auth(hapd, rx_auth->peer, rx_auth->auth_transaction + 1,
503 static void hostapd_action_rx(struct hostapd_data *hapd,
511 sta = ap_get_sta(hapd, action->sa);
527 ieee802_11_sa_query_action(hapd, action->sa,
536 ieee802_11_rx_wnm_action_ap(hapd, action);
566 static void hostapd_rx_from_unknown_sta(struct hostapd_data *hapd,
570 hapd = get_hapd_bssid(hapd->iface, bssid);
571 if (hapd == NULL || hapd == HAPD_BROADCAST)
574 ieee802_11_rx_from_unknown(hapd, addr, wds);
578 static void hostapd_mgmt_rx(struct hostapd_data *hapd, struct rx_mgmt *rx_mgmt)
580 struct hostapd_iface *iface = hapd->iface;
590 hapd = get_hapd_bssid(iface, bssid);
591 if (hapd == NULL) {
601 hapd = iface->bss[0];
610 if (hapd == HAPD_BROADCAST) {
616 ieee802_11_mgmt(hapd, rx_mgmt->frame, rx_mgmt->frame_len, &fi);
622 static void hostapd_rx_action(struct hostapd_data *hapd,
657 hostapd_mgmt_rx(hapd, &rx_mgmt);
662 static void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, const u8 *buf,
667 hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len));
668 if (hapd == NULL || hapd == HAPD_BROADCAST)
670 ieee802_11_mgmt_cb(hapd, buf, len, stype, ok);
676 static int hostapd_event_new_sta(struct hostapd_data *hapd, const u8 *addr)
678 struct sta_info *sta = ap_get_sta(hapd, addr);
684 sta = ap_sta_add(hapd, addr);
686 hostapd_new_assoc_sta(hapd, sta, 0);
697 static void hostapd_event_eapol_rx(struct hostapd_data *hapd, const u8 *src,
700 struct hostapd_iface *iface = hapd->iface;
707 hapd = iface->bss[j];
713 ieee802_1x_receive(hapd, src, data, data_len);
720 struct hostapd_data *hapd = ctx;
735 wpa_dbg(hapd->msg_ctx, level, "Event %s (%d) received",
741 michael_mic_failure(hapd, data->michael_mic_failure.src, 1);
744 if (hapd->iface->scan_cb)
745 hapd->iface->scan_cb(hapd->iface);
749 wpa_ft_rrb_rx(hapd->wpa_auth, data->ft_rrb_rx.src,
754 hostapd_wps_button_pushed(hapd, NULL);
760 hostapd_mgmt_tx_cb(hapd, data->tx_status.data,
766 hostapd_tx_status(hapd, data->tx_status.dst,
774 hostapd_eapol_tx_status(hapd, data->eapol_tx_status.dst,
780 hostapd_client_poll_ok(hapd, data->client_poll.addr);
783 hostapd_rx_from_unknown_sta(hapd, data->rx_from_unknown.bssid,
788 hostapd_mgmt_rx(hapd, &data->rx_mgmt);
795 hostapd_probe_req_rx(hapd, data->rx_probe_req.sa,
803 hostapd_event_new_sta(hapd, data->new_sta.addr);
806 hostapd_event_eapol_rx(hapd, data->eapol_rx.src,
811 hostapd_notif_assoc(hapd, data->assoc_info.addr,
818 hostapd_notif_disassoc(hapd, data->disassoc_info.addr);
822 hostapd_notif_disassoc(hapd, data->deauth_info.addr);
827 hostapd_event_sta_low_ack(hapd, data->low_ack.addr);
834 hostapd_rx_action(hapd, &data->rx_action);
836 hostapd_action_rx(hapd, &data->rx_action);
839 hostapd_notif_auth(hapd, &data->auth);
844 hostapd_event_ch_switch(hapd, data->ch_switch.freq,
852 hapd, data->connect_failed_reason.addr,