diff --git a/components/fw_offload/core/inc/wlan_fw_offload_main.h b/components/fw_offload/core/inc/wlan_fw_offload_main.h
index bae1305d09ba..84bc8eba7eef 100644
--- a/components/fw_offload/core/inc/wlan_fw_offload_main.h
+++ b/components/fw_offload/core/inc/wlan_fw_offload_main.h
@@ -48,6 +48,7 @@
* @bt_interference_medium_ul: Upper limit of medium level BT interference
* @bt_interference_high_ll: Lower limit of high level BT interference
* @bt_interference_high_ul: Upper limit of high level BT interference
+ * @btc_mpta_helper_enable: Enable/Disable tri-radio MPTA helper
*/
struct wlan_fwol_coex_config {
uint8_t btc_mode;
@@ -61,6 +62,9 @@ struct wlan_fwol_coex_config {
int16_t bt_interference_medium_ul;
int16_t bt_interference_high_ll;
int16_t bt_interference_high_ul;
+#ifdef FEATURE_MPTA_HELPER
+ bool btc_mpta_helper_enable;
+#endif
};
#define FWOL_THERMAL_LEVEL_MAX 4
diff --git a/components/fw_offload/core/src/wlan_fw_offload_main.c b/components/fw_offload/core/src/wlan_fw_offload_main.c
index d11891989fd5..860789eef303 100644
--- a/components/fw_offload/core/src/wlan_fw_offload_main.c
+++ b/components/fw_offload/core/src/wlan_fw_offload_main.c
@@ -29,6 +29,29 @@ struct wlan_fwol_psoc_obj *fwol_get_psoc_obj(struct wlan_objmgr_psoc *psoc)
WLAN_UMAC_COMP_FWOL);
}
+/**
+ * fwol_mpta_helper_config_get: Populate btc_mpta_helper_enable from cfg
+ * @psoc: The global psoc handler
+ * @coex_config: The cfg structure
+ *
+ * Return: none
+ */
+#ifdef FEATURE_MPTA_HELPER
+static void
+fwol_mpta_helper_config_get(struct wlan_objmgr_psoc *psoc,
+ struct wlan_fwol_coex_config *coex_config)
+{
+ coex_config->btc_mpta_helper_enable =
+ cfg_get(psoc, CFG_COEX_MPTA_HELPER);
+}
+#else
+static void
+fwol_mpta_helper_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)
@@ -53,6 +76,7 @@ fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_LL);
coex_config->bt_interference_high_ul =
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_UL);
+ fwol_mpta_helper_config_get(psoc, coex_config);
}
static void
diff --git a/components/fw_offload/dispatcher/inc/cfg_coex.h b/components/fw_offload/dispatcher/inc/cfg_coex.h
index 11f68c00378f..dcac2bf3aefa 100644
--- a/components/fw_offload/dispatcher/inc/cfg_coex.h
+++ b/components/fw_offload/dispatcher/inc/cfg_coex.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 - 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012 - 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -236,6 +236,30 @@
CFG_VALUE_OR_DEFAULT, \
"BT Interference High UL")
+#ifdef FEATURE_MPTA_HELPER
+/*
+ *
+ * gMPTAHelperEnable - Enable MPTA Helper
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable or disable coex MPTA Helper.
+ *
+ * Usage: External
+ *
+ *
+ */
+#define CFG_COEX_MPTA_HELPER CFG_INI_BOOL( \
+ "gMPTAHelperEnable", \
+ 0, \
+ "Enable/Disable MPTA Helper")
+
+#define COEX_MPTA_HELPER_CFG CFG(CFG_COEX_MPTA_HELPER)
+#else
+#define COEX_MPTA_HELPER_CFG
+#endif
+
#define CFG_COEX_ALL \
CFG(CFG_BTC_MODE) \
CFG(CFG_ANTENNA_ISOLATION) \
@@ -247,5 +271,6 @@
CFG(CFG_BT_INTERFERENCE_MEDIUM_LL) \
CFG(CFG_BT_INTERFERENCE_MEDIUM_UL) \
CFG(CFG_BT_INTERFERENCE_HIGH_LL) \
- CFG(CFG_BT_INTERFERENCE_HIGH_UL)
+ CFG(CFG_BT_INTERFERENCE_HIGH_UL) \
+ COEX_MPTA_HELPER_CFG
#endif
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index cdb8eea10201..0ef8770dd02f 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -98,6 +98,7 @@
#include "wlan_hdd_driver_ops.h"
#include "epping_main.h"
#include "wlan_hdd_data_stall_detection.h"
+#include "wlan_hdd_mpta_helper.h"
#include
#include "hif.h"
@@ -4715,6 +4716,10 @@ static int hdd_send_coex_config_params(struct hdd_context *hdd_ctx,
hdd_err("Failed to send coex BT interference level");
goto err;
}
+
+ if (wlan_hdd_mpta_helper_enable(&coex_cfg_params, &config))
+ goto err;
+
return 0;
err:
return -EINVAL;