Browse Source

qcacld-3.0: Add self reassoc and Hw mode change logic for LFR2

Add self reassoc and Hw mode change logic for LFR2.

Change-Id: I2c48f0d36d541df58b6d6c2448bfe526b60df142
CRs-Fixed: 2941794
Abhishek Singh 3 years ago
parent
commit
39455350a3

+ 7 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -3025,13 +3025,17 @@ static void policy_mgr_nss_update_cb(struct wlan_objmgr_psoc *psoc,
 						next_action, reason,
 						request_id);
 	} else {
-		if (reason == POLICY_MGR_UPDATE_REASON_STA_CONNECT) {
-			sme_debug("Continue connect on vdev %d request_id %x",
-				  vdev_id, request_id);
+		/* This is temp ifdef will be removed in near future */
+#ifdef FEATURE_CM_ENABLE
+		if (reason == POLICY_MGR_UPDATE_REASON_STA_CONNECT ||
+		    reason == POLICY_MGR_UPDATE_REASON_LFR2_ROAM) {
+			sme_debug("Continue connect/reassoc on vdev %d request_id %x reason %d",
+				  vdev_id, request_id, reason);
 			wlan_cm_hw_mode_change_resp(pm_ctx->pdev, vdev_id,
 						    request_id,
 						    QDF_STATUS_SUCCESS);
 		}
+#endif
 		policy_mgr_debug("No action needed right now");
 		ret = policy_mgr_set_opportunistic_update(psoc);
 		if (!QDF_IS_STATUS_SUCCESS(ret))

+ 5 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -1281,6 +1281,11 @@ cm_handle_reassoc_req(struct wlan_objmgr_vdev *vdev,
 			   req->bss->entry->neg_sec_info.key_mgmt,
 			   req->bss->entry->channel.chan_freq);
 
+	/* decrement count for self reassoc */
+	if (req->self_reassoc)
+		policy_mgr_decr_session_set_pcl(psoc,
+						wlan_vdev_mlme_get_opmode(vdev),
+						req->vdev_id);
 	msg.bodyptr = join_req;
 	msg.type = CM_REASSOC_REQ;
 	msg.flush_callback = cm_flush_join_req;

+ 9 - 7
core/sme/src/common/sme_api.c

@@ -267,15 +267,13 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
 		csr_csa_restart(mac, session_id);
 	}
 	/* This is temp ifdef will be removed in near future */
-#ifndef FEATURE_CM_ENABLE
-	if (reason == POLICY_MGR_UPDATE_REASON_LFR2_ROAM)
-		csr_continue_lfr2_connect(mac, session_id);
-#endif
-
-	if (reason == POLICY_MGR_UPDATE_REASON_STA_CONNECT) {
+#ifdef FEATURE_CM_ENABLE
+	if (reason == POLICY_MGR_UPDATE_REASON_STA_CONNECT ||
+	    reason == POLICY_MGR_UPDATE_REASON_LFR2_ROAM) {
 		QDF_STATUS status = QDF_STATUS_E_FAILURE;
 
-		sme_debug("Continue connect on vdev %d", session_id);
+		sme_debug("Continue connect/reassoc on vdev %d reason %d status %d cm_id 0x%x",
+			  session_id, reason, param->status, request_id);
 		if (param->status == SET_HW_MODE_STATUS_OK ||
 		    param->status == SET_HW_MODE_STATUS_ALREADY)
 			status = QDF_STATUS_SUCCESS;
@@ -283,6 +281,10 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
 		wlan_cm_hw_mode_change_resp(mac->pdev, session_id, request_id,
 					    status);
 	}
+#else
+	if (reason == POLICY_MGR_UPDATE_REASON_LFR2_ROAM)
+		csr_continue_lfr2_connect(mac, session_id);
+#endif
 
 end:
 	found = csr_nonscan_active_ll_remove_entry(mac, entry,