diff --git a/hostapd/beacon.c b/hostapd/beacon.c index b7eb86a6b..8ccfa1248 100644 --- a/hostapd/beacon.c +++ b/hostapd/beacon.c @@ -434,6 +434,10 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd) os_free(tail); os_free(head); + if (hostapd_set_dtim_period(hapd, hapd->conf->dtim_period)) + wpa_printf(MSG_ERROR, "Could not set DTIM period for kernel " + "driver"); + if (hostapd_set_cts_protect(hapd, cts_protection)) wpa_printf(MSG_ERROR, "Failed to set CTS protect in kernel " "driver"); diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c index 308d81646..8531d0a4a 100644 --- a/hostapd/hostapd.c +++ b/hostapd/hostapd.c @@ -1292,12 +1292,6 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first) return -1; } - if (hostapd_set_dtim_period(hapd, hapd->conf->dtim_period)) { - wpa_printf(MSG_ERROR, "Could not set DTIM period for kernel " - "driver"); - return -1; - } - /* Set SSID for the kernel driver (to be used in beacon and probe * response frames) */ if (set_ssid && hostapd_set_ssid(hapd, (u8 *) conf->ssid.ssid,