Home | History | Annotate | Download | only in ap

Lines Matching defs:hapd

89 	struct hostapd_data *hapd = ctx;
105 hostapd_logger(hapd, addr, HOSTAPD_MODULE_WPA, hlevel, "%s", txt);
113 struct hostapd_data *hapd = ctx;
117 ap_sta_disconnect(hapd, NULL, addr, reason);
123 struct hostapd_data *hapd = ctx;
124 return michael_mic_failure(hapd, addr, 0);
131 struct hostapd_data *hapd = ctx;
132 struct sta_info *sta = ap_get_sta(hapd, addr);
143 ieee802_1x_set_sta_authorized(hapd, sta, value);
173 struct hostapd_data *hapd = ctx;
174 struct sta_info *sta = ap_get_sta(hapd, addr);
192 struct hostapd_data *hapd = ctx;
193 struct sta_info *sta = ap_get_sta(hapd, addr);
204 psk = hostapd_get_psk(hapd->conf, addr, p2p_dev_addr, prev_psk);
227 struct hostapd_data *hapd = ctx;
232 sta = ap_get_sta(hapd, addr);
253 struct hostapd_data *hapd = ctx;
254 const char *ifname = hapd->conf->iface;
257 ifname = hostapd_get_vlan_id_ifname(hapd->conf->vlan, vlan_id);
262 return hostapd_drv_set_key(ifname, hapd, alg, addr, idx, 1, NULL, 0,
270 struct hostapd_data *hapd = ctx;
271 return hostapd_get_seqnum(hapd->conf->iface, hapd, addr, idx, seq);
279 struct hostapd_data *hapd = ctx;
283 sta = ap_get_sta(hapd, addr);
287 return hostapd_drv_hapd_send_eapol(hapd, addr, data, data_len,
296 struct hostapd_data *hapd = ctx;
299 for (sta = hapd->sta_list; sta; sta = sta->next) {
329 struct hostapd_data *hapd = ctx;
331 if (hapd->iface->interfaces == NULL ||
332 hapd->iface->interfaces->for_each_interface == NULL)
336 return hapd->iface->interfaces->for_each_interface(
337 hapd->iface->interfaces, wpa_auth_iface_iter, &data);
354 struct hostapd_data *hapd;
358 hapd = iface->bss[j];
359 if (hapd == idata->src_hapd)
361 if (os_memcmp(hapd->own_addr, idata->dst, ETH_ALEN) == 0) {
367 MAC2STR(hapd->own_addr), hapd->conf->iface);
368 wpa_ft_rrb_rx(hapd->wpa_auth,
384 struct hostapd_data *hapd = ctx;
389 if (proto == ETH_P_RRB && hapd->iface->interfaces &&
390 hapd->iface->interfaces->for_each_interface) {
393 idata.src_hapd = hapd;
397 res = hapd->iface->interfaces->for_each_interface(
398 hapd->iface->interfaces, hostapd_wpa_auth_ft_iter,
405 if (hapd->driver && hapd->driver->send_ether)
406 return hapd->driver->send_ether(hapd->drv_priv, dst,
407 hapd->own_addr, proto,
409 if (hapd->l2 == NULL)
416 os_memcpy(buf->h_source, hapd->own_addr, ETH_ALEN);
419 ret = l2_packet_send(hapd->l2, dst, proto, (u8 *) buf,
431 struct hostapd_data *hapd = ctx;
437 sta = ap_get_sta(hapd, dst);
448 os_memcpy(m->sa, hapd->own_addr, ETH_ALEN);
449 os_memcpy(m->bssid, hapd->own_addr, ETH_ALEN);
452 res = hostapd_drv_send_mlme(hapd, (u8 *) m, mlen, 0);
461 struct hostapd_data *hapd = ctx;
464 if (hostapd_add_sta_node(hapd, sta_addr, WLAN_AUTH_FT) < 0)
467 sta = ap_sta_add(hapd, sta_addr);
475 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth, sta->addr, NULL);
477 ap_free_sta(hapd, sta);
489 struct hostapd_data *hapd = ctx;
496 wpa_ft_rrb_rx(hapd->wpa_auth, ethhdr->h_source, buf + sizeof(*ethhdr),
504 struct hostapd_data *hapd = ctx;
505 return hostapd_add_tspec(hapd, sta_addr, tspec_ie, tspec_ielen);
511 int hostapd_setup_wpa(struct hostapd_data *hapd)
518 hostapd_wpa_auth_conf(hapd->conf, hapd->iconf, &_conf);
519 if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_EAPOL_TX_STATUS)
521 if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_MLME)
524 cb.ctx = hapd;
543 hapd->wpa_auth = wpa_init(hapd->own_addr, &_conf, &cb);
544 if (hapd->wpa_auth == NULL) {
549 if (hostapd_set_privacy(hapd, 1)) {
551 "for interface %s", hapd->conf->iface);
555 wpa_ie = wpa_auth_get_wpa_ie(hapd->wpa_auth, &wpa_ie_len);
556 if (hostapd_set_generic_elem(hapd, wpa_ie, wpa_ie_len)) {
562 if (rsn_preauth_iface_init(hapd)) {
569 if (!hostapd_drv_none(hapd)) {
570 hapd->l2 = l2_packet_init(hapd->conf->bridge[0] ?
571 hapd->conf->bridge :
572 hapd->conf->iface, NULL, ETH_P_RRB,
573 hostapd_rrb_receive, hapd, 1);
574 if (hapd->l2 == NULL &&
575 (hapd->driver == NULL ||
576 hapd->driver->send_ether == NULL)) {
589 void hostapd_reconfig_wpa(struct hostapd_data *hapd)
592 hostapd_wpa_auth_conf(hapd->conf, hapd->iconf, &wpa_auth_conf);
593 wpa_reconfig(hapd->wpa_auth, &wpa_auth_conf);
597 void hostapd_deinit_wpa(struct hostapd_data *hapd)
599 ieee80211_tkip_countermeasures_deinit(hapd);
600 rsn_preauth_iface_deinit(hapd);
601 if (hapd->wpa_auth) {
602 wpa_deinit(hapd->wpa_auth);
603 hapd->wpa_auth = NULL;
605 if (hostapd_set_privacy(hapd, 0)) {
608 hapd->conf->iface);
611 if (hostapd_set_generic_elem(hapd, (u8 *) "", 0)) {
614 hapd->conf->iface);
617 ieee802_1x_deinit(hapd);
620 l2_packet_deinit(hapd->l2);