Эх сурвалжийг харах

qcacld-3.0: Remove tdls set state cnt

Remove tdls set state cnt check before sending
fw tdls state update. Fw state updates could be for
multiple vdev's set state cnt check works for only
single vdev.

Change-Id: Id154e623a03e65a99f27360c33b261209ac2e754
CRs-Fixed: 3483291
sandhu 1 жил өмнө
parent
commit
d03f075f36

+ 4 - 6
components/tdls/core/src/wlan_tdls_ct.c

@@ -1455,13 +1455,11 @@ void tdls_disable_offchan_and_teardown_links(
 		tdls_in_progress = true;
 
 	if (!(connected_tdls_peers || tdls_in_progress)) {
-		tdls_debug("No TDLS connected/progress peers to delete");
 		vdev_id = vdev->vdev_objmgr.vdev_id;
-		if (tdls_soc->set_state_info.set_state_cnt > 0) {
-			tdls_debug("Disable the tdls in FW as second interface is coming up");
-			tdls_send_update_to_fw(tdls_vdev, tdls_soc, true,
-					       true, false, vdev_id);
-		}
+		tdls_debug("No TDLS connected/progress peers to delete Disable tdls for vdev id %d, "
+			   "FW as second interface is coming up", vdev_id);
+		tdls_send_update_to_fw(tdls_vdev, tdls_soc, true, true, false,
+				       vdev_id);
 		return;
 	}
 

+ 1 - 26
components/tdls/core/src/wlan_tdls_main.c

@@ -1335,7 +1335,6 @@ void tdls_send_update_to_fw(struct tdls_vdev_priv_obj *tdls_vdev_obj,
 	struct tdls_config_params *threshold_params;
 	uint32_t tdls_feature_flags;
 	QDF_STATUS status;
-	uint8_t set_state_cnt;
 	bool tdls_mlo;
 
 	tdls_feature_flags = tdls_soc_obj->tdls_configs.tdls_feature_flags;
@@ -1344,21 +1343,8 @@ void tdls_send_update_to_fw(struct tdls_vdev_priv_obj *tdls_vdev_obj,
 		return;
 	}
 
-	set_state_cnt = tdls_soc_obj->set_state_info.set_state_cnt;
 	tdls_mlo = wlan_tdls_is_fw_11be_mlo_capable(tdls_soc_obj->soc);
 
-	/* for mld tdls, it needs to set the second vdev,
-	 * set set_state_cnt to 0 to bypass the following check.
-	 */
-	if (tdls_mlo && sta_connect_event && set_state_cnt == 1)
-		set_state_cnt = 0;
-
-	if ((set_state_cnt == 0 && !sta_connect_event) ||
-	    (set_state_cnt && sta_connect_event)) {
-		tdls_debug("FW TDLS state is already in requested state");
-		return;
-	}
-
 	/* If AP or caller indicated TDLS Prohibited then disable tdls mode */
 	if (sta_connect_event) {
 		if (tdls_prohibited) {
@@ -1435,26 +1421,15 @@ void tdls_send_update_to_fw(struct tdls_vdev_priv_obj *tdls_vdev_obj,
 	tdls_info_to_fw->tdls_discovery_wake_timeout =
 		tdls_soc_obj->tdls_configs.tdls_discovery_wake_timeout;
 
-	/**
-	 * set_state_cnt should always decrement in case of sta disconnection.
-	 * If it is not, then in case where STA disconnection happens due to
-	 * SSR where tdls_update_fw_tdls_state() will return failure,
-	 * tdls count has to be decremented irrepective of success or failure
-	 */
-	if (!sta_connect_event)
-		tdls_soc_obj->set_state_info.set_state_cnt--;
-
 	status = tgt_tdls_set_fw_state(tdls_soc_obj->soc, tdls_info_to_fw);
 	if (QDF_IS_STATUS_ERROR(status))
 		goto done;
 
 	if (sta_connect_event) {
-		tdls_soc_obj->set_state_info.set_state_cnt++;
 		tdls_soc_obj->set_state_info.vdev_id = session_id;
 	}
 
-	tdls_debug("TDLS Set state cnt %d",
-		tdls_soc_obj->set_state_info.set_state_cnt);
+	tdls_debug("FW tdls state sent for vdev id %d", session_id);
 done:
 	qdf_mem_free(tdls_info_to_fw);
 	return;

+ 1 - 8
components/tdls/core/src/wlan_tdls_main.h

@@ -134,17 +134,10 @@ struct tdls_conn_tracker_mac_table {
 };
 
 /**
- * struct tdls_set_state_info - to record set tdls state command, we need to
- * set correct tdls state to firmware:
- * 1. enable tdls in firmware before tdls connection;
- * 2. disable tdls if concurrency happen, before disable tdls, all active peer
- * should be deleted in firmware.
- *
- * @set_state_cnt: tdls set state count
+ * struct tdls_set_state_info - vdev id state info
  * @vdev_id: vdev id of last set state command
  */
 struct tdls_set_state_info {
-	uint8_t set_state_cnt;
 	uint8_t vdev_id;
 };