Merge 5a770e47bc63b08aa1d4ad575fd907fa0aa8de22 on remote branch
Change-Id: Ic28e4bd51cb5beef34e9ee6cacd343bae6c934d1
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 3512714..5f75d84 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -2433,19 +2433,33 @@
}
#else
void hdd_fill_last_rx(hdd_adapter_t *adapter);
+static inline int wcnss_update_bt_profile(void)
+{
+ return 0;
+}
+
+static inline int wcnss_is_sw_pta_enabled(void)
+{
+ return 0;
+}
#endif
#ifdef FEATURE_WLAN_SW_PTA
/**
* hdd_process_bt_sco_profile - process BT SCO profile
* @hdd_ctx: pointer to HDD context
- * @bt_enabled: status of BT
- * @bt_sco: status of SCO
+ * @bt_enabled: BT status
+ * @bt_adv: BT advertisement status
+ * @ble_enabled: BLE status
+ * @bt_a2dp: BT A2DP status
+ * @bt_sco: BT SCO status
*
* Return: 0 on success, error on failure
*/
int hdd_process_bt_sco_profile(hdd_context_t *hdd_ctx,
- bool bt_enabled, bool bt_sco);
+ bool bt_enabled, bool bt_adv,
+ bool ble_enabled, bool bt_a2dp,
+ bool bt_sco);
/**
* hdd_is_sw_pta_enabled - is sw pta enabled
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 449f77d..541af37 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -99,7 +99,7 @@
#include "qwlan_version.h"
#include "wlan_logging_sock_svc.h"
#include "wlan_hdd_misc.h"
-
+#include <linux/wcnss_wlan.h>
#define g_mode_rates_size (12)
#define a_mode_rates_size (8)
@@ -623,7 +623,8 @@
#ifdef FEATURE_WLAN_SW_PTA
bool hdd_is_sw_pta_enabled(hdd_context_t *hdd_ctx)
{
- return hdd_ctx->cfg_ini->is_sw_pta_enabled;
+ return hdd_ctx->cfg_ini->is_sw_pta_enabled ||
+ wcnss_is_sw_pta_enabled();
}
#endif
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index d8cd7bd..174f1ea 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -2875,5 +2875,7 @@
if (pHddCtx->cfg_ini->sap_internal_restart)
hdd_ssr_restart_sap(pHddCtx);
+ wcnss_update_bt_profile();
+
return VOS_STATUS_SUCCESS;
}
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 4f74af1..67d86ce 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -227,6 +227,11 @@
/* set when SSR is needed after unload */
static e_hdd_ssr_required isSsrRequired = HDD_SSR_NOT_REQUIRED;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
+#define WLAN_NV_FILE_SIZE 64
+static char wlan_nv_bin[WLAN_NV_FILE_SIZE];
+#endif
+
//internal function declaration
static VOS_STATUS wlan_hdd_framework_restart(hdd_context_t *pHddCtx);
static void wlan_hdd_restart_init(hdd_context_t *pHddCtx);
@@ -3893,7 +3898,7 @@
}
#ifdef FEATURE_WLAN_SW_PTA
-static void hdd_sco_resp_callback(uint8_t sco_status)
+static void hdd_sw_pta_resp_callback(uint8_t sw_pta_status)
{
hdd_context_t *hdd_ctx = NULL;
v_CONTEXT_t vos_ctx = NULL;
@@ -3913,12 +3918,12 @@
return;
}
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: Response status %d",
- __func__, sco_status);
+ hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: sw pta response status %d",
+ __func__, sw_pta_status);
- if (sco_status) {
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Invalid sco status %d",
- __func__, sco_status);
+ if (sw_pta_status) {
+ hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Invalid sw pta status %d",
+ __func__, sw_pta_status);
return;
}
@@ -3926,15 +3931,15 @@
}
int hdd_process_bt_sco_profile(hdd_context_t *hdd_ctx,
- bool bt_enabled, bool bt_sco)
+ bool bt_enabled, bool bt_adv,
+ bool ble_enabled, bool bt_a2dp,
+ bool bt_sco)
{
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hdd_ctx->hHal);
- uint8_t no_of_states_changed = 0;
hdd_station_ctx_t *hdd_sta_ctx;
eConnectionState conn_state;
hdd_adapter_t *adapter;
eHalStatus hal_status;
- bool sco_status;
int rc;
if (!mac_ctx) {
@@ -3942,68 +3947,11 @@
return -EINVAL;
}
- /**
- * At a time only one status can be changed compared to
- * previous command (BT_ENABLED/SCO)
- * If no.of states changed is greater than one it is
- * an invalid command.
- */
- if (bt_enabled != hdd_ctx->is_bt_enabled)
- no_of_states_changed++;
-
- if (bt_sco != hdd_ctx->is_sco_enabled)
- no_of_states_changed++;
-
- if (no_of_states_changed > 1) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Multiple states changed",
- __func__);
- return -EINVAL;
- }
-
INIT_COMPLETION(hdd_ctx->sw_pta_comp);
- if (bt_enabled != hdd_ctx->is_bt_enabled) {
- hal_status = sme_bt_req(hdd_ctx->hHal,
- hdd_sco_resp_callback,
- adapter->sessionId, bt_enabled);
- if (!HAL_STATUS_SUCCESS(hal_status)) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Error sending sme sco indication request",
- __func__);
- return -EINVAL;
- }
-
- rc = wait_for_completion_timeout(&hdd_ctx->sw_pta_comp,
- msecs_to_jiffies(WLAN_WAIT_TIME_SW_PTA));
- if (!rc) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Target response timed out for sw_pta_comp"));
- return -EINVAL;
- }
-
- hdd_ctx->is_bt_enabled = bt_enabled;
- return 0;
- }
-
- if (bt_sco) {
- if (hdd_ctx->is_sco_enabled) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: BT SCO is already enabled", __func__);
- return 0;
- }
- sco_status = true;
- } else {
- if (!hdd_ctx->is_sco_enabled) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: BT SCO is already disabled", __func__);
- return 0;
- }
- sco_status = false;
- }
-
- hal_status = sme_sco_req(hdd_ctx->hHal,
- hdd_sco_resp_callback,
- adapter->sessionId, sco_status);
+ hal_status = sme_sw_pta_req(hdd_ctx->hHal, hdd_sw_pta_resp_callback,
+ adapter->sessionId, bt_enabled,
+ bt_adv, ble_enabled, bt_a2dp, bt_sco);
if (!HAL_STATUS_SUCCESS(hal_status)) {
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: Error sending sme sco indication request",
@@ -4019,7 +3967,18 @@
return -EINVAL;
}
- if (!bt_sco) {
+ if (bt_sco) {
+ if (hdd_ctx->is_sco_enabled) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: BT SCO is already enabled", __func__);
+ return 0;
+ }
+ } else {
+ if (!hdd_ctx->is_sco_enabled) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: BT SCO is already disabled", __func__);
+ return 0;
+ }
hdd_ctx->is_sco_enabled = false;
mac_ctx->isCoexScoIndSet = 0;
return 0;
@@ -4074,6 +4033,7 @@
static void hdd_init_sw_pta(hdd_context_t *hdd_ctx)
{
init_completion(&hdd_ctx->sw_pta_comp);
+ wcnss_update_bt_profile();
}
static void hdd_deinit_sw_pta(hdd_context_t *hdd_ctx)
@@ -8740,6 +8700,19 @@
return status;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
+char* hdd_get_nv_bin()
+{
+ if (wcnss_get_nv_name(wlan_nv_bin)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: NV binary is invalid", __func__);
+ return NULL;
+ }
+
+ return wlan_nv_bin;
+}
+#endif
+
/**---------------------------------------------------------------------------
\brief hdd_request_firmware() -
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 5eb95fe..8b356ab 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -6518,14 +6518,18 @@
#define SW_PTA_COEX_PARAMS_MAX_LEN 32
/**
* struct sir_sw_pta_req - sw pta coex params request
- * @param_type: sw pta coex param type
- * @length: sw pta coex params value length
- * @value: sw pta coex params value
+ * @bt_enabled: BT status
+ * @bt_adv: BT advertisement status
+ * @ble_enabled: BLE status
+ * @bt_a2dp: BT A2DP status
+ * @bt_sco: BT SCO status
*/
struct sir_sw_pta_req {
- enum sir_sw_pta_param_type param_type;
- uint8_t length;
- uint8_t value[SW_PTA_COEX_PARAMS_MAX_LEN];
+ bool bt_enabled;
+ bool bt_adv;
+ bool ble_enabled;
+ bool bt_a2dp;
+ bool bt_sco;
};
#endif
#endif /* __SIR_API_H */
diff --git a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
index 4921f43..37de460 100644
--- a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
+++ b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
@@ -545,6 +545,11 @@
FL("Heart Beat missed from AP on DFS chanel moving to passive"));)
if (psessionEntry->gLimSpecMgmt.dfs_channel_csa) {
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
+ if (pMac->roam.configParam.isRoamOffloadScanEnabled) {
+ csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_CONNECT);
+ }
+#endif
limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
psessionEntry->gLimSpecMgmt.dfs_channel_csa = false;
}
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index 529cad0..bc51c9c 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -7201,6 +7201,19 @@
else
{
PELOGE(limLog(pMac, LOGE, FL("Not in scan state, start channel switch timer"));)
+
+ /* Stop roam scan during CAC period in DFS channels */
+ if(limIsconnectedOnDFSChannel(
+ psessionEntry->gLimChannelSwitch.primaryChannel)) {
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
+ if (pMac->roam.configParam.isRoamOffloadScanEnabled) {
+ csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_STOP,
+ REASON_DISCONNECTED);
+ }
+#endif
+ psessionEntry->gLimSpecMgmt.dfs_channel_csa = true;
+ }
+
/** We are safe to switch channel at this point */
limStopTxAndSwitchChannel(pMac, psessionEntry->peSessionId);
}
diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c
index 366e9a2..1f495f8 100644
--- a/CORE/MAC/src/pe/sch/schBeaconProcess.c
+++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c
@@ -384,6 +384,11 @@
}
if (psessionEntry->gLimSpecMgmt.dfs_channel_csa) {
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
+ if (pMac->roam.configParam.isRoamOffloadScanEnabled) {
+ csrRoamOffloadScan(pMac, ROAM_SCAN_OFFLOAD_START, REASON_CONNECT);
+ }
+#endif
limFrameTransmissionControl(pMac, eLIM_TX_ALL, eLIM_RESUME_TX);
psessionEntry->gLimSpecMgmt.dfs_channel_csa = false;
}
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index 5999190..788d14e 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -861,6 +861,11 @@
event->HTCaps = pCsrRoamInfo->ht_caps;
event->VHTCaps = pCsrRoamInfo->vht_caps;
+ if (pCsrRoamInfo->fReassocReq) {
+ event->iesLen -= VOS_MAC_ADDR_SIZE;
+ event->ies += VOS_MAC_ADDR_SIZE;
+ }
+
//TODO: Need to fill sapAuthType
//event->SapAuthType = pCsrRoamInfo->pProfile->negotiatedAuthType;
break;
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index d695c9b..144d828 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -4195,41 +4195,17 @@
* @hal: The handle returned by mac_open
* @resp_callback: callback to indicate sw pta response to hdd
* @session_id: session id
- * @type: sw pta coex param type
- * @length: length of sw pta coex param value
- * @value: sw pta coex params value
+ * @bt_enabled: BT status
+ * @bt_adv: BT advertisement status
+ * @ble_enabled: BLE status
+ * @bt_a2dp: BT A2DP status
+ * @bt_sco: BT SCO status
*
* Return: HAL_STATUS
*/
eHalStatus sme_sw_pta_req(tHalHandle hal,
void (*resp_callback)(uint8_t resp_status),
- uint8_t session_id, enum sir_sw_pta_param_type type,
- uint8_t length, uint8_t *value);
-
-/**
- * sme_sco_req() - Send sco request status to sme
- * @hal: The handle returned by mac_open
- * @resp_callback: callback to indicate sco response to hdd
- * @session_id: session id
- * @req_status: sco request status
- *
- * Return: HAL_STATUS
- */
-eHalStatus sme_sco_req(tHalHandle hal,
- void (*resp_callback)(uint8_t resp_status),
- uint8_t session_id, uint8_t req_status);
-
-/**
- * sme_bt_req() - Send bt status to sme
- * @hal: The handle returned by mac_open
- * @resp_callback: callback to indicate sco response to hdd
- * @session_id: session id
- * @req_status: sco request status
- *
- * Return: HAL_STATUS
- */
-eHalStatus sme_bt_req(tHalHandle hal,
- void (*resp_callback)(uint8_t resp_status),
- uint8_t session_id, uint8_t req_status);
+ uint8_t session_id, bool bt_enabled, bool bt_adv,
+ bool ble_enabled, bool bt_a2dp, bool bt_sco);
#endif /* FEATURE_WLAN_SW_PTA */
#endif //#if !defined( __SME_API_H )
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 3b538c9..2074433 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -15679,19 +15679,14 @@
#ifdef FEATURE_WLAN_SW_PTA
eHalStatus sme_sw_pta_req(tHalHandle hal,
void (*resp_callback)(uint8_t resp_status),
- uint8_t session_id, enum sir_sw_pta_param_type type,
- uint8_t length, uint8_t *value)
+ uint8_t session_id, bool bt_enabled, bool bt_adv,
+ bool ble_enabled, bool bt_a2dp, bool bt_sco)
{
tpAniSirGlobal mac = PMAC_STRUCT(hal);
struct sir_sw_pta_req *sw_pta_req;
eHalStatus status;
tSmeCmd *sme_cmd;
- if (length > SW_PTA_COEX_PARAMS_MAX_LEN) {
- smsLog(mac, LOGE, FL("Invalid length"));
- return eHAL_STATUS_FAILURE;
- }
-
sme_cmd = csrGetCommandBuffer(mac);
if (!sme_cmd) {
smsLog(mac, LOGE, FL("Failed to get buffer for sw pta req"));
@@ -15705,9 +15700,11 @@
return eHAL_STATUS_RESOURCES;
}
- sw_pta_req->param_type = type;
- sw_pta_req->length = length;
- memcpy(sw_pta_req->value, value, length);
+ sw_pta_req->bt_enabled = bt_enabled;
+ sw_pta_req->bt_adv = bt_adv;
+ sw_pta_req->ble_enabled = ble_enabled;
+ sw_pta_req->bt_a2dp = bt_a2dp;
+ sw_pta_req->bt_sco = bt_sco;
status = sme_AcquireGlobalLock(&mac->sme);
if (HAL_STATUS_SUCCESS(status)) {
@@ -15737,20 +15734,4 @@
sme_ReleaseGlobalLock(&mac->sme);
return eHAL_STATUS_SUCCESS;
}
-
-eHalStatus sme_sco_req(tHalHandle hal,
- void (*resp_callback)(uint8_t resp_status),
- uint8_t session_id, uint8_t req_status)
-{
- return sme_sw_pta_req(hal, resp_callback, session_id,
- SCO_STATUS, sizeof(req_status), &req_status);
-}
-
-eHalStatus sme_bt_req(tHalHandle hal,
- void (*resp_callback)(uint8_t resp_status),
- uint8_t session_id, uint8_t req_status)
-{
- return sme_sw_pta_req(hal, resp_callback, session_id,
- BT_STATUS, sizeof(req_status), &req_status);
-}
#endif /* FEATURE_WLAN_SW_PTA */
diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h
index 38325b9..383826b 100644
--- a/CORE/VOSS/inc/vos_api.h
+++ b/CORE/VOSS/inc/vos_api.h
@@ -608,19 +608,22 @@
#ifdef FEATURE_WLAN_SW_PTA
/**
* vos_process_bt_profile - process BT profile
- * @bt_enabled: status of BT
- * @ble: status of BLE
- * @a2dp: stautus of A2DP
- * @bt_sco: status of SCO
+ * @bt_enabled: BT status
+ * @bt_adv: BT advertisement status
+ * @ble_enabled: BLE status
+ * @bt_a2dp: BT A2DP status
+ * @bt_sco: BT SCO status
*
* Return: 0 on success and error on failure
*/
-int vos_process_bt_profile(bool bt_enabled, bool ble,
- bool a2dp, bool bt_sco);
+int vos_process_bt_profile(bool bt_enabled, bool bt_adv,
+ bool ble_enabled, bool bt_a2dp,
+ bool bt_sco);
#else
static inline int
-vos_process_bt_profile(bool bt_enabled, bool ble,
- bool a2dp, bool bt_sco)
+vos_process_bt_profile(bool bt_enabled, bool bt_adv,
+ bool ble_enabled, bool bt_a2dp,
+ bool bt_sco);
{
return -ENOTSUPP;
}
diff --git a/CORE/VOSS/inc/wlan_hdd_misc.h b/CORE/VOSS/inc/wlan_hdd_misc.h
index 7c2d62a..aa6138d 100644
--- a/CORE/VOSS/inc/wlan_hdd_misc.h
+++ b/CORE/VOSS/inc/wlan_hdd_misc.h
@@ -56,6 +56,12 @@
#define WLAN_HO_CFG_FILE "wlan/wlan_ho_config"
#endif // MSM_PLATFORM
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
+#undef WLAN_NV_FILE
+#define WLAN_NV_FILE hdd_get_nv_bin()
+
+char* hdd_get_nv_bin(void);
+#endif
VOS_STATUS hdd_request_firmware(char *pfileName,v_VOID_t *pCtx,v_VOID_t **ppfw_data, v_SIZE_t *pSize);
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index 8931d73..df77369 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -3988,8 +3988,9 @@
}
#ifdef FEATURE_WLAN_SW_PTA
-int vos_process_bt_profile(bool bt_enabled, bool ble,
- bool a2dp, bool bt_sco)
+int vos_process_bt_profile(bool bt_enabled, bool bt_adv,
+ bool ble_enabled, bool bt_a2dp,
+ bool bt_sco)
{
v_CONTEXT_t vos_ctx = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
hdd_context_t *hdd_ctx;
@@ -4008,13 +4009,14 @@
return -EINVAL;
}
- if (!hdd_ctx->cfg_ini->is_sw_pta_enabled) {
+ if (!hdd_is_sw_pta_enabled(hdd_ctx)) {
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
"%s: sw pta is not enabled", __func__);
return -EINVAL;
}
- ret = hdd_process_bt_sco_profile(hdd_ctx, bt_enabled, bt_sco);
+ ret = hdd_process_bt_sco_profile(hdd_ctx, bt_enabled, bt_adv,
+ ble_enabled, bt_a2dp, bt_sco);
if (ret)
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
"%s: Unable to process bt sco profile", __func__);
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index d635888..15344db 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi.h
@@ -6682,29 +6682,19 @@
#ifdef FEATURE_WLAN_SW_PTA
/**
- * enum wdi_sw_pta_param_type - Type of sw pta coex param
- * @WDI_SCO_STATUS: Enable/Disable SCO
- * @WDI_NUD_STATUS: Enable/Disable NUD
- * @WDI_BT_STATUS: Enable/Disable BT
- */
-/* Copied from sirApi.h to avoid compile error */
-enum wdi_sw_pta_param_type {
- WDI_SCO_STATUS,
- WDI_NUD_STATUS,
- WDI_BT_STATUS,
-};
-
-#define WDI_SW_PTA_COEX_PARAMS_MAX_LEN 32
-/**
* wdi_sw_pta_req - SW PTA coex params request
- * @param_type: sw pta coex param type
- * @length: sw pta coex params value length
- * @value: sw pta coex params value
+ * @bt_enabled: BT status
+ * @bt_adv: BT advertisement status
+ * @ble_enabled: BLE status
+ * @bt_a2dp: BT A2DP status
+ * @bt_sco: BT SCO status
*/
struct wdi_sw_pta_req {
- enum wdi_sw_pta_param_type param_type;
- uint8_t length;
- uint8_t value[WDI_SW_PTA_COEX_PARAMS_MAX_LEN];
+ bool bt_enabled;
+ bool bt_adv;
+ bool ble_enabled;
+ bool bt_a2dp;
+ bool bt_sco;
};
#endif
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index 327f9fc..8b6ed3f 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -40175,10 +40175,11 @@
wdi_sw_pta_req = (struct wdi_sw_pta_req *)pEventData->pEventData;
hal_sw_pta_req = (tpHalSwPTAReq) (pSendBuffer + usDataOffset);;
- hal_sw_pta_req->param_type = wdi_sw_pta_req->param_type;
- hal_sw_pta_req->length = wdi_sw_pta_req->length;
- memcpy(hal_sw_pta_req->value, wdi_sw_pta_req->value,
- wdi_sw_pta_req->length);
+ hal_sw_pta_req->bt_enabled = wdi_sw_pta_req->bt_enabled;
+ hal_sw_pta_req->bt_adv = wdi_sw_pta_req->bt_adv;
+ hal_sw_pta_req->ble_enabled = wdi_sw_pta_req->ble_enabled;
+ hal_sw_pta_req->bt_a2dp = wdi_sw_pta_req->bt_a2dp;
+ hal_sw_pta_req->bt_sco = wdi_sw_pta_req->bt_sco;
return WDI_SendMsg(pWDICtx, pSendBuffer, usSendSize,
pEventData->pCBfnc, pEventData->pUserData,
diff --git a/CORE/WDI/TRP/CTS/src/wlan_qct_wdi_cts.c b/CORE/WDI/TRP/CTS/src/wlan_qct_wdi_cts.c
index 6994f5b..8452e84 100644
--- a/CORE/WDI/TRP/CTS/src/wlan_qct_wdi_cts.c
+++ b/CORE/WDI/TRP/CTS/src/wlan_qct_wdi_cts.c
@@ -594,8 +594,9 @@
"%s: Received bt_profile state update %s", __func__,
state->bt_enabled ? "ENABLED" : "DISABLED");
- ret = vos_process_bt_profile(state->bt_enabled, state->bt_ble,
- state->bt_a2dp, state->bt_sco);
+ ret = vos_process_bt_profile(state->bt_enabled, state->bt_adv,
+ state->bt_ble, state->bt_a2dp,
+ state->bt_sco);
return ret;
}
diff --git a/riva/inc/wlan_hal_msg.h b/riva/inc/wlan_hal_msg.h
index 8e038fb..23b8e25 100644
--- a/riva/inc/wlan_hal_msg.h
+++ b/riva/inc/wlan_hal_msg.h
@@ -9775,30 +9775,19 @@
#ifdef FEATURE_WLAN_SW_PTA
/**
- * enum hal_sw_pta_param_type - Type of sw pta coex param
- * @WDI_SCO_STATUS: Enable/Disable SCO
- * @WDI_NUD_STATUS: Enable/Disable NUD
- * @WDI_BT_STATUS: Enable/Disable BT
- */
-/* Copied from sirApi.h to avoid compile error */
-enum hal_sw_pta_param_type {
- HAL_SW_PTA_SCO_STATUS = 0,
- HAL_SW_PTA_NUD_STATUS = 1,
- HAL_SW_PTA_BT_STATUS = 2,
- HAL_SW_PTA_MAX = WLAN_HAL_MAX_ENUM_SIZE
-};
-
-#define HAL_SW_PTA_COEX_PARAMS_MAX_LEN 32
-/**
* hal_sw_pta_req - SW PTA coex params request
- * @param_type: sw pta coex param type
- * @length: sw pta coex params value length
- * @value: sw pta coex params value
+ * @bt_enabled: BT status
+ * @bt_adv: BT advertisement status
+ * @ble_on: BLE status
+ * @bt_a2dp: BT A2DP status
+ * @bt_sco: BT SCO status
*/
typedef PACKED_PRE struct PACKED_POST {
- enum hal_sw_pta_param_type param_type;
- uint8_t length;
- uint8_t value[HAL_SW_PTA_COEX_PARAMS_MAX_LEN];
+ uint8_t bt_enabled;
+ uint8_t bt_adv;
+ uint8_t ble_enabled;
+ uint8_t bt_a2dp;
+ uint8_t bt_sco;
} tHalSwPTAReq, *tpHalSwPTAReq;
#endif
#endif /* _WLAN_HAL_MSG_H_ */