Pārlūkot izejas kodu

qcacld-3.0: Avoid twice stop adapter/close adpater for pre cac

Currently, during del_virtual_iface if adapter is of type SAP
and cac is active, then host schedules a work which stop and
close adapter and in same context it again stop /close_Adapter.

As a part of this fix, avoid stop / close adapter if cac is
in progress.

Change-Id: I68a53b3b67f4a0222a35c15a3d4a9574dd3a9e90
CRs-Fixed: 2027509
Mukul Sharma 8 gadi atpakaļ
vecāks
revīzija
24699bd2a8
1 mainītis faili ar 9 papildinājumiem un 10 dzēšanām
  1. 9 10
      core/hdd/src/wlan_hdd_p2p.c

+ 9 - 10
core/hdd/src/wlan_hdd_p2p.c

@@ -2436,24 +2436,23 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
 	if (0 != status)
 		return status;
 
-	/*
-	 * check state machine state and kickstart modules if they are closed.
-	 */
+	/* check state machine state and kickstart modules if they are closed */
 	status = hdd_wlan_start_modules(pHddCtx, pVirtAdapter, false);
 	if (status)
 		return status;
 
-	wlan_hdd_release_intf_addr(pHddCtx,
-				   pVirtAdapter->macAddressCurrent.bytes);
-
-	if ((pVirtAdapter->device_mode == QDF_SAP_MODE) &&
-		wlan_sap_is_pre_cac_active(pHddCtx->hHal)) {
+	if (pVirtAdapter->device_mode == QDF_SAP_MODE &&
+	    wlan_sap_is_pre_cac_active(pHddCtx->hHal)) {
 		hdd_clean_up_pre_cac_interface(pHddCtx);
+	} else {
+		wlan_hdd_release_intf_addr(pHddCtx,
+					 pVirtAdapter->macAddressCurrent.bytes);
+		hdd_stop_adapter(pHddCtx, pVirtAdapter, true);
+		hdd_close_adapter(pHddCtx, pVirtAdapter, true);
 	}
 
-	hdd_stop_adapter(pHddCtx, pVirtAdapter, true);
-	hdd_close_adapter(pHddCtx, pVirtAdapter, true);
 	EXIT();
+
 	return 0;
 }