Testing functionality for airtime policy
Add a new testing parameter to allow airtime policy implementation to be tested for more coverage even without kernel driver support. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
fb9cd650e5
commit
c0c74f0c6b
3 changed files with 8 additions and 0 deletions
|
@ -1469,6 +1469,8 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
|
||||||
hapd->ext_mgmt_frame_handling = atoi(value);
|
hapd->ext_mgmt_frame_handling = atoi(value);
|
||||||
} else if (os_strcasecmp(cmd, "ext_eapol_frame_io") == 0) {
|
} else if (os_strcasecmp(cmd, "ext_eapol_frame_io") == 0) {
|
||||||
hapd->ext_eapol_frame_io = atoi(value);
|
hapd->ext_eapol_frame_io = atoi(value);
|
||||||
|
} else if (os_strcasecmp(cmd, "force_backlog_bytes") == 0) {
|
||||||
|
hapd->force_backlog_bytes = atoi(value);
|
||||||
#ifdef CONFIG_DPP
|
#ifdef CONFIG_DPP
|
||||||
} else if (os_strcasecmp(cmd, "dpp_config_obj_override") == 0) {
|
} else if (os_strcasecmp(cmd, "dpp_config_obj_override") == 0) {
|
||||||
os_free(hapd->dpp_config_obj_override);
|
os_free(hapd->dpp_config_obj_override);
|
||||||
|
|
|
@ -79,6 +79,10 @@ static void count_backlogged_sta(struct hostapd_data *hapd)
|
||||||
for (sta = hapd->sta_list; sta; sta = sta->next) {
|
for (sta = hapd->sta_list; sta; sta = sta->next) {
|
||||||
if (hostapd_drv_read_sta_data(hapd, &data, sta->addr))
|
if (hostapd_drv_read_sta_data(hapd, &data, sta->addr))
|
||||||
continue;
|
continue;
|
||||||
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
|
if (hapd->force_backlog_bytes)
|
||||||
|
data.backlog_bytes = 1;
|
||||||
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
|
||||||
if (data.backlog_bytes > 0)
|
if (data.backlog_bytes > 0)
|
||||||
set_new_backlog_time(hapd, sta, &now);
|
set_new_backlog_time(hapd, sta, &now);
|
||||||
|
|
|
@ -354,6 +354,8 @@ struct hostapd_data {
|
||||||
int last_bigtk_key_idx;
|
int last_bigtk_key_idx;
|
||||||
u8 last_bigtk[WPA_BIGTK_MAX_LEN];
|
u8 last_bigtk[WPA_BIGTK_MAX_LEN];
|
||||||
size_t last_bigtk_len;
|
size_t last_bigtk_len;
|
||||||
|
|
||||||
|
bool force_backlog_bytes;
|
||||||
#endif /* CONFIG_TESTING_OPTIONS */
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
|
||||||
#ifdef CONFIG_MBO
|
#ifdef CONFIG_MBO
|
||||||
|
|
Loading…
Reference in a new issue