]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/ap/hostapd.c
AP: Add support for BSS load element (STA Count, Channel Utilization)
[thirdparty/hostap.git] / src / ap / hostapd.c
index 764722f96f6f8b999fb6756b6e6a469c676045f6..be7dfd8cc881086e6fbb03003c0c366f1cc54e9f 100644 (file)
@@ -35,6 +35,7 @@
 #include "gas_serv.h"
 #include "dfs.h"
 #include "ieee802_11.h"
+#include "bss_load.h"
 
 
 static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason);
@@ -310,6 +311,8 @@ static void hostapd_free_hapd_data(struct hostapd_data *hapd)
        gas_serv_deinit(hapd);
 #endif /* CONFIG_INTERWORKING */
 
+       bss_load_update_deinit(hapd);
+
 #ifdef CONFIG_SQLITE
        bin_clear_free(hapd->tmp_eap_user.identity,
                       hapd->tmp_eap_user.identity_len);
@@ -875,6 +878,11 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
        }
 #endif /* CONFIG_INTERWORKING */
 
+       if (conf->bss_load_update_period && bss_load_update_init(hapd)) {
+               wpa_printf(MSG_ERROR, "BSS Load initialization failed");
+               return -1;
+       }
+
        if (!hostapd_drv_none(hapd) && vlan_init(hapd)) {
                wpa_printf(MSG_ERROR, "VLAN initialization failed.");
                return -1;