aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/bss.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-05 18:20:09 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-05 18:20:09 (GMT)
commitc9c38b099689616111416af9df3a4882535edff3 (patch)
tree75e5e38964543805a720bd45f20be1cede486e35 /wpa_supplicant/bss.c
parentac26ebd8b5de0aea409bd896235325a64ff27e1f (diff)
downloadhostap-c9c38b099689616111416af9df3a4882535edff3.zip
hostap-c9c38b099689616111416af9df3a4882535edff3.tar.gz
hostap-c9c38b099689616111416af9df3a4882535edff3.tar.bz2
Make maximum BSS table size configurable
New global configuration parameter bss_max_count can now be used to change the maximum BSS table size. The old fixed size limit (200) is used as the default value for this parameter.
Diffstat (limited to 'wpa_supplicant/bss.c')
-rw-r--r--wpa_supplicant/bss.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index d5bb040..e2ac230 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -19,15 +19,12 @@
#include "common/ieee802_11_defs.h"
#include "drivers/driver.h"
#include "wpa_supplicant_i.h"
+#include "config.h"
#include "notify.h"
#include "scan.h"
#include "bss.h"
-#ifndef WPA_BSS_MAX_COUNT
-#define WPA_BSS_MAX_COUNT 200
-#endif /* WPA_BSS_MAX_COUNT */
-
/**
* WPA_BSS_EXPIRATION_PERIOD - Period of expiration run in seconds
*/
@@ -139,7 +136,7 @@ static void wpa_bss_add(struct wpa_supplicant *wpa_s,
wpa_printf(MSG_DEBUG, "BSS: Add new id %u BSSID " MACSTR " SSID '%s'",
bss->id, MAC2STR(bss->bssid), wpa_ssid_txt(ssid, ssid_len));
wpas_notify_bss_added(wpa_s, bss->bssid, bss->id);
- if (wpa_s->num_bss > WPA_BSS_MAX_COUNT) {
+ if (wpa_s->num_bss > wpa_s->conf->bss_max_count) {
/* Remove the oldest entry */
wpa_bss_remove(wpa_s, dl_list_first(&wpa_s->bss,
struct wpa_bss, list));