Browse Source

qcacld-3.0: Reset fw_peer_count for HO failure during del BSS

Currently fw_peer_count for HO failure is done in wma_roam_ho_fail_handler
which can lead to improper reset of the fw_peer_count if a HDD triggered
disassoc is in progress for the same peer leading to fw_peer_count going
to -1.

Reset the fw_peer_count for HO failure case in wma_delete_bss_ho_fail
API as this is called from the CSR/LIM for handling HO failure as
part of CSR disconnect.

Change-Id: I1526757b085086ca51eef9b9cca0ea757ed20b61
CRs-Fixed: 2266337
Vignesh Viswanathan 6 years ago
parent
commit
ba40f4b509
2 changed files with 5 additions and 9 deletions
  1. 5 0
      core/wma/src/wma_dev_if.c
  2. 0 9
      core/wma/src/wma_scan_roam.c

+ 5 - 0
core/wma/src/wma_dev_if.c

@@ -5677,6 +5677,11 @@ void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params)
 							params->bssid);
 	}
 	iface->peer_count--;
+
+	WMA_LOGD("%s: Reset FW peer count", __func__);
+	qdf_atomic_init(&iface->fw_peer_count);
+	qdf_event_set(&iface->fw_peer_delete_completion);
+
 	WMA_LOGI("%s: Removed peer %pK with peer_addr %pM vdevid %d peer_count %d",
 		 __func__, peer, params->bssid,  params->smesessionId,
 		 iface->peer_count);

+ 0 - 9
core/wma/src/wma_scan_roam.c

@@ -2870,19 +2870,10 @@ int wma_rssi_breached_event_handler(void *handle,
  */
 static void wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id)
 {
-	struct wma_txrx_node *iface = &wma->interfaces[vdev_id];
 	tSirSmeHOFailureInd *ho_failure_ind;
 	struct scheduler_msg sme_msg = { 0 };
 	QDF_STATUS qdf_status;
 
-	/* For LFR 3.0 hand-off failure, peers will be deleted by FW
-	 * no WMI_PEER_DELETE_CMDID will be sent to FW
-	 * reset the peer count here
-	 */
-	WMA_LOGD("Reset FW peer count");
-	qdf_atomic_init(&iface->fw_peer_count);
-	qdf_event_set(&iface->fw_peer_delete_completion);
-
 	ho_failure_ind = qdf_mem_malloc(sizeof(tSirSmeHOFailureInd));
 
 	if (NULL == ho_failure_ind) {