فهرست منبع

qcacld-3.0: Modify HDD pdev destroy API to return OS status

HDD APIs should return native OS return code hence modify
hdd_release_and_destroy_pdev() to return native OS return code

Change-Id: I61457272c297e5fdaf36b459e002b2143ecd4d89
CRs-Fixed: 1111433
Rajeev Kumar 8 سال پیش
والد
کامیت
ecf87ff235
3فایلهای تغییر یافته به همراه7 افزوده شده و 9 حذف شده
  1. 2 2
      core/hdd/src/wlan_hdd_main.c
  2. 3 5
      core/hdd/src/wlan_hdd_object_manager.c
  3. 2 2
      core/hdd/src/wlan_hdd_object_manager.h

+ 2 - 2
core/hdd/src/wlan_hdd_main.c

@@ -8033,8 +8033,8 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx)
 		QDF_ASSERT(0);
 	}
 
-	qdf_status = hdd_release_and_destroy_pdev(hdd_ctx);
-	if (QDF_IS_STATUS_ERROR(qdf_status))
+	ret = hdd_release_and_destroy_pdev(hdd_ctx);
+	if (ret)
 		hdd_err("Pdev delete failed");
 
 	ret = hdd_release_and_destroy_psoc(hdd_ctx);

+ 3 - 5
core/hdd/src/wlan_hdd_object_manager.c

@@ -76,17 +76,15 @@ int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx)
 	return 0;
 }
 
-QDF_STATUS hdd_release_and_destroy_pdev(hdd_context_t *hdd_ctx)
+int hdd_release_and_destroy_pdev(hdd_context_t *hdd_ctx)
 {
 	struct wlan_objmgr_pdev *pdev = hdd_ctx->hdd_pdev;
 
 	hdd_ctx->hdd_pdev = NULL;
 	if (!pdev)
-		return QDF_STATUS_E_FAILURE;
-
-	wlan_objmgr_pdev_obj_delete(pdev);
+		return -EINVAL;
 
-	return QDF_STATUS_SUCCESS;
+	return qdf_status_to_os_return(wlan_objmgr_pdev_obj_delete(pdev));
 }
 
 QDF_STATUS hdd_create_and_store_vdev(struct wlan_objmgr_pdev *pdev,

+ 2 - 2
core/hdd/src/wlan_hdd_object_manager.h

@@ -101,9 +101,9 @@ int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx);
  *
  * This API deletes pdev object and release its reference from hdd context
  *
- * Return: QDF_STATUS
+ * Return: 0 for success, negative error code for failure
  */
-QDF_STATUS hdd_release_and_destroy_pdev(hdd_context_t *hdd_ctx);
+int hdd_release_and_destroy_pdev(hdd_context_t *hdd_ctx);
 
 /**
  * hdd_create_and_store_vdev() - Create vdev object and store in hdd adapter