Merge "qcacld-3.0: Cleanup ESE feature" into wlan-cld3.driver.lnx.1.1-dev
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index 5b14c69..d032de0 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -61,10 +61,8 @@
eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
eCSR_AUTH_TYPE_WAPI_WAI_PSK,
#endif /* FEATURE_WLAN_WAPI */
-#ifdef FEATURE_WLAN_ESE
eCSR_AUTH_TYPE_CCKM_WPA,
eCSR_AUTH_TYPE_CCKM_RSN,
-#endif /* FEATURE_WLAN_ESE */
#ifdef WLAN_FEATURE_11W
eCSR_AUTH_TYPE_RSN_PSK_SHA256,
eCSR_AUTH_TYPE_RSN_8021X_SHA256,
diff --git a/core/sme/inc/sme_inside.h b/core/sme/inc/sme_inside.h
index 2b41976..b02bc7d 100644
--- a/core/sme/inc/sme_inside.h
+++ b/core/sme/inc/sme_inside.h
@@ -262,8 +262,6 @@
QDF_STATUS csr_create_bg_scan_roam_channel_list(tpAniSirGlobal pMac,
uint8_t sessionId, const uint8_t *pChannelList,
const uint8_t numChannels);
-QDF_STATUS csr_update_bg_scan_config_ini_channel_list(tpAniSirGlobal pMac,
- uint8_t sessionId, eCsrBand eBand);
#ifdef FEATURE_WLAN_ESE
QDF_STATUS csr_create_roam_scan_channel_list(tpAniSirGlobal pMac,
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index dfb6250..c804e5a 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -1405,7 +1405,6 @@
return pMac->roam.configParam.bandCapability;
}
-#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
/*
This function flushes the roam scan cache
*/
@@ -1459,7 +1458,6 @@
return status;
}
-#endif
#ifdef FEATURE_WLAN_ESE
/**
@@ -1597,18 +1595,6 @@
return mac_ctx->roam.neighborRoamInfo[session_id].isESEAssoc;
}
-/**
- * csr_roam_is_roam_offload_scan_enabled() - is roam offload enabled
- * @mac_ctx: Global MAC context
- *
- * Returns whether "FW based BG scan" is currently enabled or not
- *
- * Return: true if roam offload scan enabled; false otherwise
- */
-bool csr_roam_is_roam_offload_scan_enabled(tpAniSirGlobal pMac)
-{
- return pMac->roam.configParam.isRoamOffloadScanEnabled;
-}
/**
* csr_roam_is_ese_ini_feature_enabled() - is ese feature enabled
@@ -1854,6 +1840,19 @@
#endif /* FEATURE_WLAN_ESE */
+/**
+ * csr_roam_is_roam_offload_scan_enabled() - is roam offload enabled
+ * @mac_ctx: Global MAC context
+ *
+ * Returns whether firmware based background scan is currently enabled or not.
+ *
+ * Return: true if roam offload scan enabled; false otherwise
+ */
+bool csr_roam_is_roam_offload_scan_enabled(tpAniSirGlobal mac_ctx)
+{
+ return mac_ctx->roam.configParam.isRoamOffloadScanEnabled;
+}
+
QDF_STATUS csr_set_band(tHalHandle hHal, uint8_t sessionId, eCsrBand eBand)
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 19fc684..1f70b9a 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -4693,6 +4693,40 @@
wma_send_msg(wma, WMA_AGGR_QOS_RSP, pAggrQosRspMsg, 0);
}
+#ifdef FEATURE_WLAN_ESE
+/**
+ * wma_set_tsm_interval() - Set TSM interval
+ * @req: pointer to ADDTS request
+ *
+ * Return: QDF_STATUS_E_FAILURE or QDF_STATUS_SUCCESS
+ */
+static QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
+{
+ /*
+ * msmt_interval is in unit called TU (1 TU = 1024 us)
+ * max value of msmt_interval cannot make resulting
+ * interval_milliseconds overflow 32 bit
+ *
+ */
+ uint32_t interval_milliseconds;
+ ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
+ if (NULL == pdev) {
+ WMA_LOGE("%s: Failed to get pdev", __func__);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ interval_milliseconds = (req->tsm_interval * 1024) / 1000;
+
+ ol_tx_set_compute_interval(pdev, interval_milliseconds);
+ return QDF_STATUS_SUCCESS;
+}
+#else
+static inline QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
+{
+ return QDF_STATUS_SUCCESS;
+}
+#endif /* FEATURE_WLAN_ESE */
+
/**
* wma_add_ts_req() - send ADDTS request to fw
* @wma: wma handle
@@ -4703,40 +4737,23 @@
void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg)
{
struct add_ts_param cmd = {0};
-
-#ifdef FEATURE_WLAN_ESE
- /*
- * msmt_interval is in unit called TU (1 TU = 1024 us)
- * max value of msmt_interval cannot make resulting
- * interval_miliseconds overflow 32 bit
- */
- uint32_t intervalMiliseconds;
- ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
- if (NULL == pdev) {
- WMA_LOGE("%s: Failed to get pdev", __func__);
- goto err;
- }
-
- intervalMiliseconds = (msg->tsm_interval * 1024) / 1000;
-
- ol_tx_set_compute_interval(pdev, intervalMiliseconds);
-#endif /* FEATURE_WLAN_ESE */
msg->status = QDF_STATUS_SUCCESS;
+ if (wma_set_tsm_interval(msg) == QDF_STATUS_SUCCESS) {
- cmd.sme_session_id = msg->sme_session_id;
- cmd.tspec.tsinfo.traffic.userPrio =
+ cmd.sme_session_id = msg->sme_session_id;
+ cmd.tspec.tsinfo.traffic.userPrio =
TID_TO_WME_AC(msg->tspec.tsinfo.traffic.userPrio);
- cmd.tspec.mediumTime = msg->tspec.mediumTime;
- if (wmi_unified_add_ts_cmd(wma->wmi_handle, &cmd))
- msg->status = QDF_STATUS_E_FAILURE;
+ cmd.tspec.mediumTime = msg->tspec.mediumTime;
+ if (wmi_unified_add_ts_cmd(wma->wmi_handle, &cmd))
+ msg->status = QDF_STATUS_E_FAILURE;
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- if (msg->setRICparams == true)
- wma_set_ric_req(wma, msg, true);
+ if (msg->setRICparams == true)
+ wma_set_ric_req(wma, msg, true);
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
-err:
+ }
wma_send_msg(wma, WMA_ADD_TS_RSP, msg, 0);
}