Răsfoiți Sursa

qcacmn: Fix CLANG warnings in Data path

implicit conversion from enumeration type 'A_STATUS' to different enumeration type 'QDF_STATUS'
implicit conversion from enumeration type 'QDF_STATUS' to different enumeration type 'A_STATUS'

CRs-Fixed: 2063344
Change-Id: Id3613d0b7fca58c3d94c5af59838b0bff3ef26de
Rakesh Pillai 7 ani în urmă
părinte
comite
13146458f9

+ 2 - 2
dp/wifi3.0/dp_htt.c

@@ -1092,8 +1092,8 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 	enum htt_t2h_msg_type msg_type;
 
 	/* check for successful message reception */
-	if (pkt->Status != A_OK) {
-		if (pkt->Status != A_ECANCELED)
+	if (pkt->Status != QDF_STATUS_SUCCESS) {
+		if (pkt->Status != QDF_STATUS_E_CANCELED)
 			soc->stats.htc_err_cnt++;
 
 		qdf_nbuf_free(htt_t2h_msg);

+ 1 - 1
hif/src/ce/ce_diag.c

@@ -396,7 +396,7 @@ QDF_STATUS hif_diag_write_mem(struct hif_opaque_softc *hif_ctx,
 	data_buf = qdf_mem_alloc_consistent(scn->qdf_dev, scn->qdf_dev->dev,
 				    orig_nbytes, &CE_data_base);
 	if (!data_buf) {
-		status = A_NO_MEMORY;
+		status = QDF_STATUS_E_NOMEM;
 		goto done;
 	}
 

+ 12 - 12
htc/htc.c

@@ -507,9 +507,9 @@ uint8_t htc_get_credit_allocation(HTC_TARGET *target, uint16_t service_id)
 	return allocation;
 }
 
-A_STATUS htc_wait_target(HTC_HANDLE HTCHandle)
+QDF_STATUS htc_wait_target(HTC_HANDLE HTCHandle)
 {
-	A_STATUS status = A_OK;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
 	HTC_READY_EX_MSG *pReadyMsg;
 	struct htc_service_connect_req connect;
@@ -526,7 +526,7 @@ A_STATUS htc_wait_target(HTC_HANDLE HTCHandle)
 	do {
 
 		status = hif_start(target->hif_dev);
-		if (A_FAILED(status)) {
+		if (QDF_IS_STATUS_ERROR(status)) {
 			AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
 					("hif_start failed\n"));
 			break;
@@ -534,14 +534,14 @@ A_STATUS htc_wait_target(HTC_HANDLE HTCHandle)
 
 		status = htc_wait_recv_ctrl_message(target);
 
-		if (A_FAILED(status))
+		if (QDF_IS_STATUS_ERROR(status))
 			break;
 
 		if (target->CtrlResponseLength < (sizeof(HTC_READY_EX_MSG))) {
 			AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
 					("Invalid HTC Ready Msg Len:%d!\n",
 					 target->CtrlResponseLength));
-			status = A_ECOMM;
+			status = QDF_STATUS_E_BADMSG;
 			break;
 		}
 
@@ -554,7 +554,7 @@ A_STATUS htc_wait_target(HTC_HANDLE HTCHandle)
 			AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
 					("Invalid HTC Ready Msg : 0x%X!\n",
 					 htc_rdy_msg_id));
-			status = A_ECOMM;
+			status = QDF_STATUS_E_BADMSG;
 			break;
 		}
 
@@ -578,7 +578,7 @@ A_STATUS htc_wait_target(HTC_HANDLE HTCHandle)
 
 		if ((0 == target->TotalTransmitCredits)
 		    || (0 == target->TargetCreditSize)) {
-			status = A_ECOMM;
+			status = QDF_STATUS_E_ABORTED;
 			break;
 		}
 
@@ -656,12 +656,12 @@ static void reset_endpoint_states(HTC_TARGET *target)
  * htc_start() - Main HTC function to trigger HTC start
  * @HTCHandle: pointer to HTC handle
  *
- * Return: A_OK for success or an appropriate A_STATUS error
+ * Return: QDF_STATUS_SUCCESS for success or an appropriate QDF_STATUS error
  */
-A_STATUS htc_start(HTC_HANDLE HTCHandle)
+QDF_STATUS htc_start(HTC_HANDLE HTCHandle)
 {
 	qdf_nbuf_t netbuf;
-	A_STATUS status = A_OK;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
 	HTC_SETUP_COMPLETE_EX_MSG *pSetupComp;
 	HTC_PACKET *pSendPacket;
@@ -678,7 +678,7 @@ A_STATUS htc_start(HTC_HANDLE HTCHandle)
 			AR_DEBUG_ASSERT(false);
 			qdf_print("%s: allocControlTxPacket failed\n",
 				  __func__);
-			status = A_NO_MEMORY;
+			status = QDF_STATUS_E_NOMEM;
 			break;
 		}
 
@@ -720,7 +720,7 @@ A_STATUS htc_start(HTC_HANDLE HTCHandle)
 				       ENDPOINT_0, HTC_SERVICE_TX_PACKET_TAG);
 
 		status = htc_send_pkt((HTC_HANDLE) target, pSendPacket);
-		if (A_FAILED(status))
+		if (QDF_IS_STATUS_ERROR(status))
 			break;
 	} while (false);
 

+ 9 - 9
htc/htc_api.h

@@ -436,7 +436,7 @@ void htc_set_credit_distribution(HTC_HANDLE HTCHandle,
  * ready.
  * Return: None
  */
-A_STATUS htc_wait_target(HTC_HANDLE HTCHandle);
+QDF_STATUS htc_wait_target(HTC_HANDLE HTCHandle);
 
 /**
  * htc_start - Start target service communications
@@ -450,7 +450,7 @@ A_STATUS htc_wait_target(HTC_HANDLE HTCHandle);
  * communicating over the endpoints.
  * Return: None
  */
-A_STATUS htc_start(HTC_HANDLE HTCHandle);
+QDF_STATUS htc_start(HTC_HANDLE HTCHandle);
 
 /**
  * htc_add_receive_pkt - Add receive packet to HTC
@@ -474,7 +474,7 @@ A_STATUS htc_add_receive_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
  * User provides callback handlersfor various endpoint events.
  * Return: None
  */
-A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
+QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 			     struct htc_service_connect_req *pReq,
 			     struct htc_service_connect_resp *pResp);
 
@@ -497,9 +497,9 @@ void htc_dump(HTC_HANDLE HTCHandle, uint8_t CmdId, bool start);
  * Caller must initialize packet using SET_HTC_PACKET_INFO_TX() macro.
  * This interface is fully asynchronous.  On error, HTC SendPkt will
  * call the registered Endpoint callback to cleanup the packet.
- * Return: A_OK
+ * Return: QDF_STATUS_SUCCESS
  */
-A_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
+QDF_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
 
 /**
  * htc_send_data_pkt - Send an HTC packet containing a tx descriptor and data
@@ -515,10 +515,10 @@ A_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
  * Return: A_OK
  */
 #ifdef ATH_11AC_TXCOMPACT
-A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf,
+QDF_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf,
 			   int Epid, int ActualLength);
 #else                           /*ATH_11AC_TXCOMPACT */
-A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
+QDF_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
 			   uint8_t more_data);
 #endif /*ATH_11AC_TXCOMPACT */
 
@@ -639,9 +639,9 @@ void htc_unblock_recv(HTC_HANDLE HTCHandle);
  * The caller may allocate the pkt queue on the stack to hold the pkts.
  * This interface is fully asynchronous.  On error, htc_send_pkts will
  * call the registered Endpoint callback to cleanup the packet.
- * Return: A_OK
+ * Return: QDF_STATUS_SUCCESS
  */
-A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
+QDF_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
 				HTC_PACKET_QUEUE *pPktQueue);
 
 /**

+ 1 - 1
htc/htc_internal.h

@@ -317,7 +317,7 @@ void htc_flush_rx_hold_queue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint);
 void htc_flush_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
 			   HTC_TX_TAG Tag);
 void htc_recv_init(HTC_TARGET *target);
-A_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target);
+QDF_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target);
 void htc_free_control_tx_packet(HTC_TARGET *target, HTC_PACKET *pPacket);
 HTC_PACKET *htc_alloc_control_tx_packet(HTC_TARGET *target);
 uint8_t htc_get_credit_allocation(HTC_TARGET *target, uint16_t service_id);

+ 1 - 1
htc/htc_packet.h

@@ -144,7 +144,7 @@ typedef struct _HTC_PACKET {
 	uint32_t BufferLength;
 	uint32_t ActualLength;
 	HTC_ENDPOINT_ID Endpoint;
-	A_STATUS Status;
+	QDF_STATUS Status;
 	union {
 		struct htc_tx_packet_info AsTx;
 		struct htc_rx_packet_info AsRx;

+ 5 - 5
htc/htc_recv.c

@@ -586,7 +586,7 @@ A_STATUS htc_add_receive_pkt_multiple(HTC_HANDLE HTCHandle,
 	if (A_FAILED(status)) {
 		/* walk through queue and mark each one canceled */
 		HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pPktQueue, pPacket) {
-			pPacket->Status = A_ECANCELED;
+			pPacket->Status = QDF_STATUS_E_CANCELED;
 		}
 		HTC_PACKET_QUEUE_ITERATE_END;
 
@@ -616,7 +616,7 @@ void htc_flush_rx_hold_queue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint)
 		if (pPacket == NULL)
 			break;
 		UNLOCK_HTC_RX(target);
-		pPacket->Status = A_ECANCELED;
+		pPacket->Status = QDF_STATUS_E_CANCELED;
 		pPacket->ActualLength = 0;
 		AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
 				("Flushing RX packet:%p, length:%d, ep:%d\n",
@@ -638,7 +638,7 @@ void htc_recv_init(HTC_TARGET *target)
 }
 
 /* polling routine to wait for a control packet to be received */
-A_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target)
+QDF_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target)
 {
 /*    int count = HTC_TARGET_MAX_RESPONSE_POLL; */
 
@@ -648,7 +648,7 @@ A_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target)
 	if (qdf_wait_single_event(&target->ctrl_response_valid,
 				  HTC_CONTROL_RX_TIMEOUT)) {
 		QDF_BUG(0);
-		return A_ERROR;
+		return QDF_STATUS_E_FAILURE;
 	}
 
 	LOCK_HTC_RX(target);
@@ -658,7 +658,7 @@ A_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target)
 	UNLOCK_HTC_RX(target);
 
 	AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-HTCWaitCtrlMessageRecv success\n"));
-	return A_OK;
+	return QDF_STATUS_SUCCESS;
 }
 
 static A_STATUS htc_process_trailer(HTC_TARGET *target,

+ 33 - 33
htc/htc_send.c

@@ -402,13 +402,13 @@ htc_issue_tx_bundle_stats_inc(HTC_TARGET *target)
 
 #if defined(HIF_USB) || defined(HIF_SDIO)
 #ifdef ENABLE_BUNDLE_TX
-static A_STATUS htc_send_bundled_netbuf(HTC_TARGET *target,
+static QDF_STATUS htc_send_bundled_netbuf(HTC_TARGET *target,
 					HTC_ENDPOINT *pEndpoint,
 					unsigned char *pBundleBuffer,
 					HTC_PACKET *pPacketTx)
 {
 	qdf_size_t data_len;
-	A_STATUS status;
+	QDF_STATUS status;
 	qdf_nbuf_t bundleBuf;
 	uint32_t data_attr = 0;
 
@@ -437,7 +437,7 @@ static A_STATUS htc_send_bundled_netbuf(HTC_TARGET *target,
 			       pEndpoint->UL_PipeID,
 			       pEndpoint->Id, data_len,
 			       bundleBuf, data_attr);
-	if (status != A_OK) {
+	if (status != QDF_STATUS_SUCCESS) {
 		qdf_print("%s:hif_send_head failed(len=%zu).\n", __func__,
 			  data_len);
 	}
@@ -590,11 +590,11 @@ static void htc_issue_packets_bundle(HTC_TARGET *target,
  *
  * Return: QDF_STATUS_SUCCESS on success and error QDF status on failure
  */
-static A_STATUS htc_issue_packets(HTC_TARGET *target,
+static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
 				  HTC_ENDPOINT *pEndpoint,
 				  HTC_PACKET_QUEUE *pPktQueue)
 {
-	A_STATUS status = A_OK;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	qdf_nbuf_t netbuf;
 	HTC_PACKET *pPacket = NULL;
 	uint16_t payloadLen;
@@ -677,7 +677,7 @@ static A_STATUS htc_issue_packets(HTC_TARGET *target,
 					AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
 						("%s nbuf Map Fail Endpnt %p\n",
 						__func__, pEndpoint));
-					status = A_ERROR;
+					status = QDF_STATUS_E_FAILURE;
 					break;
 				}
 			}
@@ -712,8 +712,8 @@ static A_STATUS htc_issue_packets(HTC_TARGET *target,
 
 		target->ce_send_cnt++;
 
-		if (qdf_unlikely(A_FAILED(status))) {
-			if (status != A_NO_RESOURCE) {
+		if (qdf_unlikely(QDF_IS_STATUS_ERROR(status))) {
+			if (status != QDF_STATUS_E_RESOURCES) {
 				/* TODO : if more than 1 endpoint maps to the
 				 * same PipeID it is possible to run out of
 				 * resources in the HIF layer. Don't emit the
@@ -749,7 +749,7 @@ static A_STATUS htc_issue_packets(HTC_TARGET *target,
 		if (pPacket->PktInfo.AsTx.Tag == HTC_TX_PACKET_TAG_RUNTIME_PUT)
 			hif_pm_runtime_put(target->hif_dev);
 	}
-	if (qdf_unlikely(A_FAILED(status))) {
+	if (qdf_unlikely(QDF_IS_STATUS_ERROR(status))) {
 		AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
 			("htc_issue_packets, failed pkt:0x%p status:%d",
 			 pPacket, status));
@@ -1311,10 +1311,10 @@ static enum HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
 			UNLOCK_HTC_TX(target);
 
 		/* send what we can */
-		result = htc_issue_packets(target, pEndpoint, &sendQueue);
-		if (result) {
+		if (htc_issue_packets(target, pEndpoint, &sendQueue)) {
 			int i;
 
+			result = HTC_SEND_QUEUE_DROP;
 			AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
 				("htc_issue_packets, failed status:%d put it back to head of callersSendQueue",
 				 result));
@@ -1442,7 +1442,7 @@ static A_STATUS htc_send_pkts_sched_queue(HTC_TARGET *target,
 
 #endif
 
-A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
+QDF_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
 				HTC_PACKET_QUEUE *pPktQueue)
 {
 	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
@@ -1463,7 +1463,7 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
 	if (NULL == pPacket) {
 		OL_ATH_HTC_PKT_ERROR_COUNT_INCR(target, GET_HTC_PKT_Q_FAIL);
 		AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-htc_send_pkts_multiple\n"));
-		return A_EINVAL;
+		return QDF_STATUS_E_INVAL;
 	}
 
 	AR_DEBUG_ASSERT(pPacket->Endpoint < ENDPOINT_MAX);
@@ -1472,7 +1472,7 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
 	if (!pEndpoint->service_id) {
 		AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("%s service_id is invalid\n",
 								__func__));
-		return A_EINVAL;
+		return QDF_STATUS_E_INVAL;
 	}
 
 #ifdef HTC_EP_STAT_PROFILING
@@ -1517,7 +1517,7 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
 			AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
 			   ("%s: nbuf map failed, endpoint %p, seq_no. %d\n",
 			   __func__, pEndpoint, pEndpoint->SeqNo));
-			return A_ERROR;
+			return status;
 		}
 
 		pPacket->PktInfo.AsTx.Flags |= HTC_TX_PACKET_FLAG_FIXUP_NETBUF;
@@ -1541,9 +1541,9 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
 			restore_tx_packet(target, pPacket);
 
 			if (HTC_STOPPING(target))
-				pPacket->Status = A_ECANCELED;
+				pPacket->Status = QDF_STATUS_E_CANCELED;
 			else
-				pPacket->Status = A_NO_RESOURCE;
+				pPacket->Status = QDF_STATUS_E_RESOURCES;
 		}
 		HTC_PACKET_QUEUE_ITERATE_END;
 
@@ -1552,16 +1552,16 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle,
 
 	AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-htc_send_pkts_multiple\n"));
 
-	return A_OK;
+	return QDF_STATUS_SUCCESS;
 }
 
 /* HTC API - htc_send_pkt */
-A_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
+QDF_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
 {
 	HTC_PACKET_QUEUE queue;
 
 	if (HTCHandle == NULL || pPacket == NULL)
-		return A_ERROR;
+		return QDF_STATUS_E_FAILURE;
 
 	AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
 			("+-htc_send_pkt: Enter endPointId: %d, buffer: %p, length: %d\n",
@@ -1578,15 +1578,15 @@ A_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
  * @netbuf: network buffer containing the data to be sent
  * @ActualLength: length of data that needs to be transmitted
  *
- * Return: A_OK for success or an appropriate A_STATUS error
+ * Return: QDF_STATUS_SUCCESS for success or an appropriate QDF_STATUS error
  */
-A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf, int Epid,
+QDF_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf, int Epid,
 			   int ActualLength)
 {
 	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
 	HTC_ENDPOINT *pEndpoint;
 	HTC_FRAME_HDR *pHtcHdr;
-	A_STATUS status = A_OK;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	int tx_resources;
 	uint32_t data_attr = 0;
 
@@ -1604,11 +1604,11 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf, int Epid,
 							  pEndpoint->UL_PipeID);
 		}
 		if (tx_resources < HTC_DATA_MINDESC_PERPACKET)
-			return A_ERROR;
+			return QDF_STATUS_E_FAILURE;
 	}
 
 	if (hif_pm_runtime_get(target->hif_dev))
-		return A_ERROR;
+		return QDF_STATUS_E_FAILURE;
 
 	pHtcHdr = (HTC_FRAME_HDR *) qdf_nbuf_get_frag_vaddr(netbuf, 0);
 	AR_DEBUG_ASSERT(pHtcHdr);
@@ -1658,9 +1658,9 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf, int Epid,
  * @pPacket: pointer to HTC_PACKET
  * @more_data: indicates whether more data is to follow
  *
- * Return: A_OK for success or an appropriate A_STATUS error
+ * Return: QDF_STATUS_SUCCESS for success or an appropriate QDF_STATUS error
  */
-A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
+QDF_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
 			   uint8_t more_data)
 {
 	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
@@ -1669,7 +1669,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
 	HTC_PACKET_QUEUE sendQueue;
 	qdf_nbuf_t netbuf = NULL;
 	int tx_resources;
-	A_STATUS status = A_OK;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	uint32_t data_attr = 0;
 
 	if (pPacket) {
@@ -1722,7 +1722,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
 		HTC_PACKET_ENQUEUE(&pEndpoint->TxQueue, pPacket);
 		if (HTC_TX_BUNDLE_ENABLED(target) && (more_data)) {
 			UNLOCK_HTC_TX(target);
-			return A_OK;
+			return QDF_STATUS_SUCCESS;
 		}
 	} else {
 		LOCK_HTC_TX(target);
@@ -1739,7 +1739,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
 		 */
 		qdf_atomic_dec(&pEndpoint->TxProcessCount);
 		UNLOCK_HTC_TX(target);
-		return A_OK;
+		return QDF_STATUS_SUCCESS;
 	}
 
 	/***** beyond this point only 1 thread may enter ******/
@@ -1836,7 +1836,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
 
 		htc_issue_tx_bundle_stats_inc(target);
 
-		if (qdf_unlikely(A_FAILED(status))) {
+		if (qdf_unlikely(QDF_IS_STATUS_ERROR(status))) {
 			LOCK_HTC_TX(target);
 			pEndpoint->ul_outstanding_cnt--;
 			/* remove this packet from the tx completion queue */
@@ -1998,7 +1998,7 @@ QDF_STATUS htc_tx_completion_handler(void *Context,
 				(HTC_PACKET_QUEUE *) pPacket->pContext;
 			HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pQueueSave,
 							      pPacketTemp) {
-				pPacket->Status = A_OK;
+				pPacket->Status = QDF_STATUS_SUCCESS;
 				send_packet_completion(target, pPacketTemp);
 			}
 			HTC_PACKET_QUEUE_ITERATE_END;
@@ -2126,7 +2126,7 @@ void htc_flush_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
 
 		if (pPacket) {
 			/* let the sender know the packet was not delivered */
-			pPacket->Status = A_ECANCELED;
+			pPacket->Status = QDF_STATUS_E_CANCELED;
 			send_packet_completion(target, pPacket);
 		}
 	}

+ 10 - 10
htc/htc_services.c

@@ -95,12 +95,12 @@ htc_alt_data_credit_size_update(HTC_TARGET *target,
 }
 #endif
 
-A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
+QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 			     struct htc_service_connect_req *pConnectReq,
 			     struct htc_service_connect_resp *pConnectResp)
 {
 	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
-	A_STATUS status = A_OK;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	HTC_PACKET *pSendPacket = NULL;
 	HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
 	HTC_CONNECT_SERVICE_MSG *pConnectMsg;
@@ -145,7 +145,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 
 			if (NULL == pSendPacket) {
 				AR_DEBUG_ASSERT(false);
-				status = A_NO_MEMORY;
+				status = QDF_STATUS_E_NOMEM;
 				break;
 			}
 
@@ -163,7 +163,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 
 			if (NULL == pConnectMsg) {
 				AR_DEBUG_ASSERT(0);
-				status = A_EFAULT;
+				status = QDF_STATUS_E_FAULT;
 				break;
 			}
 
@@ -216,12 +216,12 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 			status = htc_send_pkt((HTC_HANDLE) target, pSendPacket);
 			/* we don't own it anymore */
 			pSendPacket = NULL;
-			if (A_FAILED(status))
+			if (QDF_IS_STATUS_ERROR(status))
 				break;
 
 			/* wait for response */
 			status = htc_wait_recv_ctrl_message(target);
-			if (A_FAILED(status))
+			if (QDF_IS_STATUS_ERROR(status))
 				break;
 			/* we controlled the buffer creation so it has to be
 			 * properly aligned
@@ -259,7 +259,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 				sizeof(HTC_CONNECT_SERVICE_RESPONSE_MSG))) {
 				/* this message is not valid */
 				AR_DEBUG_ASSERT(false);
-				status = A_EPROTO;
+				status = QDF_STATUS_E_PROTO;
 				break;
 			}
 
@@ -276,7 +276,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 						(" Target failed service 0x%X connect request (status:%d)\n",
 						 rsp_msg_serv_id,
 						 rsp_msg_status));
-				status = A_EPROTO;
+				status = QDF_STATUS_E_PROTO;
 /* TODO: restore the ifdef when FW supports services 301 and 302
  * (HTT_MSG_DATA[23]_MSG_SVC)
  */
@@ -313,7 +313,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 		}
 
 		/* rest of these are parameter checks so set the error status */
-		status = A_EPROTO;
+		status = QDF_STATUS_E_PROTO;
 
 		if (assignedEndpoint >= ENDPOINT_MAX) {
 			AR_DEBUG_ASSERT(false);
@@ -364,7 +364,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
 						 &pEndpoint->DL_PipeID,
 						 &pEndpoint->ul_is_polled,
 						 &pEndpoint->dl_is_polled);
-		if (A_FAILED(status))
+		if (QDF_IS_STATUS_ERROR(status))
 			break;
 
 		htc_alt_data_credit_size_update(target,

+ 2 - 2
utils/epping/src/epping_main.c

@@ -310,7 +310,7 @@ int epping_enable(struct device *parent_dev)
 	}
 
 	/* start HIF */
-	if (htc_wait_target(pEpping_ctx->HTCHandle) != A_OK) {
+	if (htc_wait_target(pEpping_ctx->HTCHandle) != QDF_STATUS_SUCCESS) {
 		EPPING_LOG(QDF_TRACE_LEVEL_FATAL,
 			   "%s: htc_wait_target error", __func__);
 		goto error_end;
@@ -323,7 +323,7 @@ int epping_enable(struct device *parent_dev)
 			   "%s: htc_wait_targetdone", __func__);
 		goto error_end;
 	}
-	if (htc_start(pEpping_ctx->HTCHandle) != A_OK) {
+	if (htc_start(pEpping_ctx->HTCHandle) != QDF_STATUS_SUCCESS) {
 		goto error_end;
 	}
 	EPPING_LOG(QDF_TRACE_LEVEL_INFO_HIGH, "%s: HTC started", __func__);

+ 3 - 3
utils/epping/src/epping_rx.c

@@ -112,7 +112,7 @@ void epping_rx(void *ctx, HTC_PACKET *pPacket)
 	epping_context_t *pEpping_ctx = (epping_context_t *) ctx;
 	epping_adapter_t *pAdapter = pEpping_ctx->epping_adapter;
 	struct net_device *dev = pAdapter->dev;
-	A_STATUS status = pPacket->Status;
+	QDF_STATUS status = pPacket->Status;
 	HTC_ENDPOINT_ID eid = pPacket->Endpoint;
 	struct sk_buff *pktSkb = (struct sk_buff *)pPacket->pPktContext;
 
@@ -121,8 +121,8 @@ void epping_rx(void *ctx, HTC_PACKET *pPacket)
 		   __func__, pAdapter, eid, pktSkb, pPacket->pBuffer,
 		   pPacket->ActualLength, status);
 
-	if (status != A_OK) {
-		if (status != A_ECANCELED) {
+	if (status != QDF_STATUS_SUCCESS) {
+		if (status != QDF_STATUS_E_CANCELED) {
 			printk("%s: RX ERR (%d)\n", __func__, status);
 		}
 		qdf_nbuf_free(pktSkb);

+ 8 - 8
utils/epping/src/epping_tx.c

@@ -83,7 +83,7 @@ void epping_tx_dup_pkt(epping_adapter_t *pAdapter,
 	skb_len = (int)qdf_nbuf_len(new_skb);
 	/* send the packet */
 	ret = htc_send_pkt(pAdapter->pEpping_ctx->HTCHandle, &cookie->HtcPkt);
-	if (ret != A_OK) {
+	if (ret != QDF_STATUS_SUCCESS) {
 		EPPING_LOG(QDF_TRACE_LEVEL_FATAL,
 			   "%s: htc_send_pkt failed, ret = %d\n", __func__, ret);
 		epping_free_cookie(pAdapter->pEpping_ctx, cookie);
@@ -105,7 +105,7 @@ static int epping_tx_send_int(qdf_nbuf_t skb, epping_adapter_t *pAdapter)
 	HTC_ENDPOINT_ID eid = ENDPOINT_UNUSED;
 	struct epping_cookie *cookie = NULL;
 	A_UINT8 ac = 0;
-	A_STATUS ret = A_OK;
+	QDF_STATUS ret = QDF_STATUS_SUCCESS;
 	int skb_len;
 	EPPING_HEADER tmpHdr = *eppingHdr;
 
@@ -150,7 +150,7 @@ static int epping_tx_send_int(qdf_nbuf_t skb, epping_adapter_t *pAdapter)
 	/* send the packet */
 	ret = htc_send_pkt(pAdapter->pEpping_ctx->HTCHandle, &cookie->HtcPkt);
 	epping_log_packet(pAdapter, &tmpHdr, ret, __func__);
-	if (ret != A_OK) {
+	if (ret != QDF_STATUS_SUCCESS) {
 		EPPING_LOG(QDF_TRACE_LEVEL_FATAL,
 			   "%s: htc_send_pkt failed, status = %d\n", __func__,
 			   ret);
@@ -320,7 +320,7 @@ void epping_tx_complete_multiple(void *ctx, HTC_PACKET_QUEUE *pPacketQueue)
 	epping_context_t *pEpping_ctx = (epping_context_t *) ctx;
 	epping_adapter_t *pAdapter = pEpping_ctx->epping_adapter;
 	struct net_device *dev = pAdapter->dev;
-	A_STATUS status;
+	QDF_STATUS status;
 	HTC_ENDPOINT_ID eid;
 	qdf_nbuf_t pktSkb;
 	struct epping_cookie *cookie;
@@ -355,7 +355,7 @@ void epping_tx_complete_multiple(void *ctx, HTC_PACKET_QUEUE *pPacketQueue)
 			/* add this to the list, use faster non-lock API */
 			qdf_nbuf_queue_add(&skb_queue, pktSkb);
 
-			if (A_SUCCESS(status)) {
+			if (QDF_IS_STATUS_SUCCESS(status)) {
 				if (htc_pkt->ActualLength !=
 						qdf_nbuf_len(pktSkb)) {
 					EPPING_LOG(QDF_TRACE_LEVEL_ERROR,
@@ -371,12 +371,12 @@ void epping_tx_complete_multiple(void *ctx, HTC_PACKET_QUEUE *pPacketQueue)
 			   __func__, pktSkb, htc_pkt->pBuffer,
 			   htc_pkt->ActualLength, eid);
 
-		if (A_FAILED(status)) {
-			if (status == A_ECANCELED) {
+		if (QDF_IS_STATUS_ERROR(status)) {
+			if (status == QDF_STATUS_E_CANCELED) {
 				/* a packet was flushed  */
 				flushing = true;
 			}
-			if (status != A_NO_RESOURCE) {
+			if (status != QDF_STATUS_E_RESOURCES) {
 				printk("%s() -TX ERROR, status: 0x%x\n",
 				       __func__, status);
 			}

+ 4 - 4
utils/pktlog/pktlog_ac.c

@@ -755,8 +755,8 @@ static void pktlog_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 	uint32_t *msg_word;
 
 	/* check for successful message reception */
-	if (pkt->Status != A_OK) {
-		if (pkt->Status != A_ECANCELED)
+	if (pkt->Status != QDF_STATUS_SUCCESS) {
+		if (pkt->Status != QDF_STATUS_E_CANCELED)
 			pdev->htc_err_cnt++;
 		qdf_nbuf_free(pktlog_t2h_msg);
 		return;
@@ -818,7 +818,7 @@ static int pktlog_htc_connect_service(struct ol_pktlog_dev_t *pdev)
 {
 	struct htc_service_connect_req connect;
 	struct htc_service_connect_resp response;
-	A_STATUS status;
+	QDF_STATUS status;
 
 	qdf_mem_set(&connect, sizeof(connect), 0);
 	qdf_mem_set(&response, sizeof(response), 0);
@@ -851,7 +851,7 @@ static int pktlog_htc_connect_service(struct ol_pktlog_dev_t *pdev)
 
 	status = htc_connect_service(pdev->htc_pdev, &connect, &response);
 
-	if (status != A_OK) {
+	if (status != QDF_STATUS_SUCCESS) {
 		pdev->mt_pktlog_enabled = false;
 		return -EIO;       /* failure */
 	}

+ 3 - 5
wmi/src/wmi_unified.c

@@ -1927,7 +1927,7 @@ QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf,
 				uint32_t len, uint32_t cmd_id)
 {
 	HTC_PACKET *pkt;
-	A_STATUS status;
+	QDF_STATUS status;
 	uint16_t htc_tag = 0;
 
 	if (wmi_get_runtime_pm_inprogress(wmi_handle)) {
@@ -2024,15 +2024,13 @@ QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf,
 
 	status = htc_send_pkt(wmi_handle->htc_handle, pkt);
 
-	if (A_OK != status) {
+	if (QDF_STATUS_SUCCESS != status) {
 		qdf_atomic_dec(&wmi_handle->pending_cmds);
 		QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR,
 		   "%s %d, htc_send_pkt failed", __func__, __LINE__);
 		qdf_mem_free(pkt);
-
+		return status;
 	}
-	if (status)
-		return QDF_STATUS_E_FAILURE;
 
 	return QDF_STATUS_SUCCESS;
 }