Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29573d96 authored by Houston Hoffman's avatar Houston Hoffman Committed by Akash Patel
Browse files

qcacld-3.0: Replace EndPoint with endpoint

This change also changes EndPointStats to endpoint_stats.

Change-Id: I88509901b0d15a59f35633dccbe7ca0b5f7b3b76
CRs-Fixed: 935297
parent 565aa509
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1168,7 +1168,7 @@ void hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
			 * htt_h2t_rx_ring_cfg_msg_ll() have already been
			 * freed in htt_htc_misc_pkt_pool_free() in
			 * wlantl_close(), so do not free them here again
			 * by checking whether it's the EndPoint
			 * by checking whether it's the endpoint
			 * which they are queued in.
			 */
			if (id == hif_state->scn->htc_endpoint)
+7 −7
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ HTC_HANDLE htc_create(void *ol_sc, HTC_INIT_INFO *pInfo, cdf_device_t osdev)
		target->hif_dev = ol_sc;

		/* Get HIF default pipe for HTC message exchange */
		pEndpoint = &target->EndPoint[ENDPOINT_0];
		pEndpoint = &target->endpoint[ENDPOINT_0];

		hif_post_init(target->hif_dev, target, &htcCallbacks);
		hif_get_default_pipe(target->hif_dev, &pEndpoint->UL_PipeID,
@@ -516,7 +516,7 @@ static void reset_endpoint_states(HTC_TARGET *target)
	int i;

	for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) {
		pEndpoint = &target->EndPoint[i];
		pEndpoint = &target->endpoint[i];
		pEndpoint->ServiceID = 0;
		pEndpoint->MaxMsgLength = 0;
		pEndpoint->MaxTxQueueDepth = 0;
@@ -616,7 +616,7 @@ void htc_flush_surprise_remove(HTC_HANDLE HTCHandle)

	/* cleanup endpoints */
	for (i = 0; i < ENDPOINT_MAX; i++) {
		pEndpoint = &target->EndPoint[i];
		pEndpoint = &target->endpoint[i];
		htc_flush_rx_hold_queue(target, pEndpoint);
		htc_flush_endpoint_tx(target, pEndpoint, HTC_TX_PACKET_TAG_ALL);
	}
@@ -652,7 +652,7 @@ void htc_stop(HTC_HANDLE HTCHandle)

	/* cleanup endpoints */
	for (i = 0; i < ENDPOINT_MAX; i++) {
		pEndpoint = &target->EndPoint[i];
		pEndpoint = &target->endpoint[i];
		htc_flush_rx_hold_queue(target, pEndpoint);
		htc_flush_endpoint_tx(target, pEndpoint, HTC_TX_PACKET_TAG_ALL);
		if (pEndpoint->ul_is_polled) {
@@ -691,7 +691,7 @@ void htc_dump_credit_states(HTC_HANDLE HTCHandle)
	int i;

	for (i = 0; i < ENDPOINT_MAX; i++) {
		pEndpoint = &target->EndPoint[i];
		pEndpoint = &target->endpoint[i];
		if (0 == pEndpoint->ServiceID) {
			continue;
		}
@@ -749,13 +749,13 @@ A_BOOL htc_get_endpoint_statistics(HTC_HANDLE HTCHandle,
	if (sample) {
		A_ASSERT(pStats != NULL);
		/* return the stats to the caller */
		A_MEMCPY(pStats, &target->EndPoint[Endpoint].EndPointStats,
		A_MEMCPY(pStats, &target->endpoint[Endpoint].endpoint_stats,
			 sizeof(HTC_ENDPOINT_STATS));
	}

	if (clearStats) {
		/* reset stats */
		A_MEMZERO(&target->EndPoint[Endpoint].EndPointStats,
		A_MEMZERO(&target->endpoint[Endpoint].endpoint_stats,
			  sizeof(HTC_ENDPOINT_STATS));
	}

+4 −4
Original line number Diff line number Diff line
@@ -123,13 +123,13 @@ typedef struct _HTC_ENDPOINT {
	int TxCreditSize;               /* size in bytes of each credit (set by HTC) */
	int TxCreditsPerMaxMsg;         /* credits required per max message (precalculated) */
#ifdef HTC_EP_STAT_PROFILING
	HTC_ENDPOINT_STATS EndPointStats;               /* endpoint statistics */
	HTC_ENDPOINT_STATS endpoint_stats;     /* endpoint statistics */
#endif
	A_BOOL TxCreditFlowEnabled;
} HTC_ENDPOINT;

#ifdef HTC_EP_STAT_PROFILING
#define INC_HTC_EP_STAT(p,stat,count) (p)->EndPointStats.stat += (count);
#define INC_HTC_EP_STAT(p, stat, count) ((p)->endpoint_stats.stat += (count))
#else
#define INC_HTC_EP_STAT(p, stat, count)
#endif
@@ -150,7 +150,7 @@ enum ol_ath_htc_pkt_ecodes {
/* our HTC target state */
typedef struct _HTC_TARGET {
	struct ol_softc *hif_dev;
	HTC_ENDPOINT EndPoint[ENDPOINT_MAX];
	HTC_ENDPOINT endpoint[ENDPOINT_MAX];
	cdf_spinlock_t HTCLock;
	cdf_spinlock_t HTCRxLock;
	cdf_spinlock_t HTCTxLock;
+3 −3
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ void htc_disable_recv(HTC_HANDLE HTCHandle)
int htc_get_num_recv_buffers(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint)
{
	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
	HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
	HTC_ENDPOINT *pEndpoint = &target->endpoint[Endpoint];
	return HTC_PACKET_QUEUE_DEPTH(&pEndpoint->RxBufferHoldQueue);
}

@@ -315,7 +315,7 @@ CDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf,
			break;
		}

		pEndpoint = &target->EndPoint[htc_ep_id];
		pEndpoint = &target->endpoint[htc_ep_id];

		/*
		 * If this endpoint that received a message from the target has
@@ -531,7 +531,7 @@ A_STATUS htc_add_receive_pkt_multiple(HTC_HANDLE HTCHandle,
			 HTC_PACKET_QUEUE_DEPTH(pPktQueue),
			 pFirstPacket->BufferLength));

	pEndpoint = &target->EndPoint[pFirstPacket->Endpoint];
	pEndpoint = &target->endpoint[pFirstPacket->Endpoint];

	LOCK_HTC_RX(target);

+13 −13
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credits
	*credits = 0;
	LOCK_HTC_TX(target);
	for (i = 0; i < ENDPOINT_MAX; i++) {
		pEndpoint = &target->EndPoint[i];
		pEndpoint = &target->endpoint[i];
		if (pEndpoint->ServiceID == WMI_CONTROL_SVC) {
			*credits = pEndpoint->TxCredits;
			break;
@@ -185,7 +185,7 @@ static void do_send_completion(HTC_ENDPOINT *pEndpoint,

static void send_packet_completion(HTC_TARGET *target, HTC_PACKET *pPacket)
{
	HTC_ENDPOINT *pEndpoint = &target->EndPoint[pPacket->Endpoint];
	HTC_ENDPOINT *pEndpoint = &target->endpoint[pPacket->Endpoint];
	HTC_PACKET_QUEUE container;

	restore_tx_packet(target, pPacket);
@@ -1034,7 +1034,7 @@ static A_UINT16 htc_send_pkts_sched_check(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID
	}

	for (eid = ENDPOINT_2; eid <= ENDPOINT_5; eid++) {
		pEndpoint = &target->EndPoint[eid];
		pEndpoint = &target->endpoint[eid];
		pTxQueue = &pEndpoint->TxQueue;

		if (HTC_QUEUE_EMPTY(pTxQueue)) {
@@ -1068,7 +1068,7 @@ static A_STATUS htc_send_pkts_sched_queue(HTC_TARGET *target,
	HTC_PACKET *pPacket;
	int goodPkts;

	pEndpoint = &target->EndPoint[eid];
	pEndpoint = &target->endpoint[eid];
	pTxQueue = &pEndpoint->TxQueue;

	LOCK_HTC_TX(target);
@@ -1133,7 +1133,7 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu
	}

	AR_DEBUG_ASSERT(pPacket->Endpoint < ENDPOINT_MAX);
	pEndpoint = &target->EndPoint[pPacket->Endpoint];
	pEndpoint = &target->endpoint[pPacket->Endpoint];

	if (!pEndpoint->ServiceID) {
		AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("%s ServiceID is invalid\n",
@@ -1246,7 +1246,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, cdf_nbuf_t netbuf, int Epid,
	int tx_resources;
	uint32_t data_attr = 0;

	pEndpoint = &target->EndPoint[Epid];
	pEndpoint = &target->endpoint[Epid];

	tx_resources =
		hif_get_free_queue_number(target->hif_dev, pEndpoint->UL_PipeID);
@@ -1320,7 +1320,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,

	if (pPacket) {
		AR_DEBUG_ASSERT(pPacket->Endpoint < ENDPOINT_MAX);
		pEndpoint = &target->EndPoint[pPacket->Endpoint];
		pEndpoint = &target->endpoint[pPacket->Endpoint];

		/* add HTC_FRAME_HDR in the initial fragment */
		netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket);
@@ -1372,7 +1372,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
#endif
	} else {
		LOCK_HTC_TX(target);
		pEndpoint = &target->EndPoint[1];
		pEndpoint = &target->endpoint[1];
	}

	/* increment tx processing count on entry */
@@ -1597,7 +1597,7 @@ CDF_STATUS htc_tx_completion_handler(void *Context,
	A_UINT16 resourcesMax;
#endif

	pEndpoint = &target->EndPoint[EpID];
	pEndpoint = &target->endpoint[EpID];
	target->TX_comp_cnt++;

	do {
@@ -1647,7 +1647,7 @@ void htc_tx_resource_avail_handler(void *context, A_UINT8 pipeID)
	HTC_ENDPOINT *pEndpoint = NULL;

	for (i = 0; i < ENDPOINT_MAX; i++) {
		pEndpoint = &target->EndPoint[i];
		pEndpoint = &target->endpoint[i];
		if (pEndpoint->ServiceID != 0) {
			if (pEndpoint->UL_PipeID == pipeID) {
				break;
@@ -1693,7 +1693,7 @@ void htc_flush_endpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint,
			HTC_TX_TAG Tag)
{
	HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
	HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
	HTC_ENDPOINT *pEndpoint = &target->endpoint[Endpoint];

	if (pEndpoint->ServiceID == 0) {
		AR_DEBUG_ASSERT(false);
@@ -1743,7 +1743,7 @@ void htc_process_credit_rpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt,

		rpt_credits = HTC_GET_FIELD(pRpt, HTC_CREDIT_REPORT, CREDITS);

		pEndpoint = &target->EndPoint[rpt_ep_id];
		pEndpoint = &target->endpoint[rpt_ep_id];
#if DEBUG_CREDIT
		if (ep_debug_mask & (1 << pEndpoint->Id)) {
			AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
@@ -1787,7 +1787,7 @@ void htc_process_credit_rpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt,
			target->avail_tx_credits += rpt_credits;

			for (epid_idx = 0; epid_idx < DATA_EP_SIZE; epid_idx++) {
				pEndpoint = &target->EndPoint[eid[epid_idx]];
				pEndpoint = &target->endpoint[eid[epid_idx]];
				if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue)) {
					break;
				}
Loading