Add an experiment to shorten the bandsteering delay.
If WifiShortBandsteeringDelay is active, bandsteering will reject
candidate STAs for only 1 second, rather than 10. This is an
imperfect but very simple-to-implement approximation of what we really
want, which is to reject candidates only once. If the results are
promising, a follow-up may implement this properly.
Change-Id: I09b1d9e6fa91cafa3235187debf4fdfeec5d23d6
diff --git a/src/ap/steering.c b/src/ap/steering.c
index f26c90e..e58f5ec 100644
--- a/src/ap/steering.c
+++ b/src/ap/steering.c
@@ -13,6 +13,7 @@
#include <dirent.h>
#include "common.h"
#include "common/defs.h"
+#include "common/hw_features_common.h"
#include "common/ieee802_11_defs.h"
#include "hostapd.h"
#include "steering.h"
@@ -93,6 +94,7 @@
const struct hostapd_data *hapd,
logged_request_type type) {
struct os_reltime now, prev_logged_timestamp, new_timestamp;
+ int bandsteering_delay_seconds;
if (!request_logging_path) {
return 0;
}
@@ -107,7 +109,11 @@
if (!read_timestamp_file(mac, type, LOGGING_PATH, &prev_logged_timestamp) ||
os_reltime_expired(&now, &prev_logged_timestamp,
BANDSTEERING_EXPIRATION_SECONDS)) {
- new_timestamp.sec = now.sec + BANDSTEERING_DELAY_SECONDS;
+ bandsteering_delay_seconds = BANDSTEERING_DELAY_SECONDS;
+ if (experiment("WifiShortBandsteeringDelay")) {
+ bandsteering_delay_seconds = 1;
+ }
+ new_timestamp.sec = now.sec + bandsteering_delay_seconds;
new_timestamp.usec = now.usec;
if (!write_timestamp_file(mac, hapd, type, &new_timestamp)) {
wpa_printf(MSG_ERROR, "Failed to write timestamp file.");