Add an option to remove WMM-AC
For a memory constrained system, it may be more important to reduce binary size than include support for these capabilities. By default this is enabled. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
parent
32b5f7f501
commit
20c82a2708
8 changed files with 46 additions and 2 deletions
|
@ -100,7 +100,6 @@ OBJS += src/utils/wpabuf.c
|
|||
OBJS += src/utils/bitfield.c
|
||||
OBJS += src/utils/ip_addr.c
|
||||
OBJS += src/utils/crc32.c
|
||||
OBJS += wmm_ac.c
|
||||
OBJS += twt.c
|
||||
OBJS_p = wpa_passphrase.c
|
||||
OBJS_p += src/utils/common.c
|
||||
|
@ -430,6 +429,12 @@ endif
|
|||
OBJS += op_classes.c
|
||||
endif
|
||||
|
||||
ifdef CONFIG_NO_WMM_AC
|
||||
L_CFLAGS += -DCONFIG_NO_WMM_AC
|
||||
else
|
||||
OBJS += wmm_ac.c
|
||||
endif
|
||||
|
||||
ifdef CONFIG_NO_ROBUST_AV
|
||||
L_CFLAGS += -DCONFIG_NO_ROBUST_AV
|
||||
else
|
||||
|
|
|
@ -120,7 +120,6 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
|
|||
OBJS_c += ../src/utils/wpa_debug.o
|
||||
OBJS_c += ../src/utils/common.o
|
||||
OBJS_c += ../src/common/cli.o
|
||||
OBJS += wmm_ac.o
|
||||
|
||||
ifndef CONFIG_OS
|
||||
ifdef CONFIG_NATIVE_WINDOWS
|
||||
|
@ -480,6 +479,12 @@ endif
|
|||
OBJS += op_classes.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_NO_WMM_AC
|
||||
CFLAGS += -DCONFIG_NO_WMM_AC
|
||||
else
|
||||
OBJS += wmm_ac.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_NO_ROBUST_AV
|
||||
CFLAGS += -DCONFIG_NO_ROBUST_AV
|
||||
else
|
||||
|
|
|
@ -551,4 +551,7 @@ CONFIG_WEP=y
|
|||
# applications; IEEE Std 802.11-2020, 4.3.24; SCS, MSCS, QoS Management
|
||||
#CONFIG_NO_ROBUST_AV=y
|
||||
|
||||
# Disable support for WMM admission control
|
||||
#CONFIG_NO_WMM_AC=y
|
||||
|
||||
include $(wildcard $(LOCAL_PATH)/android_config_*.inc)
|
||||
|
|
|
@ -1264,6 +1264,8 @@ static int wpa_supplicant_ctrl_iface_tdls_link_status(
|
|||
#endif /* CONFIG_TDLS */
|
||||
|
||||
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
|
||||
static int wmm_ac_ctrl_addts(struct wpa_supplicant *wpa_s, char *cmd)
|
||||
{
|
||||
char *token, *context = NULL;
|
||||
|
@ -1313,6 +1315,8 @@ static int wmm_ac_ctrl_delts(struct wpa_supplicant *wpa_s, char *cmd)
|
|||
return wpas_wmm_ac_delts(wpa_s, tsid);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
|
||||
|
||||
#ifdef CONFIG_IEEE80211R
|
||||
static int wpa_supplicant_ctrl_iface_ft_ds(
|
||||
|
@ -12746,6 +12750,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
|||
reply_len = wpa_supplicant_ctrl_iface_tdls_link_status(
|
||||
wpa_s, buf + 17, reply, reply_size);
|
||||
#endif /* CONFIG_TDLS */
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
} else if (os_strcmp(buf, "WMM_AC_STATUS") == 0) {
|
||||
reply_len = wpas_wmm_ac_status(wpa_s, reply, reply_size);
|
||||
} else if (os_strncmp(buf, "WMM_AC_ADDTS ", 13) == 0) {
|
||||
|
@ -12754,6 +12759,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
|||
} else if (os_strncmp(buf, "WMM_AC_DELTS ", 13) == 0) {
|
||||
if (wmm_ac_ctrl_delts(wpa_s, buf + 13))
|
||||
reply_len = -1;
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
} else if (os_strncmp(buf, "SIGNAL_POLL", 11) == 0) {
|
||||
reply_len = wpa_supplicant_signal_poll(wpa_s, reply,
|
||||
reply_size);
|
||||
|
|
|
@ -680,3 +680,6 @@ CONFIG_DPP2=y
|
|||
# Disable support for Robust AV streaming for consumer and enterprise Wi-Fi
|
||||
# applications; IEEE Std 802.11-2020, 4.3.24; SCS, MSCS, QoS Management
|
||||
#CONFIG_NO_ROBUST_AV=y
|
||||
|
||||
# Disable support for WMM admission control
|
||||
#CONFIG_NO_WMM_AC=y
|
||||
|
|
|
@ -4347,6 +4347,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
|
|||
|
||||
wpas_wps_notify_assoc(wpa_s, bssid);
|
||||
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
if (data) {
|
||||
wmm_ac_notify_assoc(wpa_s, data->assoc_info.resp_ies,
|
||||
data->assoc_info.resp_ies_len,
|
||||
|
@ -4355,6 +4356,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
|
|||
if (wpa_s->reassoc_same_bss)
|
||||
wmm_ac_restore_tspecs(wpa_s);
|
||||
}
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
|
||||
#if defined(CONFIG_FILS) || defined(CONFIG_MBO)
|
||||
bss = wpa_bss_get_bssid(wpa_s, bssid);
|
||||
|
@ -5227,10 +5229,12 @@ static void wpas_event_rx_mgmt_action(struct wpa_supplicant *wpa_s,
|
|||
" Category=%u DataLen=%d freq=%d MHz",
|
||||
MAC2STR(mgmt->sa), category, (int) plen, freq);
|
||||
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
if (category == WLAN_ACTION_WMM) {
|
||||
wmm_ac_rx_action(wpa_s, mgmt->da, mgmt->sa, payload, plen);
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
|
||||
#ifdef CONFIG_IEEE80211R
|
||||
if (category == WLAN_ACTION_FT) {
|
||||
|
|
|
@ -2847,6 +2847,8 @@ static int wpa_cli_cmd_tdls_link_status(struct wpa_ctrl *ctrl, int argc,
|
|||
}
|
||||
|
||||
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
|
||||
static int wpa_cli_cmd_wmm_ac_addts(struct wpa_ctrl *ctrl, int argc,
|
||||
char *argv[])
|
||||
{
|
||||
|
@ -2867,6 +2869,8 @@ static int wpa_cli_cmd_wmm_ac_status(struct wpa_ctrl *ctrl, int argc,
|
|||
return wpa_ctrl_command(ctrl, "WMM_AC_STATUS");
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
|
||||
|
||||
static int wpa_cli_cmd_tdls_chan_switch(struct wpa_ctrl *ctrl, int argc,
|
||||
char *argv[])
|
||||
|
@ -3889,6 +3893,7 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
|
|||
{ "tdls_link_status", wpa_cli_cmd_tdls_link_status, NULL,
|
||||
cli_cmd_flag_none,
|
||||
"<addr> = TDLS link status with <addr>" },
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
{ "wmm_ac_addts", wpa_cli_cmd_wmm_ac_addts, NULL,
|
||||
cli_cmd_flag_none,
|
||||
"<uplink/downlink/bidi> <tsid=0..7> <up=0..7> [nominal_msdu_size=#] "
|
||||
|
@ -3900,6 +3905,7 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
|
|||
{ "wmm_ac_status", wpa_cli_cmd_wmm_ac_status, NULL,
|
||||
cli_cmd_flag_none,
|
||||
"= show status for Wireless Multi-Media Admission-Control" },
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
{ "tdls_chan_switch", wpa_cli_cmd_tdls_chan_switch, NULL,
|
||||
cli_cmd_flag_none,
|
||||
"<addr> <oper class> <freq> [sec_channel_offset=] [center_freq1=] "
|
||||
|
|
|
@ -582,7 +582,9 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
|
|||
wpa_tdls_deinit(wpa_s->wpa);
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
wmm_ac_clear_saved_tspecs(wpa_s);
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
pmksa_candidate_free(wpa_s->wpa);
|
||||
ptksa_cache_deinit(wpa_s->ptksa);
|
||||
wpa_s->ptksa = NULL;
|
||||
|
@ -699,7 +701,9 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
|
|||
wpa_s->vendor_elem[i] = NULL;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
wmm_ac_notify_disassoc(wpa_s);
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
|
||||
wpa_s->sched_scan_plans_num = 0;
|
||||
os_free(wpa_s->sched_scan_plans);
|
||||
|
@ -1067,8 +1071,10 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
|
|||
if (state == WPA_DISCONNECTED || state == WPA_INACTIVE)
|
||||
wpa_supplicant_start_autoscan(wpa_s);
|
||||
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
if (old_state >= WPA_ASSOCIATED && wpa_s->wpa_state < WPA_ASSOCIATED)
|
||||
wmm_ac_notify_disassoc(wpa_s);
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
|
||||
if (wpa_s->wpa_state != old_state) {
|
||||
wpas_notify_state_changed(wpa_s, wpa_s->wpa_state, old_state);
|
||||
|
@ -2486,7 +2492,9 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
|||
|
||||
wpa_s->eapol_failed = 0;
|
||||
wpa_s->multi_ap_ie = 0;
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
wmm_ac_clear_saved_tspecs(wpa_s);
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
wpa_s->reassoc_same_bss = 0;
|
||||
wpa_s->reassoc_same_ess = 0;
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
|
@ -2497,7 +2505,9 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
|||
wpa_dbg(wpa_s, MSG_DEBUG, "Re-association to the same ESS");
|
||||
wpa_s->reassoc_same_ess = 1;
|
||||
if (wpa_s->current_bss && wpa_s->current_bss == bss) {
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
wmm_ac_save_tspecs(wpa_s);
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
wpa_s->reassoc_same_bss = 1;
|
||||
} else if (wpa_s->current_bss && wpa_s->current_bss != bss) {
|
||||
os_get_reltime(&wpa_s->roam_start);
|
||||
|
@ -7217,7 +7227,9 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
|
|||
wpa_s->extended_capa_len = capa.extended_capa_len;
|
||||
wpa_s->num_multichan_concurrent =
|
||||
capa.num_multichan_concurrent;
|
||||
#ifndef CONFIG_NO_WMM_AC
|
||||
wpa_s->wmm_ac_supported = capa.wmm_ac_supported;
|
||||
#endif /* CONFIG_NO_WMM_AC */
|
||||
wpa_s->max_num_akms = capa.max_num_akms;
|
||||
|
||||
if (capa.mac_addr_rand_scan_supported)
|
||||
|
|
Loading…
Reference in a new issue