diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 136856c43..3fd49f285 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -518,6 +518,8 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd) params.tail_len = tail_len; params.dtim_period = hapd->conf->dtim_period; params.beacon_int = hapd->iconf->beacon_int; + params.ssid = (u8 *) hapd->conf->ssid.ssid; + params.ssid_len = hapd->conf->ssid.ssid_len; if (hostapd_drv_set_ap(hapd, ¶ms)) wpa_printf(MSG_ERROR, "Failed to set beacon parameters"); diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 36e6ca905..e2d0f8bdf 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -530,6 +530,16 @@ struct wpa_driver_ap_params { * beacon_int - Beacon interval */ int beacon_int; + + /** + * ssid - The SSID to use in Beacon/Probe Response frames + */ + const u8 *ssid; + + /** + * ssid_len - Length of the SSID (1..32) + */ + size_t ssid_len; }; /** diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 9726cbf18..1cb21965a 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -3847,6 +3847,8 @@ static int wpa_driver_nl80211_set_ap(void *priv, NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex); NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL, params->beacon_int); NLA_PUT_U32(msg, NL80211_ATTR_DTIM_PERIOD, params->dtim_period); + NLA_PUT(msg, NL80211_ATTR_SSID, params->ssid_len, + params->ssid); ret = send_and_recv_msgs(drv, msg, NULL, NULL); if (ret) {