]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Include BSS table unconditionally in the wpa_supplicant build
authorJouni Malinen <j@w1.fi>
Sun, 27 Dec 2009 23:14:56 +0000 (01:14 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 27 Dec 2009 23:14:56 +0000 (01:14 +0200)
This will allow more cleanup to be done for scan results processing
since all code can now be made to depend on the BSS table instead of
the temporary scan results.

Once remaining code has been converted to use the BSS table, the new
scan results can be freed immediately after the BSS table has been
updated. In addition, filtering of BSS information should be added
to better support systems with limited resources. For now, memory
use can be limited by defining WPA_BSS_MAX_COUNT to be smaller.
Anyway, better filtering of results to only the configured networks
should be added to improve this.

wpa_supplicant/Makefile
wpa_supplicant/defconfig
wpa_supplicant/wpa_supplicant.c

index c0e8b71d17c1b9f85bbc3501802cb0beb22650a1..f02d3b27da72f5ba7502385b97e6c25fa1be56dc 100644 (file)
@@ -40,6 +40,7 @@ install: all
 
 OBJS = config.o
 OBJS += notify.o
+OBJS += bss.o
 OBJS += eap_register.o
 OBJS += ../src/utils/common.o
 OBJS += ../src/utils/wpa_debug.o
@@ -1162,11 +1163,6 @@ OBJS += $(SHA1OBJS) $(DESOBJS)
 
 OBJS_p += $(SHA1OBJS)
 
-ifdef CONFIG_BSS_TABLE
-CFLAGS += -DCONFIG_BSS_TABLE
-OBJS += bss.o
-endif
-
 ifdef CONFIG_BGSCAN_SIMPLE
 CFLAGS += -DCONFIG_BGSCAN_SIMPLE
 OBJS += bgscan_simple.o
index 91c3cad1154fa5db5d1c7ef15cebb561f0533688..de71c58ce83a0ab9e41f2100403cb1eca31b9662 100644 (file)
@@ -344,8 +344,6 @@ CONFIG_PEERKEY=y
 
 # Add support for new DBus control interface
 # (fi.w1.hostap.wpa_supplicant1)
-# Note: You will also need to enable CONFIG_BSS_TABLE if you want to have full
-# support for the documented D-Bus signals.
 #CONFIG_CTRL_IFACE_DBUS_NEW=y
 
 # Add introspection support for new DBus control interface (requires libxml2)
@@ -394,6 +392,3 @@ CONFIG_PEERKEY=y
 # This enables use of libbfd to get more detailed symbols for the backtraces
 # generated by CONFIG_WPA_TRACE=y.
 #CONFIG_WPA_TRACE_BFD=y
-
-# Maintain a local BSS table to track neighboring BSSes.
-CONFIG_BSS_TABLE=y
index 7d18b6396c0f1bdfcb26dab68f57b2e7a41e46bd..73995fce523438e4d6193e4b7ca58d3840cbd223 100644 (file)
@@ -399,9 +399,7 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
 
        wpa_scan_results_free(wpa_s->scan_res);
        wpa_s->scan_res = NULL;
-#ifdef CONFIG_BSS_TABLE
        wpa_bss_deinit(wpa_s);
-#endif /* CONFIG_BSS_TABLE */
 
        wpa_supplicant_cancel_scan(wpa_s);
        wpa_supplicant_cancel_auth_timeout(wpa_s);
@@ -1573,6 +1571,8 @@ int wpa_supplicant_set_debug_params(struct wpa_global *global, int debug_level,
  */
 int wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s)
 {
+       size_t i;
+
        wpa_scan_results_free(wpa_s->scan_res);
        if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
                wpa_s->scan_res = ieee80211_sta_get_scan_results(wpa_s);
@@ -1585,16 +1585,10 @@ int wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s)
 
        wpa_scan_sort_results(wpa_s->scan_res);
 
-#ifdef CONFIG_BSS_TABLE
-       {
-               size_t i;
-               wpa_bss_update_start(wpa_s);
-               for (i = 0; i < wpa_s->scan_res->num; i++)
-                       wpa_bss_update_scan_res(wpa_s,
-                                               wpa_s->scan_res->res[i]);
-               wpa_bss_update_end(wpa_s);
-       }
-#endif /* CONFIG_BSS_TABLE */
+       wpa_bss_update_start(wpa_s);
+       for (i = 0; i < wpa_s->scan_res->num; i++)
+               wpa_bss_update_scan_res(wpa_s, wpa_s->scan_res->res[i]);
+       wpa_bss_update_end(wpa_s);
 
        return 0;
 }
@@ -2099,10 +2093,8 @@ next_driver:
        }
 #endif /* CONFIG_IBSS_RSN */
 
-#ifdef CONFIG_BSS_TABLE
        if (wpa_bss_init(wpa_s) < 0)
                return -1;
-#endif /* CONFIG_BSS_TABLE */
 
        return 0;
 }