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

qcacld-3.0: Fix sap_num_connected_sta leak

When SAP stop and ref-STA reconnect event hit together, the reconnect
IPA client connect event add sap_num_connected_sta but SAP stop process
clear client STA without send IPA client disconnect event.

Fix it by moving hdd_ipa_wlan_evt into hdd_softap_deregister_sta which
will also been called when sap stopped.

Change-Id: I7abe53e8e395c01df5471697f3370d8b5ae792fb
CRs-Fixed: 2136199
Will Huang 7 жил өмнө
parent
commit
ac3fd9a04c

+ 0 - 13
core/hdd/src/wlan_hdd_hostapd.c

@@ -2190,20 +2190,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 			hdd_err("Failed to find sta id status: %d", qdf_status);
 			return QDF_STATUS_E_FAILURE;
 		}
-#ifdef IPA_OFFLOAD
-		if (hdd_ipa_is_enabled(hdd_ctx)) {
-			status = hdd_ipa_wlan_evt(adapter, staId,
-					HDD_IPA_CLIENT_DISCONNECT,
-					pSapEvent->sapevt.
-					sapStationDisassocCompleteEvent.
-					staMac.bytes);
 
-			if (status) {
-				hdd_err("WLAN_CLIENT_DISCONNECT event failed");
-				goto stopbss;
-			}
-		}
-#endif
 		DPTRACE(qdf_dp_trace_mgmt_pkt(QDF_DP_TRACE_MGMT_PACKET_RECORD,
 			adapter->session_id,
 			QDF_TRACE_DEFAULT_PDEV_ID,

+ 7 - 0
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -861,6 +861,13 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter,
 			adapter->sta_info[staId].sta_mac.bytes);
 
 	if (adapter->sta_info[staId].in_use) {
+		if (hdd_ipa_uc_is_enabled(hdd_ctx)) {
+			hdd_ipa_wlan_evt(adapter,
+					 adapter->sta_info[staId].sta_id,
+					 HDD_IPA_CLIENT_DISCONNECT,
+					 adapter->sta_info[staId].sta_mac.
+					 bytes);
+		}
 		spin_lock_bh(&adapter->sta_info_lock);
 		qdf_mem_zero(&adapter->sta_info[staId],
 			     sizeof(struct hdd_station_info));