Переглянути джерело

qcacld-3.0: Remove EOK from BMI

EOK is a legacy definition and frequently misused. Remove references to
it from BMI.

Change-Id: I38455eca00a6c1f3ffe25635019677708e312f92
CRs-Fixed: 2404901
Dustin Brown 6 роки тому
батько
коміт
cda29b5091
2 змінених файлів з 19 додано та 19 видалено
  1. 14 14
      core/bmi/src/ol_fw.c
  2. 5 5
      core/bmi/src/ol_fw_common.c

+ 14 - 14
core/bmi/src/ol_fw.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -172,7 +172,7 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, enum ATH_BIN_FILE file,
 		       uint32_t address, bool compressed)
 {
 	struct hif_opaque_softc *scn = ol_ctx->scn;
-	int status = EOK;
+	int status = 0;
 	const char *filename;
 	const struct firmware *fw_entry;
 	uint32_t fw_entry_size;
@@ -405,7 +405,7 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, enum ATH_BIN_FILE file,
 					board_data_size),
 					board_ext_data_size, ol_ctx);
 
-			if (status != EOK)
+			if (status)
 				goto end;
 
 			/* Record extended board Data initialized */
@@ -439,7 +439,7 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, enum ATH_BIN_FILE file,
 			status = bmi_sign_stream_start(address,
 						(uint8_t *)fw_entry->data,
 						bin_off, ol_ctx);
-			if (status != EOK) {
+			if (status) {
 				BMI_ERR("unable to start sign stream");
 				status = -EINVAL;
 				goto end;
@@ -485,7 +485,7 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, enum ATH_BIN_FILE file,
 			status = bmi_sign_stream_start(0,
 					(uint8_t *)fw_entry->data +
 					bin_off, bin_len, ol_ctx);
-			if (status != EOK)
+			if (status)
 				BMI_ERR("sign stream error");
 		}
 	}
@@ -505,7 +505,7 @@ release_fw:
 		}
 	}
 
-	if (status != EOK)
+	if (status)
 		BMI_ERR("%s, BMI operation failed: %d", __func__, __LINE__);
 	else
 		BMI_INFO("transferring file: %s size %d bytes done!",
@@ -1362,7 +1362,7 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
 						address, false);
 	}
 
-	if (status == EOK) {
+	if (!status) {
 		/* Record the fact that Board Data is initialized */
 		param = 1;
 		bmi_write_memory(
@@ -1379,7 +1379,7 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
 		status = ol_transfer_bin_file(ol_ctx, ATH_OTP_FILE,
 					      address, true);
 		/* Execute the OTP code only if entry found and downloaded */
-		if (status == EOK) {
+		if (!status) {
 			uint16_t board_id = 0xffff;
 			/* get board id */
 			param = 0x10;
@@ -1405,7 +1405,7 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
 
 		/* Flash is either not available or invalid */
 		if (ol_transfer_bin_file(ol_ctx, ATH_BOARD_DATA_FILE,
-					 address, false) != EOK) {
+					 address, false)) {
 			return QDF_STATUS_E_FAILURE;
 		}
 
@@ -1420,8 +1420,8 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
 		bmi_execute(address, &param, ol_ctx);
 	}
 
-	if (ol_transfer_bin_file(ol_ctx, ATH_SETUP_FILE,
-		BMI_SEGMENTED_WRITE_ADDR, true) == EOK) {
+	if (!ol_transfer_bin_file(ol_ctx, ATH_SETUP_FILE,
+				  BMI_SEGMENTED_WRITE_ADDR, true)) {
 		param = 0;
 		bmi_execute(address, &param, ol_ctx);
 	}
@@ -1431,14 +1431,14 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
 	 */
 	address = BMI_SEGMENTED_WRITE_ADDR;
 	if (ol_transfer_bin_file(ol_ctx, ATH_FIRMWARE_FILE,
-				address, true) != EOK) {
+				 address, true)) {
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	/* Apply the patches */
 	if (ol_check_dataset_patch(scn, &address)) {
-		if ((ol_transfer_bin_file(ol_ctx, ATH_PATCH_FILE, address,
-					  false)) != EOK) {
+		if (ol_transfer_bin_file(ol_ctx, ATH_PATCH_FILE, address,
+					 false)) {
 			return QDF_STATUS_E_FAILURE;
 		}
 		bmi_write_memory(hif_hia_item_address(target_type,

+ 5 - 5
core/bmi/src/ol_fw_common.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -105,7 +105,7 @@ QDF_STATUS ol_sdio_extra_initialization(struct ol_context *ol_ctx)
 	status = hif_get_config_item(scn,
 				HIF_DEVICE_GET_BLOCK_SIZE,
 				blocksizes, sizeof(blocksizes));
-	if (status != EOK) {
+	if (status) {
 		BMI_ERR("Failed to get block size info from HIF layer");
 		goto exit;
 	}
@@ -123,7 +123,7 @@ QDF_STATUS ol_sdio_extra_initialization(struct ol_context *ol_ctx)
 				4,
 				ol_ctx);
 
-	if (status != EOK) {
+	if (status) {
 		BMI_ERR("BMIWriteMemory for IO block size failed");
 		goto exit;
 	}
@@ -138,7 +138,7 @@ QDF_STATUS ol_sdio_extra_initialization(struct ol_context *ol_ctx)
 				4,
 				ol_ctx);
 
-		if (status != EOK) {
+		if (status) {
 			BMI_ERR("BMI write for yield limit failed\n");
 			goto exit;
 		}
@@ -150,7 +150,7 @@ QDF_STATUS ol_sdio_extra_initialization(struct ol_context *ol_ctx)
 			(uint8_t *)&param,
 			4,
 			ol_ctx);
-	if (status != EOK) {
+	if (status) {
 		BMI_ERR("BMIReadMemory for hi_acs_flags failed");
 		goto exit;
 	}