]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Move DTIM period configuration into Beacon set operation
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 12 Mar 2009 19:57:08 +0000 (21:57 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 12 Mar 2009 19:57:08 +0000 (21:57 +0200)
This is needed to make mac80211 work with multi-BSS configuration. The
previous design ended up setting DTIM period for secondary BSSes before
setting the Beacon and driver_nl80211.c was not really prepared for
that. Eventually, the Beacon configuration routines should be combined
into a single driver operation, but for now, just moving this call is
the simplest workaround.

hostapd/beacon.c
hostapd/hostapd.c

index b7eb86a6b292528dc42cda874f4640ff602be9d2..8ccfa1248d4db87d7e66ded475c321cb2b083726 100644 (file)
@@ -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");
index 308d816460e78d34d6918581d548e8e35dededc0..8531d0a4a16744fbd47b0ce52fda794d869468c0 100644 (file)
@@ -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,