From 64bf1530038769aa45f667faeeadcfa3e6533e57 Mon Sep 17 00:00:00 2001 From: Gururaj Pandurangi Date: Thu, 1 Oct 2020 00:47:54 -0700 Subject: [PATCH] qcacld-3.0: Add action OUI to disable TWT for some APs Add a new action OUI to disable TWT for certain APs. The cfg item will be present in the host and sent to the FW to disable TWT. Change-Id: I122c44993a9102838dec7e9eb2817ba404a76515 CRs-Fixed: 2793124 --- .../inc/wlan_action_oui_public_struct.h | 2 + core/hdd/inc/hdd_config.h | 38 +++++++++++++++++++ core/hdd/src/wlan_hdd_main.c | 3 ++ 3 files changed, 43 insertions(+) diff --git a/components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h b/components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h index 586b45f4c9..b73ddc90d3 100644 --- a/components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h +++ b/components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h @@ -90,6 +90,7 @@ * @ACTION_OUI_DISABLE_AGGRESSIVE_TX: disable aggressive TX in firmware * @ACTION_OUI_FORCE_MAX_NSS: Force Max NSS connection with few IOT APs * @ACTION_OUI_DISABLE_AGGRESSIVE_EDCA: disable aggressive EDCA with the ap + * @ACTION_OUI_DISABLE_TWT: disable TWT with the ap * @ACTION_OUI_HOST_ONLY: host only action id start - placeholder. * New Firmware related "ACTION" needs to be added before this placeholder. * @ACTION_OUI_HOST_RECONN: reconnect to the same BSSID when wait for @@ -106,6 +107,7 @@ enum action_oui_id { ACTION_OUI_DISABLE_AGGRESSIVE_TX = 6, ACTION_OUI_FORCE_MAX_NSS = 7, ACTION_OUI_DISABLE_AGGRESSIVE_EDCA = 8, + ACTION_OUI_DISABLE_TWT = 9, ACTION_OUI_HOST_ONLY, ACTION_OUI_HOST_RECONN = ACTION_OUI_HOST_ONLY, ACTION_OUI_MAXIMUM_ID diff --git a/core/hdd/inc/hdd_config.h b/core/hdd/inc/hdd_config.h index 48ccf7d3c0..e8974e48fb 100644 --- a/core/hdd/inc/hdd_config.h +++ b/core/hdd/inc/hdd_config.h @@ -1309,6 +1309,43 @@ struct dhcp_server { "00E04C 00 01", \ "Used to specify action OUIs to reconnect when assoc timeout") +/* + * + * gActionOUIDisableTWT - Used to specify action OUIs to control TWT param + * while joining the candidate AP + * + * This ini is used to specify AP OUIs. Some APs advertise TWT but do not + * follow through when the STA reaches out to them. Thus, TWT will be + * disabled when we receive OUIs of those APs. + * Note: User should strictly add new action OUIs at the end of this + * default value. + * + * Default OUIs: (All values in Hex) + * OUI 1: 001018 + * OUI data Len: 00 + * Info Mask : 01 - only OUI present in Info mask + * + * OUI 2: 000986 + * OUI data Len: 00 + * Info Mask : 01 - only OUI present in Info mask + * + * Refer to gEnableActionOUI for more detail about the format. + * + * Related: gEnableActionOUI + * + * Supported Feature: Action OUIs + * + * Usage: External + * + * + */ +#define CFG_ACTION_OUI_DISABLE_TWT CFG_INI_STRING( \ + "gActionOUIDisableTWT", \ + 0, \ + ACTION_OUI_MAX_STR_LEN, \ + "001018 00 01 000986 00 01", \ + "Used to specify action OUIs to control TWT configuration") + /* End of action oui inis */ #ifdef ENABLE_MTRACE_LOG @@ -1747,6 +1784,7 @@ enum host_log_level { CFG(CFG_ACTION_OUI_DISABLE_AGGRESSIVE_EDCA) \ CFG(CFG_ACTION_OUI_SWITCH_TO_11N_MODE) \ CFG(CFG_ACTION_OUI_RECONN_ASSOCTIMEOUT) \ + CFG(CFG_ACTION_OUI_DISABLE_TWT) \ CFG(CFG_ADVERTISE_CONCURRENT_OPERATION) \ CFG(CFG_BUG_ON_REINIT_FAILURE) \ CFG(CFG_DBS_SCAN_SELECTION) \ diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 67ee245941..81bd62c341 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12166,6 +12166,9 @@ static void hdd_cfg_params_init(struct hdd_context *hdd_ctx) cfg_get(psoc, CFG_ACTION_OUI_DISABLE_AGGRESSIVE_EDCA), ACTION_OUI_MAX_STR_LEN); + qdf_str_lcopy(config->action_oui_str[ACTION_OUI_DISABLE_TWT], + cfg_get(psoc, CFG_ACTION_OUI_DISABLE_TWT), + ACTION_OUI_MAX_STR_LEN); qdf_str_lcopy(config->action_oui_str[ACTION_OUI_HOST_RECONN], cfg_get(psoc, CFG_ACTION_OUI_RECONN_ASSOCTIMEOUT), ACTION_OUI_MAX_STR_LEN);