|
@@ -324,15 +324,66 @@ out:
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+void
|
|
|
+polic_mgr_send_pcl_to_fw(struct wlan_objmgr_psoc *psoc,
|
|
|
+ enum QDF_OPMODE mode)
|
|
|
+{
|
|
|
+ uint32_t conn_idx = 0;
|
|
|
+ mac_handle_t mac_handle = cds_get_context(QDF_MODULE_ID_SME);
|
|
|
+ uint8_t vdev_id = WLAN_INVALID_VDEV_ID;
|
|
|
+ struct policy_mgr_psoc_priv_obj *pm_ctx;
|
|
|
+
|
|
|
+ pm_ctx = policy_mgr_get_context(psoc);
|
|
|
+ if (!pm_ctx) {
|
|
|
+ policy_mgr_err("Invalid Context");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (conn_idx = 0; conn_idx < MAX_NUMBER_OF_CONC_CONNECTIONS;
|
|
|
+ conn_idx++) {
|
|
|
+ qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
|
|
+ if (!(pm_conc_connection_list[conn_idx].mode ==
|
|
|
+ PM_STA_MODE &&
|
|
|
+ pm_conc_connection_list[conn_idx].in_use)) {
|
|
|
+ qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ vdev_id = pm_conc_connection_list[conn_idx].vdev_id;
|
|
|
+ qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Avoid sending PCL when roaming is in progress. PCL
|
|
|
+ * gets updated to firmware once roaming is done
|
|
|
+ */
|
|
|
+ if (mode == QDF_SAP_MODE &&
|
|
|
+ wlan_cm_roaming_in_progress(pm_ctx->pdev,
|
|
|
+ vdev_id)) {
|
|
|
+ policy_mgr_debug("Roaming is in progress, don't stop RSO for vdev_id: %d",
|
|
|
+ vdev_id);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ pm_ctx->sme_cbacks.sme_rso_stop_cb(
|
|
|
+ mac_handle, vdev_id,
|
|
|
+ REASON_DRIVER_DISABLED,
|
|
|
+ RSO_SET_PCL);
|
|
|
+
|
|
|
+ policy_mgr_set_pcl_for_existing_combo(pm_ctx->psoc, PM_STA_MODE,
|
|
|
+ vdev_id);
|
|
|
+ pm_ctx->sme_cbacks.sme_rso_start_cb(
|
|
|
+ mac_handle, vdev_id,
|
|
|
+ REASON_DRIVER_ENABLED,
|
|
|
+ RSO_SET_PCL);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
void policy_mgr_decr_session_set_pcl(struct wlan_objmgr_psoc *psoc,
|
|
|
enum QDF_OPMODE mode,
|
|
|
uint8_t session_id)
|
|
|
{
|
|
|
QDF_STATUS qdf_status;
|
|
|
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
|
|
- mac_handle_t mac_handle = cds_get_context(QDF_MODULE_ID_SME);
|
|
|
- uint32_t conn_idx = 0;
|
|
|
- uint8_t vdev_id = WLAN_INVALID_VDEV_ID;
|
|
|
|
|
|
pm_ctx = policy_mgr_get_context(psoc);
|
|
|
if (!pm_ctx) {
|
|
@@ -361,36 +412,10 @@ void policy_mgr_decr_session_set_pcl(struct wlan_objmgr_psoc *psoc,
|
|
|
* the entry that we have saved before.
|
|
|
*/
|
|
|
|
|
|
- if ((policy_mgr_mode_specific_connection_count(
|
|
|
- psoc, PM_STA_MODE, NULL) > 0) && mode != QDF_STA_MODE) {
|
|
|
- for (conn_idx = 0; conn_idx < MAX_NUMBER_OF_CONC_CONNECTIONS;
|
|
|
- conn_idx++) {
|
|
|
- qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
|
|
- if (!(pm_conc_connection_list[conn_idx].mode ==
|
|
|
- PM_STA_MODE &&
|
|
|
- pm_conc_connection_list[conn_idx].in_use)) {
|
|
|
- qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- vdev_id = pm_conc_connection_list[conn_idx].vdev_id;
|
|
|
- qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
|
|
-
|
|
|
- /* Send RSO stop before sending set pcl command */
|
|
|
- pm_ctx->sme_cbacks.sme_rso_stop_cb(
|
|
|
- mac_handle, vdev_id,
|
|
|
- REASON_DRIVER_DISABLED,
|
|
|
- RSO_SET_PCL);
|
|
|
-
|
|
|
- policy_mgr_set_pcl_for_existing_combo(psoc, PM_STA_MODE,
|
|
|
- vdev_id);
|
|
|
-
|
|
|
- pm_ctx->sme_cbacks.sme_rso_start_cb(
|
|
|
- mac_handle, vdev_id,
|
|
|
- REASON_DRIVER_ENABLED,
|
|
|
- RSO_SET_PCL);
|
|
|
- }
|
|
|
- }
|
|
|
+ if ((policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
|
|
|
+ NULL) > 0) &&
|
|
|
+ mode != QDF_STA_MODE)
|
|
|
+ polic_mgr_send_pcl_to_fw(psoc, mode);
|
|
|
|
|
|
/* do we need to change the HW mode */
|
|
|
if (!policy_mgr_is_hw_dbs_capable(psoc))
|