Quellcode durchsuchen

qcacld-3.0: Send proper PCL list to FW

Currently, the host does not check STA+STA concurrency
before sending VDEV/PDEV level PCL command to FW.

1. In case of STA Standalone connection, Host should send
PDEV level PCL commands to FW and marks all channels in PCL
as allowed.

2. In the case of STA + STA connection in MCC/SCC, Host
should send PDEV level PCL command for primary vdev id and
mark all channels in PCL as allowed.

3. In case of STA + STA connection in DBS, Host should
send VDEV level PCL command for both vdev id and via PCL
list host should make sure band is restricted to maintain
only DBS.

4. Initially STA + STA connection in DBS and then one STA
got disconnected. In this case, After disconnection Host
should send PDEV level PCL command for connected vdev id
and mark all channels in PCL as allowed.

Change-Id: I59cf5dfd1bf8fb26e360a8b0b5456fe05037376a
CRs-Fixed: 3084156
abhinav kumar vor 3 Jahren
Ursprung
Commit
f778fdacef

+ 3 - 2
components/cmn_services/interface_mgr/src/wlan_if_mgr_sta.c

@@ -117,9 +117,10 @@ QDF_STATUS if_mgr_connect_complete(struct wlan_objmgr_vdev *vdev,
 		    wlan_vdev_mlme_get_opmode(vdev) == QDF_P2P_CLIENT_MODE) {
 			ifmgr_debug("p2p client active, keep roam disabled");
 		} else {
+			ifmgr_debug("set pcl when connection on vdev id:%d",
+				     vdev->vdev_objmgr.vdev_id);
 			policy_mgr_set_pcl_for_connected_vdev(psoc,
-							      vdev->vdev_objmgr.
-							      vdev_id, false);
+					      vdev->vdev_objmgr.vdev_id, false);
 			/*
 			 * Enable roaming on other STA iface except this one.
 			 * Firmware doesn't support connection on one STA iface

+ 18 - 4
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -1585,7 +1585,8 @@ void policy_mgr_set_pcl_for_connected_vdev(struct wlan_objmgr_psoc *psoc,
 {
 	struct policy_mgr_pcl_list msg = { {0} };
 	struct wlan_objmgr_vdev *vdev;
-	uint8_t roam_enabled_vdev_id;
+	uint8_t roam_enabled_vdev_id, count;
+	bool sta_concurrency_is_dbs, dual_sta_roam_enabled;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
 						    WLAN_POLICY_MGR_ID);
@@ -1600,16 +1601,29 @@ void policy_mgr_set_pcl_for_connected_vdev(struct wlan_objmgr_psoc *psoc,
 	}
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);
 
+	count = policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
+							  NULL);
+	sta_concurrency_is_dbs = (count == 2) &&
+			!(policy_mgr_current_concurrency_is_mcc(psoc) ||
+			policy_mgr_current_concurrency_is_scc(psoc));
+
+	dual_sta_roam_enabled = wlan_mlme_get_dual_sta_roaming_enabled(psoc);
+
 	/*
 	 * Get the vdev id of the STA on which roaming is already
 	 * initialized and set the vdev PCL for that STA vdev if dual
-	 * STA roaming feature is enabled.
+	 * STA roaming feature is enabled and concurrency is STA + STA.
 	 */
 	roam_enabled_vdev_id = policy_mgr_get_roam_enabled_sta_session_id(psoc,
 								       vdev_id);
+	if (roam_enabled_vdev_id == WLAN_UMAC_VDEV_ID_MAX)
+		return;
+
+	policy_mgr_debug("count:%d, dual_sta_roam:%d, is_dbs:%d, clear_pcl:%d",
+			 count, dual_sta_roam_enabled, sta_concurrency_is_dbs,
+			 clear_pcl);
 
-	if (wlan_mlme_get_dual_sta_roaming_enabled(psoc) &&
-	    roam_enabled_vdev_id != WLAN_UMAC_VDEV_ID_MAX) {
+	if (dual_sta_roam_enabled && sta_concurrency_is_dbs) {
 		if (clear_pcl) {
 			/*
 			 * Here the PCL level should be at vdev level already

+ 13 - 8
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -3534,7 +3534,7 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
 	enum roam_offload_state cur_state;
 	uint8_t temp_vdev_id, roam_enabled_vdev_id;
 	uint32_t roaming_bitmap, count;
-	bool dual_sta_roam_active, usr_disabled_roaming;
+	bool dual_sta_roam_active, usr_disabled_roaming, sta_concurrency_is_dbs;
 	QDF_STATUS status;
 	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
 	struct wlan_mlme_psoc_ext_obj *mlme_obj;
@@ -3552,8 +3552,18 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
 	dual_sta_policy = &mlme_obj->cfg.gen.dual_sta_policy;
 	dual_sta_roam_active =
 		wlan_mlme_get_dual_sta_roaming_enabled(psoc);
+	count = policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
+							  NULL);
+	sta_concurrency_is_dbs = (count == 2) &&
+		    !(policy_mgr_current_concurrency_is_mcc(psoc) ||
+		      policy_mgr_current_concurrency_is_scc(psoc));
 
 	cur_state = mlme_get_roam_state(psoc, vdev_id);
+
+	mlme_info("sta count:%d, dual_sta_roam_active:%d, is_dbs:%d, state:%d",
+		  count, dual_sta_roam_active, sta_concurrency_is_dbs,
+		  cur_state);
+
 	switch (cur_state) {
 	case WLAN_ROAM_DEINIT:
 		roaming_bitmap = mlme_get_roam_trigger_bitmap(psoc, vdev_id);
@@ -3567,12 +3577,7 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
 		 * Enable roaming on other interface only if STA + STA
 		 * concurrency is in DBS.
 		 */
-		count = policy_mgr_mode_specific_connection_count(psoc,
-								  PM_STA_MODE,
-								  NULL);
-		if (dual_sta_roam_active && (count == 2 &&
-		    !(policy_mgr_current_concurrency_is_mcc(psoc) ||
-		      policy_mgr_current_concurrency_is_scc(psoc)))) {
+		if (dual_sta_roam_active && sta_concurrency_is_dbs) {
 			mlme_info("STA + STA concurrency is in DBS");
 			break;
 		}
@@ -3659,7 +3664,7 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
 	 * PCL type to vdev level
 	 */
 	if (roam_enabled_vdev_id != WLAN_UMAC_VDEV_ID_MAX &&
-	    dual_sta_roam_active)
+	    dual_sta_roam_active && sta_concurrency_is_dbs)
 		wlan_cm_roam_activate_pcl_per_vdev(psoc, vdev_id, true);
 
 	/* Set PCL before sending RSO start */

+ 5 - 1
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c

@@ -78,6 +78,9 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,
 	if (QDF_IS_STATUS_ERROR(status))
 		return QDF_STATUS_E_FAILURE;
 
+	mlme_debug("RSO_CFG: band_capability:%d band_mask:%d for vdev[%d]",
+		   band_capability, pcl_req->band_mask, pcl_req->vdev_id);
+
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, pcl_req->vdev_id,
 						    WLAN_MLME_SB_ID);
 	if (!vdev) {
@@ -141,7 +144,8 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc,
 		goto end;
 	}
 
-	mlme_debug("RSO_CFG: vdev[%d] Dump Vdev PCL weights", pcl_req->vdev_id);
+	mlme_debug("RSO_CFG: Dump Vdev PCL weights for vdev[%d]",
+		   pcl_req->vdev_id);
 	policy_mgr_dump_channel_list(weights->saved_num_chan,
 				     weights->saved_chan_list,
 				     weights->weighed_valid_list);

+ 4 - 1
core/wma/src/wma_main.c

@@ -9090,6 +9090,9 @@ QDF_STATUS wma_send_set_pcl_cmd(tp_wma_handle wma_handle,
 	if (msg->vdev_id != WLAN_UMAC_VDEV_ID_MAX)
 		return wlan_cm_roam_send_set_vdev_pcl(wma_handle->psoc, msg);
 
+
+	wma_debug("RSO_CFG: BandCapability:%d, band_mask:%d",
+		  wma_handle->bandcapability, msg->band_mask);
 	for (i = 0; i < wma_handle->saved_chan.num_channels; i++) {
 		msg->chan_weights.saved_chan_list[i] =
 					wma_handle->saved_chan.ch_freq_list[i];
@@ -9123,7 +9126,7 @@ QDF_STATUS wma_send_set_pcl_cmd(tp_wma_handle wma_handle,
 		wma_err("Error in creating weighed pcl");
 		return status;
 	}
-	wma_debug("Dump channel list send to wmi");
+	wma_debug("RSO_CFG: Dump PDEV PCL weights for vdev[%d]", msg->vdev_id);
 	policy_mgr_dump_channel_list(msg->chan_weights.saved_num_chan,
 				     msg->chan_weights.saved_chan_list,
 				     msg->chan_weights.weighed_valid_list);