2 * hostapd / IEEE 802.11 Management: Beacon and Probe Request/Response
3 * Copyright (c) 2002-2004, Instant802 Networks, Inc.
4 * Copyright (c) 2005-2006, Devicescape Software, Inc.
5 * Copyright (c) 2008-2009, Jouni Malinen <j@w1.fi>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Alternatively, this software may be distributed under the terms of BSD
14 * See README and COPYING for more details.
17 #include "utils/includes.h"
19 #ifndef CONFIG_NATIVE_WINDOWS
21 #include "utils/common.h"
22 #include "common/ieee802_11_defs.h"
23 #include "common/ieee802_11_common.h"
24 #include "drivers/driver.h"
25 #include "wps/wps_defs.h"
28 #include "ieee802_11.h"
31 #include "ap_config.h"
33 #include "p2p_hostapd.h"
34 #include "ap_drv_ops.h"
40 static u8 ieee802_11_erp_info(struct hostapd_data *hapd)
44 if (hapd->iface->current_mode == NULL ||
45 hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
48 if (hapd->iface->olbc)
49 erp |= ERP_INFO_USE_PROTECTION;
50 if (hapd->iface->num_sta_non_erp > 0) {
51 erp |= ERP_INFO_NON_ERP_PRESENT |
52 ERP_INFO_USE_PROTECTION;
54 if (hapd->iface->num_sta_no_short_preamble > 0 ||
55 hapd->iconf->preamble == LONG_PREAMBLE)
56 erp |= ERP_INFO_BARKER_PREAMBLE_MODE;
62 static u8 * hostapd_eid_ds_params(struct hostapd_data *hapd, u8 *eid)
64 *eid++ = WLAN_EID_DS_PARAMS;
66 *eid++ = hapd->iconf->channel;
71 static u8 * hostapd_eid_erp_info(struct hostapd_data *hapd, u8 *eid)
73 if (hapd->iface->current_mode == NULL ||
74 hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
77 /* Set NonERP_present and use_protection bits if there
78 * are any associated NonERP stations. */
79 /* TODO: use_protection bit can be set to zero even if
80 * there are NonERP stations present. This optimization
81 * might be useful if NonERP stations are "quiet".
82 * See 802.11g/D6 E-1 for recommended practice.
83 * In addition, Non ERP present might be set, if AP detects Non ERP
84 * operation on other APs. */
86 /* Add ERP Information element */
87 *eid++ = WLAN_EID_ERP_INFO;
89 *eid++ = ieee802_11_erp_info(hapd);
95 static u8 * hostapd_eid_country_add(u8 *pos, u8 *end, int chan_spacing,
96 struct hostapd_channel_data *start,
97 struct hostapd_channel_data *prev)
102 /* first channel number */
103 *pos++ = start->chan;
104 /* number of channels */
105 *pos++ = (prev->chan - start->chan) / chan_spacing + 1;
106 /* maximum transmit power level */
107 *pos++ = start->max_tx_power;
113 static u8 * hostapd_eid_country(struct hostapd_data *hapd, u8 *eid,
117 u8 *end = eid + max_len;
119 struct hostapd_hw_modes *mode;
120 struct hostapd_channel_data *start, *prev;
121 int chan_spacing = 1;
123 if (!hapd->iconf->ieee80211d || max_len < 6 ||
124 hapd->iface->current_mode == NULL)
127 *pos++ = WLAN_EID_COUNTRY;
128 pos++; /* length will be set later */
129 os_memcpy(pos, hapd->iconf->country, 3); /* e.g., 'US ' */
132 mode = hapd->iface->current_mode;
133 if (mode->mode == HOSTAPD_MODE_IEEE80211A)
137 for (i = 0; i < mode->num_channels; i++) {
138 struct hostapd_channel_data *chan = &mode->channels[i];
139 if (chan->flag & HOSTAPD_CHAN_DISABLED)
142 prev->chan + chan_spacing == chan->chan &&
143 start->max_tx_power == chan->max_tx_power) {
145 continue; /* can use same entry */
149 pos = hostapd_eid_country_add(pos, end, chan_spacing,
154 /* Start new group */
159 pos = hostapd_eid_country_add(pos, end, chan_spacing,
163 if ((pos - eid) & 1) {
166 *pos++ = 0; /* pad for 16-bit alignment */
169 eid[1] = (pos - eid) - 2;
175 static u8 * hostapd_eid_wpa(struct hostapd_data *hapd, u8 *eid, size_t len)
180 ie = wpa_auth_get_wpa_ie(hapd->wpa_auth, &ielen);
181 if (ie == NULL || ielen > len)
184 os_memcpy(eid, ie, ielen);
189 static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
190 struct sta_info *sta,
191 const struct ieee80211_mgmt *req,
192 int is_p2p, size_t *resp_len)
194 struct ieee80211_mgmt *resp;
198 #define MAX_PROBERESP_LEN 768
199 buflen = MAX_PROBERESP_LEN;
201 if (hapd->wps_probe_resp_ie)
202 buflen += wpabuf_len(hapd->wps_probe_resp_ie);
203 #endif /* CONFIG_WPS */
205 if (hapd->p2p_probe_resp_ie)
206 buflen += wpabuf_len(hapd->p2p_probe_resp_ie);
207 #endif /* CONFIG_P2P */
208 resp = os_zalloc(buflen);
212 epos = ((u8 *) resp) + MAX_PROBERESP_LEN;
214 resp->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
215 WLAN_FC_STYPE_PROBE_RESP);
217 os_memcpy(resp->da, req->sa, ETH_ALEN);
218 os_memcpy(resp->sa, hapd->own_addr, ETH_ALEN);
220 os_memcpy(resp->bssid, hapd->own_addr, ETH_ALEN);
221 resp->u.probe_resp.beacon_int =
222 host_to_le16(hapd->iconf->beacon_int);
224 /* hardware or low-level driver will setup seq_ctrl and timestamp */
225 resp->u.probe_resp.capab_info =
226 host_to_le16(hostapd_own_capab_info(hapd, sta, 1));
228 pos = resp->u.probe_resp.variable;
229 *pos++ = WLAN_EID_SSID;
230 *pos++ = hapd->conf->ssid.ssid_len;
231 os_memcpy(pos, hapd->conf->ssid.ssid, hapd->conf->ssid.ssid_len);
232 pos += hapd->conf->ssid.ssid_len;
234 /* Supported rates */
235 pos = hostapd_eid_supp_rates(hapd, pos);
238 pos = hostapd_eid_ds_params(hapd, pos);
240 pos = hostapd_eid_country(hapd, pos, epos - pos);
242 /* ERP Information element */
243 pos = hostapd_eid_erp_info(hapd, pos);
245 /* Extended supported rates */
246 pos = hostapd_eid_ext_supp_rates(hapd, pos);
249 pos = hostapd_eid_wpa(hapd, pos, epos - pos);
251 #ifdef CONFIG_IEEE80211N
252 pos = hostapd_eid_ht_capabilities(hapd, pos);
253 pos = hostapd_eid_ht_operation(hapd, pos);
254 #endif /* CONFIG_IEEE80211N */
256 pos = hostapd_eid_ext_capab(hapd, pos);
258 pos = hostapd_eid_time_adv(hapd, pos);
259 pos = hostapd_eid_time_zone(hapd, pos);
261 pos = hostapd_eid_interworking(hapd, pos);
262 pos = hostapd_eid_adv_proto(hapd, pos);
263 pos = hostapd_eid_roaming_consortium(hapd, pos);
265 #ifdef CONFIG_IEEE80211AC
266 pos = hostapd_eid_vht_capabilities(hapd, pos);
267 pos = hostapd_eid_vht_operation(hapd, pos);
268 #endif /* CONFIG_IEEE80211AC */
270 /* Wi-Fi Alliance WMM */
271 pos = hostapd_eid_wmm(hapd, pos);
274 if (hapd->conf->wps_state && hapd->wps_probe_resp_ie) {
275 os_memcpy(pos, wpabuf_head(hapd->wps_probe_resp_ie),
276 wpabuf_len(hapd->wps_probe_resp_ie));
277 pos += wpabuf_len(hapd->wps_probe_resp_ie);
279 #endif /* CONFIG_WPS */
282 if ((hapd->conf->p2p & P2P_ENABLED) && is_p2p &&
283 hapd->p2p_probe_resp_ie) {
284 os_memcpy(pos, wpabuf_head(hapd->p2p_probe_resp_ie),
285 wpabuf_len(hapd->p2p_probe_resp_ie));
286 pos += wpabuf_len(hapd->p2p_probe_resp_ie);
288 #endif /* CONFIG_P2P */
289 #ifdef CONFIG_P2P_MANAGER
290 if ((hapd->conf->p2p & (P2P_MANAGE | P2P_ENABLED | P2P_GROUP_OWNER)) ==
292 pos = hostapd_eid_p2p_manage(hapd, pos);
293 #endif /* CONFIG_P2P_MANAGER */
295 *resp_len = pos - (u8 *) resp;
300 void handle_probe_req(struct hostapd_data *hapd,
301 const struct ieee80211_mgmt *mgmt, size_t len,
305 struct ieee802_11_elems elems;
308 struct sta_info *sta = NULL;
312 ie = mgmt->u.probe_req.variable;
313 if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req))
315 ie_len = len - (IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req));
317 for (i = 0; hapd->probereq_cb && i < hapd->num_probereq_cb; i++)
318 if (hapd->probereq_cb[i].cb(hapd->probereq_cb[i].ctx,
319 mgmt->sa, mgmt->da, mgmt->bssid,
320 ie, ie_len, ssi_signal) > 0)
323 if (!hapd->iconf->send_probe_response)
326 if (ieee802_11_parse_elems(ie, ie_len, &elems, 0) == ParseFailed) {
327 wpa_printf(MSG_DEBUG, "Could not parse ProbeReq from " MACSTR,
332 if ((!elems.ssid || !elems.supp_rates)) {
333 wpa_printf(MSG_DEBUG, "STA " MACSTR " sent probe request "
334 "without SSID or supported rates element",
340 if (hapd->p2p && elems.wps_ie) {
342 wps = ieee802_11_vendor_ie_concat(ie, ie_len, WPS_DEV_OUI_WFA);
343 if (wps && !p2p_group_match_dev_type(hapd->p2p_group, wps)) {
344 wpa_printf(MSG_MSGDUMP, "P2P: Ignore Probe Request "
345 "due to mismatch with Requested Device "
353 if (hapd->p2p && elems.p2p) {
355 p2p = ieee802_11_vendor_ie_concat(ie, ie_len, P2P_IE_VENDOR_TYPE);
356 if (p2p && !p2p_group_match_dev_id(hapd->p2p_group, p2p)) {
357 wpa_printf(MSG_MSGDUMP, "P2P: Ignore Probe Request "
358 "due to mismatch with Device ID");
364 #endif /* CONFIG_P2P */
366 if (hapd->conf->ignore_broadcast_ssid && elems.ssid_len == 0) {
367 wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR " for "
368 "broadcast SSID ignored", MAC2STR(mgmt->sa));
372 sta = ap_get_sta(hapd, mgmt->sa);
375 if ((hapd->conf->p2p & P2P_GROUP_OWNER) &&
376 elems.ssid_len == P2P_WILDCARD_SSID_LEN &&
377 os_memcmp(elems.ssid, P2P_WILDCARD_SSID,
378 P2P_WILDCARD_SSID_LEN) == 0) {
379 /* Process P2P Wildcard SSID like Wildcard SSID */
382 #endif /* CONFIG_P2P */
384 if (elems.ssid_len == 0 ||
385 (elems.ssid_len == hapd->conf->ssid.ssid_len &&
386 os_memcmp(elems.ssid, hapd->conf->ssid.ssid, elems.ssid_len) ==
389 sta->ssid_probe = &hapd->conf->ssid;
391 if (!(mgmt->da[0] & 0x01)) {
393 ieee802_11_print_ssid(ssid_txt, elems.ssid,
395 wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
396 " for foreign SSID '%s' (DA " MACSTR ")",
397 MAC2STR(mgmt->sa), ssid_txt,
403 #ifdef CONFIG_INTERWORKING
404 if (elems.interworking && elems.interworking_len >= 1) {
405 u8 ant = elems.interworking[0] & 0x0f;
406 if (ant != INTERWORKING_ANT_WILDCARD &&
407 ant != hapd->conf->access_network_type) {
408 wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
409 " for mismatching ANT %u ignored",
410 MAC2STR(mgmt->sa), ant);
415 if (elems.interworking &&
416 (elems.interworking_len == 7 || elems.interworking_len == 9)) {
418 if (elems.interworking_len == 7)
419 hessid = elems.interworking + 1;
421 hessid = elems.interworking + 1 + 2;
422 if (!is_broadcast_ether_addr(hessid) &&
423 os_memcmp(hessid, hapd->conf->hessid, ETH_ALEN) != 0) {
424 wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
425 " for mismatching HESSID " MACSTR
427 MAC2STR(mgmt->sa), MAC2STR(hessid));
431 #endif /* CONFIG_INTERWORKING */
433 /* TODO: verify that supp_rates contains at least one matching rate
434 * with AP configuration */
436 resp = hostapd_gen_probe_resp(hapd, sta, mgmt, elems.p2p != NULL,
442 * If this is a broadcast probe request, apply no ack policy to avoid
445 noack = !!(elems.ssid_len == 0 && is_broadcast_ether_addr(mgmt->da));
447 if (hostapd_drv_send_mlme(hapd, resp, resp_len, noack) < 0)
448 perror("handle_probe_req: send");
452 wpa_printf(MSG_EXCESSIVE, "STA " MACSTR " sent probe request for %s "
453 "SSID", MAC2STR(mgmt->sa),
454 elems.ssid_len == 0 ? "broadcast" : "our");
458 static u8 * hostapd_probe_resp_offloads(struct hostapd_data *hapd,
461 /* check probe response offloading caps and print warnings */
462 if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD))
466 if (hapd->conf->wps_state && hapd->wps_probe_resp_ie &&
467 (!(hapd->iface->probe_resp_offloads &
468 (WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS |
469 WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2))))
470 wpa_printf(MSG_WARNING, "Device is trying to offload WPS "
471 "Probe Response while not supporting this");
472 #endif /* CONFIG_WPS */
475 if ((hapd->conf->p2p & P2P_ENABLED) && hapd->p2p_probe_resp_ie &&
476 !(hapd->iface->probe_resp_offloads &
477 WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P))
478 wpa_printf(MSG_WARNING, "Device is trying to offload P2P "
479 "Probe Response while not supporting this");
480 #endif /* CONFIG_P2P */
482 if (hapd->conf->interworking &&
483 !(hapd->iface->probe_resp_offloads &
484 WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING))
485 wpa_printf(MSG_WARNING, "Device is trying to offload "
486 "Interworking Probe Response while not supporting "
489 /* Generate a Probe Response template for the non-P2P case */
490 return hostapd_gen_probe_resp(hapd, NULL, NULL, 0, resp_len);
493 #endif /* NEED_AP_MLME */
496 void ieee802_11_set_beacon(struct hostapd_data *hapd)
498 struct ieee80211_mgmt *head = NULL;
500 size_t head_len = 0, tail_len = 0;
503 struct wpa_driver_ap_params params;
504 struct wpabuf *beacon, *proberesp, *assocresp;
508 #endif /* NEED_AP_MLME */
510 hapd->beacon_set_done = 1;
514 #define BEACON_HEAD_BUF_SIZE 256
515 #define BEACON_TAIL_BUF_SIZE 512
516 head = os_zalloc(BEACON_HEAD_BUF_SIZE);
517 tail_len = BEACON_TAIL_BUF_SIZE;
519 if (hapd->conf->wps_state && hapd->wps_beacon_ie)
520 tail_len += wpabuf_len(hapd->wps_beacon_ie);
521 #endif /* CONFIG_WPS */
523 if (hapd->p2p_beacon_ie)
524 tail_len += wpabuf_len(hapd->p2p_beacon_ie);
525 #endif /* CONFIG_P2P */
526 tailpos = tail = os_malloc(tail_len);
527 if (head == NULL || tail == NULL) {
528 wpa_printf(MSG_ERROR, "Failed to set beacon data");
534 head->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
535 WLAN_FC_STYPE_BEACON);
536 head->duration = host_to_le16(0);
537 os_memset(head->da, 0xff, ETH_ALEN);
539 os_memcpy(head->sa, hapd->own_addr, ETH_ALEN);
540 os_memcpy(head->bssid, hapd->own_addr, ETH_ALEN);
541 head->u.beacon.beacon_int =
542 host_to_le16(hapd->iconf->beacon_int);
544 /* hardware or low-level driver will setup seq_ctrl and timestamp */
545 capab_info = hostapd_own_capab_info(hapd, NULL, 0);
546 head->u.beacon.capab_info = host_to_le16(capab_info);
547 pos = &head->u.beacon.variable[0];
550 *pos++ = WLAN_EID_SSID;
551 if (hapd->conf->ignore_broadcast_ssid == 2) {
552 /* clear the data, but keep the correct length of the SSID */
553 *pos++ = hapd->conf->ssid.ssid_len;
554 os_memset(pos, 0, hapd->conf->ssid.ssid_len);
555 pos += hapd->conf->ssid.ssid_len;
556 } else if (hapd->conf->ignore_broadcast_ssid) {
557 *pos++ = 0; /* empty SSID */
559 *pos++ = hapd->conf->ssid.ssid_len;
560 os_memcpy(pos, hapd->conf->ssid.ssid,
561 hapd->conf->ssid.ssid_len);
562 pos += hapd->conf->ssid.ssid_len;
565 /* Supported rates */
566 pos = hostapd_eid_supp_rates(hapd, pos);
569 pos = hostapd_eid_ds_params(hapd, pos);
571 head_len = pos - (u8 *) head;
573 tailpos = hostapd_eid_country(hapd, tailpos,
574 tail + BEACON_TAIL_BUF_SIZE - tailpos);
576 /* ERP Information element */
577 tailpos = hostapd_eid_erp_info(hapd, tailpos);
579 /* Extended supported rates */
580 tailpos = hostapd_eid_ext_supp_rates(hapd, tailpos);
583 tailpos = hostapd_eid_wpa(hapd, tailpos, tail + BEACON_TAIL_BUF_SIZE -
586 #ifdef CONFIG_IEEE80211N
587 tailpos = hostapd_eid_ht_capabilities(hapd, tailpos);
588 tailpos = hostapd_eid_ht_operation(hapd, tailpos);
589 #endif /* CONFIG_IEEE80211N */
591 tailpos = hostapd_eid_ext_capab(hapd, tailpos);
594 * TODO: Time Advertisement element should only be included in some
595 * DTIM Beacon frames.
597 tailpos = hostapd_eid_time_adv(hapd, tailpos);
599 tailpos = hostapd_eid_interworking(hapd, tailpos);
600 tailpos = hostapd_eid_adv_proto(hapd, tailpos);
601 tailpos = hostapd_eid_roaming_consortium(hapd, tailpos);
603 #ifdef CONFIG_IEEE80211AC
604 tailpos = hostapd_eid_vht_capabilities(hapd, tailpos);
605 tailpos = hostapd_eid_vht_operation(hapd, tailpos);
606 #endif /* CONFIG_IEEE80211AC */
608 /* Wi-Fi Alliance WMM */
609 tailpos = hostapd_eid_wmm(hapd, tailpos);
612 if (hapd->conf->wps_state && hapd->wps_beacon_ie) {
613 os_memcpy(tailpos, wpabuf_head(hapd->wps_beacon_ie),
614 wpabuf_len(hapd->wps_beacon_ie));
615 tailpos += wpabuf_len(hapd->wps_beacon_ie);
617 #endif /* CONFIG_WPS */
620 if ((hapd->conf->p2p & P2P_ENABLED) && hapd->p2p_beacon_ie) {
621 os_memcpy(tailpos, wpabuf_head(hapd->p2p_beacon_ie),
622 wpabuf_len(hapd->p2p_beacon_ie));
623 tailpos += wpabuf_len(hapd->p2p_beacon_ie);
625 #endif /* CONFIG_P2P */
626 #ifdef CONFIG_P2P_MANAGER
627 if ((hapd->conf->p2p & (P2P_MANAGE | P2P_ENABLED | P2P_GROUP_OWNER)) ==
629 tailpos = hostapd_eid_p2p_manage(hapd, tailpos);
630 #endif /* CONFIG_P2P_MANAGER */
632 tail_len = tailpos > tail ? tailpos - tail : 0;
634 resp = hostapd_probe_resp_offloads(hapd, &resp_len);
635 #endif /* NEED_AP_MLME */
637 os_memset(¶ms, 0, sizeof(params));
638 params.head = (u8 *) head;
639 params.head_len = head_len;
641 params.tail_len = tail_len;
642 params.proberesp = resp;
643 params.proberesp_len = resp_len;
644 params.dtim_period = hapd->conf->dtim_period;
645 params.beacon_int = hapd->iconf->beacon_int;
646 params.basic_rates = hapd->iconf->basic_rates;
647 params.ssid = (u8 *) hapd->conf->ssid.ssid;
648 params.ssid_len = hapd->conf->ssid.ssid_len;
649 params.pairwise_ciphers = hapd->conf->rsn_pairwise ?
650 hapd->conf->rsn_pairwise : hapd->conf->wpa_pairwise;
651 params.group_cipher = hapd->conf->wpa_group;
652 params.key_mgmt_suites = hapd->conf->wpa_key_mgmt;
653 params.auth_algs = hapd->conf->auth_algs;
654 params.wpa_version = hapd->conf->wpa;
655 params.privacy = hapd->conf->ssid.wep.keys_set || hapd->conf->wpa ||
656 (hapd->conf->ieee802_1x &&
657 (hapd->conf->default_wep_key_len ||
658 hapd->conf->individual_wep_key_len));
659 switch (hapd->conf->ignore_broadcast_ssid) {
661 params.hide_ssid = NO_SSID_HIDING;
664 params.hide_ssid = HIDDEN_SSID_ZERO_LEN;
667 params.hide_ssid = HIDDEN_SSID_ZERO_CONTENTS;
670 hostapd_build_ap_extra_ies(hapd, &beacon, &proberesp, &assocresp);
671 params.beacon_ies = beacon;
672 params.proberesp_ies = proberesp;
673 params.assocresp_ies = assocresp;
674 params.isolate = hapd->conf->isolate;
676 params.cts_protect = !!(ieee802_11_erp_info(hapd) &
677 ERP_INFO_USE_PROTECTION);
678 params.preamble = hapd->iface->num_sta_no_short_preamble == 0 &&
679 hapd->iconf->preamble == SHORT_PREAMBLE;
680 if (hapd->iface->current_mode &&
681 hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)
682 params.short_slot_time =
683 hapd->iface->num_sta_no_short_slot_time > 0 ? 0 : 1;
685 params.short_slot_time = -1;
686 if (!hapd->iconf->ieee80211n || hapd->conf->disable_11n)
687 params.ht_opmode = -1;
689 params.ht_opmode = hapd->iface->ht_op_mode;
690 #endif /* NEED_AP_MLME */
691 params.interworking = hapd->conf->interworking;
692 if (hapd->conf->interworking &&
693 !is_zero_ether_addr(hapd->conf->hessid))
694 params.hessid = hapd->conf->hessid;
695 params.access_network_type = hapd->conf->access_network_type;
696 params.ap_max_inactivity = hapd->conf->ap_max_inactivity;
697 if (hostapd_drv_set_ap(hapd, ¶ms))
698 wpa_printf(MSG_ERROR, "Failed to set beacon parameters");
699 hostapd_free_ap_extra_ies(hapd, beacon, proberesp, assocresp);
707 void ieee802_11_set_beacons(struct hostapd_iface *iface)
710 for (i = 0; i < iface->num_bss; i++)
711 ieee802_11_set_beacon(iface->bss[i]);
715 /* only update beacons if started */
716 void ieee802_11_update_beacons(struct hostapd_iface *iface)
719 for (i = 0; i < iface->num_bss; i++)
720 if (iface->bss[i]->beacon_set_done)
721 ieee802_11_set_beacon(iface->bss[i]);
724 #endif /* CONFIG_NATIVE_WINDOWS */