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.
This commit is contained in:
Jouni Malinen 2010-03-05 20:20:09 +02:00
parent ac26ebd8b5
commit c9c38b0996
6 changed files with 28 additions and 6 deletions

View file

@ -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));