소스 검색

Revert "qcacmn: Free NDI peers/vdev at time of ndi_delete/driver unload"

This reverts commit I04631ffd611d6ded318ddfb65b2dfeba479c9bdc.
Currently, for all the peers cleanup is done in lim and wma layers
to remove this peers. The original change is deleting the ndi
peer in HDD, and can lead to memory overwrites.
Hence reverting the change.

Change-Id: Id0083c3d1612f0fdccb6fca2c9cc4c03f607a139
CRs-Fixed: 2507142
Bala Venkatesh 5 년 전
부모
커밋
8cd7d0b72a
1개의 변경된 파일2개의 추가작업 그리고 46개의 파일을 삭제
  1. 2 46
      nan/core/src/nan_api.c

+ 2 - 46
nan/core/src/nan_api.c

@@ -64,43 +64,6 @@ nan_psoc_notif_failed:
 	return status;
 }
 
-static void nan_psoc_delete_peer(struct wlan_objmgr_psoc *psoc,
-				 void *peer, void *arg)
-{
-	if (WLAN_PEER_NDP == wlan_peer_get_peer_type(peer))
-		wlan_objmgr_peer_obj_delete(peer);
-}
-
-static void nan_psoc_delete_vdev(struct wlan_objmgr_psoc *psoc,
-				 void *vdev, void *arg)
-{
-	enum nan_datapath_state state;
-	struct nan_vdev_priv_obj *priv_obj = nan_get_vdev_priv_obj(vdev);
-
-	if (!priv_obj) {
-		nan_err("priv_obj is null");
-		return;
-	}
-	/*
-	 * user may issue rrmod wlan without explicitly NDI Delete.
-	 * In that case pending NDI vdev state will not be DELETED/DELETEING
-	 * Forcefully delete vdev object
-	 */
-	if (QDF_NDI_MODE != wlan_vdev_mlme_get_opmode(vdev))
-		return;
-
-	qdf_spin_lock_bh(&priv_obj->lock);
-	state = priv_obj->state;
-	qdf_spin_unlock_bh(&priv_obj->lock);
-
-	/* if already in deleted or deleting state - do not delete */
-	if (state == NAN_DATA_NDI_DELETED_STATE ||
-	    state == NAN_DATA_NDI_DELETING_STATE)
-		return;
-
-	wlan_objmgr_vdev_obj_delete(vdev);
-}
-
 static QDF_STATUS nan_psoc_obj_destroyed_notification(
 				struct wlan_objmgr_psoc *psoc, void *arg_list)
 {
@@ -113,15 +76,8 @@ static QDF_STATUS nan_psoc_obj_destroyed_notification(
 		return QDF_STATUS_E_FAULT;
 	}
 
-	wlan_objmgr_iterate_obj_list(psoc, WLAN_PEER_OP,
-				     nan_psoc_delete_peer,
-				     NULL, 1, WLAN_NAN_ID);
-
-	wlan_objmgr_iterate_obj_list(psoc, WLAN_VDEV_OP,
-				     nan_psoc_delete_vdev,
-				     NULL, 1, WLAN_NAN_ID);
-
-	status = wlan_objmgr_psoc_component_obj_detach(psoc, WLAN_UMAC_COMP_NAN,
+	status = wlan_objmgr_psoc_component_obj_detach(psoc,
+						       WLAN_UMAC_COMP_NAN,
 						       nan_obj);
 	if (QDF_IS_STATUS_ERROR(status))
 		nan_err("nan_obj detach failed");