diff --git a/fw_offload/core/inc/wlan_fw_offload_main.h b/fw_offload/core/inc/wlan_fw_offload_main.h index 1047966cf2..2d97d5cca4 100644 --- a/fw_offload/core/inc/wlan_fw_offload_main.h +++ b/fw_offload/core/inc/wlan_fw_offload_main.h @@ -62,6 +62,8 @@ * @btc_mpta_helper_enable: Enable/Disable tri-radio MPTA helper * @bt_sco_allow_wlan_2g_scan: Enable/Disble wlan 2g scan when * BT SCO connection is on + * @btc_three_way_coex_config_legacy_enable: Enable/Disable tri-radio coex + * config legacy feature */ struct wlan_fwol_coex_config { uint8_t btc_mode; @@ -79,6 +81,9 @@ struct wlan_fwol_coex_config { bool btc_mpta_helper_enable; #endif bool bt_sco_allow_wlan_2g_scan; +#ifdef FEATURE_COEX_CONFIG + bool btc_three_way_coex_config_legacy_enable; +#endif }; #define FWOL_THERMAL_LEVEL_MAX 4 diff --git a/fw_offload/core/src/wlan_fw_offload_main.c b/fw_offload/core/src/wlan_fw_offload_main.c index b4da9d31f4..51a3432e05 100644 --- a/fw_offload/core/src/wlan_fw_offload_main.c +++ b/fw_offload/core/src/wlan_fw_offload_main.c @@ -52,6 +52,32 @@ fwol_mpta_helper_config_get(struct wlan_objmgr_psoc *psoc, } #endif +/** + * fwol_three_way_coex_config_legacy_config_get: Populate + * btc_three_way_coex_config_legacy_enable from cfg + * @psoc: The global psoc handler + * @coex_config: The cfg structure + * + * Return: none + */ +#ifdef FEATURE_COEX_CONFIG +static void +fwol_three_way_coex_config_legacy_config_get( + struct wlan_objmgr_psoc *psoc, + struct wlan_fwol_coex_config *coex_config) +{ + coex_config->btc_three_way_coex_config_legacy_enable = + cfg_get(psoc, CFG_THREE_WAY_COEX_CONFIG_LEGACY); +} +#else +static void +fwol_three_way_coex_config_legacy_config_get( + struct wlan_objmgr_psoc *psoc, + struct wlan_fwol_coex_config *coex_config) +{ +} +#endif + static void fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc, struct wlan_fwol_coex_config *coex_config) @@ -79,6 +105,7 @@ fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc, fwol_mpta_helper_config_get(psoc, coex_config); coex_config->bt_sco_allow_wlan_2g_scan = cfg_get(psoc, CFG_BT_SCO_ALLOW_WLAN_2G_SCAN); + fwol_three_way_coex_config_legacy_config_get(psoc, coex_config); } static void diff --git a/fw_offload/dispatcher/inc/cfg_coex.h b/fw_offload/dispatcher/inc/cfg_coex.h index 5c226f4b49..c3b665b3f0 100644 --- a/fw_offload/dispatcher/inc/cfg_coex.h +++ b/fw_offload/dispatcher/inc/cfg_coex.h @@ -273,7 +273,6 @@ * This ini is used to enable or disable wlan 2g scan * when BT SCO connection is on. * - * * Usage: External * * @@ -283,6 +282,37 @@ 1, \ "Bt Sco Allow Wlan 2G Scan") +#ifdef FEATURE_COEX_CONFIG +/* + * + * gThreeWayCoexConfigLegacyEnable - Enable coex config legacy feature + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to enable or disable three way coex config legacy feature. + * This feature is designed only for non-mobile solution. + * When the feature is disabled, Firmware use the default configuration to + * set the coex priority of three antenna(WLAN, BT, ZIGBEE). + * when enable this feature, customer can use the vendor command to set antenna + * coex priority dynamically. + * + * Supported Feature: three way coex config + * + * Usage: External + * + * + */ +#define CFG_THREE_WAY_COEX_CONFIG_LEGACY CFG_INI_BOOL( \ + "gThreeWayCoexConfigLegacyEnable", \ + 0, \ + "Enable/Disable COEX Config Legacy") + +#define THREE_WAY_COEX_CONFIG_LEGACY_CFG CFG(CFG_THREE_WAY_COEX_CONFIG_LEGACY) +#else +#define THREE_WAY_COEX_CONFIG_LEGACY_CFG +#endif + #define CFG_COEX_ALL \ CFG(CFG_BTC_MODE) \ CFG(CFG_ANTENNA_ISOLATION) \ @@ -296,5 +326,6 @@ CFG(CFG_BT_INTERFERENCE_HIGH_LL) \ CFG(CFG_BT_INTERFERENCE_HIGH_UL) \ COEX_MPTA_HELPER_CFG \ - CFG(CFG_BT_SCO_ALLOW_WLAN_2G_SCAN) + CFG(CFG_BT_SCO_ALLOW_WLAN_2G_SCAN) \ + THREE_WAY_COEX_CONFIG_LEGACY_CFG #endif