• Home
  • Raw
  • Download

Lines Matching refs:hapd

40 int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,  in hostapd_notif_assoc()  argument
65 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211, in hostapd_notif_assoc()
88 sta = ap_get_sta(hapd, addr); in hostapd_notif_assoc()
90 accounting_sta_stop(hapd, sta); in hostapd_notif_assoc()
92 sta = ap_sta_add(hapd, addr); in hostapd_notif_assoc()
106 if (hapd->conf->wpa) { in hostapd_notif_assoc()
108 if (hapd->conf->wps_state) { in hostapd_notif_assoc()
119 if (hapd->conf->wps_state && ie[0] == 0xdd && ie[1] >= 4 && in hostapd_notif_assoc()
126 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth, in hostapd_notif_assoc()
133 res = wpa_validate_wpa_ie(hapd->wpa_auth, sta->wpa_sm, in hostapd_notif_assoc()
154 hostapd_drv_sta_disassoc(hapd, sta->addr, resp); in hostapd_notif_assoc()
155 ap_free_sta(hapd, sta); in hostapd_notif_assoc()
158 } else if (hapd->conf->wps_state) { in hostapd_notif_assoc()
166 hapd, sta->addr, in hostapd_notif_assoc()
168 ap_free_sta(hapd, sta); in hostapd_notif_assoc()
187 hostapd_new_assoc_sta(hapd, sta, !new_assoc); in hostapd_notif_assoc()
192 p2p_group_notif_assoc(hapd->p2p_group, sta->addr, in hostapd_notif_assoc()
200 void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr) in hostapd_notif_disassoc() argument
217 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211, in hostapd_notif_disassoc()
220 sta = ap_get_sta(hapd, addr); in hostapd_notif_disassoc()
228 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED MACSTR, in hostapd_notif_disassoc()
231 if(hapd->msg_ctx_parent) in hostapd_notif_disassoc()
232 wpa_msg(hapd->msg_ctx_parent, MSG_INFO, AP_STA_DISCONNECTED MACSTR, in hostapd_notif_disassoc()
238 ap_free_sta(hapd, sta); in hostapd_notif_disassoc()
242 void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr) in hostapd_event_sta_low_ack() argument
244 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_event_sta_low_ack()
246 if (!sta || !hapd->conf->disassoc_low_ack) in hostapd_event_sta_low_ack()
249 hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211, in hostapd_event_sta_low_ack()
252 hostapd_drv_sta_disassoc(hapd, addr, WLAN_REASON_DISASSOC_LOW_ACK); in hostapd_event_sta_low_ack()
254 ap_sta_disassociate(hapd, sta, WLAN_REASON_DISASSOC_LOW_ACK); in hostapd_event_sta_low_ack()
258 int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, in hostapd_probe_req_rx() argument
268 for (i = 0; hapd->probereq_cb && i < hapd->num_probereq_cb; i++) { in hostapd_probe_req_rx()
269 if (hapd->probereq_cb[i].cb(hapd->probereq_cb[i].ctx, in hostapd_probe_req_rx()
345 static void hostapd_rx_from_unknown_sta(struct hostapd_data *hapd, in hostapd_rx_from_unknown_sta() argument
350 hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len)); in hostapd_rx_from_unknown_sta()
351 if (hapd == NULL || hapd == HAPD_BROADCAST) in hostapd_rx_from_unknown_sta()
354 ieee802_11_rx_from_unknown(hapd, hdr->addr2, in hostapd_rx_from_unknown_sta()
360 static void hostapd_mgmt_rx(struct hostapd_data *hapd, struct rx_mgmt *rx_mgmt) in hostapd_mgmt_rx() argument
362 struct hostapd_iface *iface = hapd->iface; in hostapd_mgmt_rx()
372 hapd = get_hapd_bssid(iface, bssid); in hostapd_mgmt_rx()
373 if (hapd == NULL) { in hostapd_mgmt_rx()
383 hapd = iface->bss[0]; in hostapd_mgmt_rx()
392 if (hapd == HAPD_BROADCAST) { in hostapd_mgmt_rx()
398 ieee802_11_mgmt(hapd, rx_mgmt->frame, rx_mgmt->frame_len, &fi); in hostapd_mgmt_rx()
404 static void hostapd_rx_action(struct hostapd_data *hapd, in hostapd_rx_action() argument
439 hostapd_mgmt_rx(hapd, &rx_mgmt); in hostapd_rx_action()
444 static void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, const u8 *buf, in hostapd_mgmt_tx_cb() argument
449 hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len)); in hostapd_mgmt_tx_cb()
450 if (hapd == NULL || hapd == HAPD_BROADCAST) in hostapd_mgmt_tx_cb()
452 ieee802_11_mgmt_cb(hapd, buf, len, stype, ok); in hostapd_mgmt_tx_cb()
458 static int hostapd_event_new_sta(struct hostapd_data *hapd, const u8 *addr) in hostapd_event_new_sta() argument
460 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_event_new_sta()
466 sta = ap_sta_add(hapd, addr); in hostapd_event_new_sta()
468 hostapd_new_assoc_sta(hapd, sta, 0); in hostapd_event_new_sta()
479 static void hostapd_event_eapol_rx(struct hostapd_data *hapd, const u8 *src, in hostapd_event_eapol_rx() argument
482 struct hostapd_iface *iface = hapd->iface; in hostapd_event_eapol_rx()
487 hapd = iface->bss[j]; in hostapd_event_eapol_rx()
492 ieee802_1x_receive(hapd, src, data, data_len); in hostapd_event_eapol_rx()
499 struct hostapd_data *hapd = ctx; in wpa_supplicant_event() local
503 michael_mic_failure(hapd, data->michael_mic_failure.src, 1); in wpa_supplicant_event()
506 if (hapd->iface->scan_cb) in wpa_supplicant_event()
507 hapd->iface->scan_cb(hapd->iface); in wpa_supplicant_event()
511 wpa_ft_rrb_rx(hapd->wpa_auth, data->ft_rrb_rx.src, in wpa_supplicant_event()
516 hostapd_wps_button_pushed(hapd, NULL); in wpa_supplicant_event()
522 hostapd_mgmt_tx_cb(hapd, data->tx_status.data, in wpa_supplicant_event()
528 hostapd_tx_status(hapd, data->tx_status.dst, in wpa_supplicant_event()
536 hostapd_rx_from_unknown_sta(hapd, data->rx_from_unknown.frame, in wpa_supplicant_event()
540 hostapd_mgmt_rx(hapd, &data->rx_mgmt); in wpa_supplicant_event()
547 hostapd_probe_req_rx(hapd, data->rx_probe_req.sa, in wpa_supplicant_event()
552 hostapd_event_new_sta(hapd, data->new_sta.addr); in wpa_supplicant_event()
555 hostapd_event_eapol_rx(hapd, data->eapol_rx.src, in wpa_supplicant_event()
560 hostapd_notif_assoc(hapd, data->assoc_info.addr, in wpa_supplicant_event()
567 hostapd_notif_disassoc(hapd, data->disassoc_info.addr); in wpa_supplicant_event()
571 hostapd_notif_disassoc(hapd, data->deauth_info.addr); in wpa_supplicant_event()
576 hostapd_event_sta_low_ack(hapd, data->low_ack.addr); in wpa_supplicant_event()
583 hostapd_rx_action(hapd, &data->rx_action); in wpa_supplicant_event()