qcacld-3.0: Replace EndPoint with endpoint
This change also changes EndPointStats to endpoint_stats. Change-Id: I88509901b0d15a59f35633dccbe7ca0b5f7b3b76 CRs-Fixed: 935297
This commit is contained in:

committed by
Akash Patel

parent
565aa509fd
commit
29573d960d
@@ -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
|
* htt_h2t_rx_ring_cfg_msg_ll() have already been
|
||||||
* freed in htt_htc_misc_pkt_pool_free() in
|
* freed in htt_htc_misc_pkt_pool_free() in
|
||||||
* wlantl_close(), so do not free them here again
|
* 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.
|
* which they are queued in.
|
||||||
*/
|
*/
|
||||||
if (id == hif_state->scn->htc_endpoint)
|
if (id == hif_state->scn->htc_endpoint)
|
||||||
|
@@ -257,7 +257,7 @@ HTC_HANDLE htc_create(void *ol_sc, HTC_INIT_INFO *pInfo, cdf_device_t osdev)
|
|||||||
target->hif_dev = ol_sc;
|
target->hif_dev = ol_sc;
|
||||||
|
|
||||||
/* Get HIF default pipe for HTC message exchange */
|
/* 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_post_init(target->hif_dev, target, &htcCallbacks);
|
||||||
hif_get_default_pipe(target->hif_dev, &pEndpoint->UL_PipeID,
|
hif_get_default_pipe(target->hif_dev, &pEndpoint->UL_PipeID,
|
||||||
@@ -516,7 +516,7 @@ static void reset_endpoint_states(HTC_TARGET *target)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) {
|
for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) {
|
||||||
pEndpoint = &target->EndPoint[i];
|
pEndpoint = &target->endpoint[i];
|
||||||
pEndpoint->ServiceID = 0;
|
pEndpoint->ServiceID = 0;
|
||||||
pEndpoint->MaxMsgLength = 0;
|
pEndpoint->MaxMsgLength = 0;
|
||||||
pEndpoint->MaxTxQueueDepth = 0;
|
pEndpoint->MaxTxQueueDepth = 0;
|
||||||
@@ -616,7 +616,7 @@ void htc_flush_surprise_remove(HTC_HANDLE HTCHandle)
|
|||||||
|
|
||||||
/* cleanup endpoints */
|
/* cleanup endpoints */
|
||||||
for (i = 0; i < ENDPOINT_MAX; i++) {
|
for (i = 0; i < ENDPOINT_MAX; i++) {
|
||||||
pEndpoint = &target->EndPoint[i];
|
pEndpoint = &target->endpoint[i];
|
||||||
htc_flush_rx_hold_queue(target, pEndpoint);
|
htc_flush_rx_hold_queue(target, pEndpoint);
|
||||||
htc_flush_endpoint_tx(target, pEndpoint, HTC_TX_PACKET_TAG_ALL);
|
htc_flush_endpoint_tx(target, pEndpoint, HTC_TX_PACKET_TAG_ALL);
|
||||||
}
|
}
|
||||||
@@ -652,7 +652,7 @@ void htc_stop(HTC_HANDLE HTCHandle)
|
|||||||
|
|
||||||
/* cleanup endpoints */
|
/* cleanup endpoints */
|
||||||
for (i = 0; i < ENDPOINT_MAX; i++) {
|
for (i = 0; i < ENDPOINT_MAX; i++) {
|
||||||
pEndpoint = &target->EndPoint[i];
|
pEndpoint = &target->endpoint[i];
|
||||||
htc_flush_rx_hold_queue(target, pEndpoint);
|
htc_flush_rx_hold_queue(target, pEndpoint);
|
||||||
htc_flush_endpoint_tx(target, pEndpoint, HTC_TX_PACKET_TAG_ALL);
|
htc_flush_endpoint_tx(target, pEndpoint, HTC_TX_PACKET_TAG_ALL);
|
||||||
if (pEndpoint->ul_is_polled) {
|
if (pEndpoint->ul_is_polled) {
|
||||||
@@ -691,7 +691,7 @@ void htc_dump_credit_states(HTC_HANDLE HTCHandle)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < ENDPOINT_MAX; i++) {
|
for (i = 0; i < ENDPOINT_MAX; i++) {
|
||||||
pEndpoint = &target->EndPoint[i];
|
pEndpoint = &target->endpoint[i];
|
||||||
if (0 == pEndpoint->ServiceID) {
|
if (0 == pEndpoint->ServiceID) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -749,13 +749,13 @@ A_BOOL htc_get_endpoint_statistics(HTC_HANDLE HTCHandle,
|
|||||||
if (sample) {
|
if (sample) {
|
||||||
A_ASSERT(pStats != NULL);
|
A_ASSERT(pStats != NULL);
|
||||||
/* return the stats to the caller */
|
/* 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));
|
sizeof(HTC_ENDPOINT_STATS));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clearStats) {
|
if (clearStats) {
|
||||||
/* reset stats */
|
/* reset stats */
|
||||||
A_MEMZERO(&target->EndPoint[Endpoint].EndPointStats,
|
A_MEMZERO(&target->endpoint[Endpoint].endpoint_stats,
|
||||||
sizeof(HTC_ENDPOINT_STATS));
|
sizeof(HTC_ENDPOINT_STATS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -123,15 +123,15 @@ typedef struct _HTC_ENDPOINT {
|
|||||||
int TxCreditSize; /* size in bytes of each credit (set by HTC) */
|
int TxCreditSize; /* size in bytes of each credit (set by HTC) */
|
||||||
int TxCreditsPerMaxMsg; /* credits required per max message (precalculated) */
|
int TxCreditsPerMaxMsg; /* credits required per max message (precalculated) */
|
||||||
#ifdef HTC_EP_STAT_PROFILING
|
#ifdef HTC_EP_STAT_PROFILING
|
||||||
HTC_ENDPOINT_STATS EndPointStats; /* endpoint statistics */
|
HTC_ENDPOINT_STATS endpoint_stats; /* endpoint statistics */
|
||||||
#endif
|
#endif
|
||||||
A_BOOL TxCreditFlowEnabled;
|
A_BOOL TxCreditFlowEnabled;
|
||||||
} HTC_ENDPOINT;
|
} HTC_ENDPOINT;
|
||||||
|
|
||||||
#ifdef HTC_EP_STAT_PROFILING
|
#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
|
#else
|
||||||
#define INC_HTC_EP_STAT(p,stat,count)
|
#define INC_HTC_EP_STAT(p, stat, count)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -150,7 +150,7 @@ enum ol_ath_htc_pkt_ecodes {
|
|||||||
/* our HTC target state */
|
/* our HTC target state */
|
||||||
typedef struct _HTC_TARGET {
|
typedef struct _HTC_TARGET {
|
||||||
struct ol_softc *hif_dev;
|
struct ol_softc *hif_dev;
|
||||||
HTC_ENDPOINT EndPoint[ENDPOINT_MAX];
|
HTC_ENDPOINT endpoint[ENDPOINT_MAX];
|
||||||
cdf_spinlock_t HTCLock;
|
cdf_spinlock_t HTCLock;
|
||||||
cdf_spinlock_t HTCRxLock;
|
cdf_spinlock_t HTCRxLock;
|
||||||
cdf_spinlock_t HTCTxLock;
|
cdf_spinlock_t HTCTxLock;
|
||||||
|
@@ -168,7 +168,7 @@ void htc_disable_recv(HTC_HANDLE HTCHandle)
|
|||||||
int htc_get_num_recv_buffers(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint)
|
int htc_get_num_recv_buffers(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
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);
|
return HTC_PACKET_QUEUE_DEPTH(&pEndpoint->RxBufferHoldQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ CDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pEndpoint = &target->EndPoint[htc_ep_id];
|
pEndpoint = &target->endpoint[htc_ep_id];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this endpoint that received a message from the target has
|
* 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),
|
HTC_PACKET_QUEUE_DEPTH(pPktQueue),
|
||||||
pFirstPacket->BufferLength));
|
pFirstPacket->BufferLength));
|
||||||
|
|
||||||
pEndpoint = &target->EndPoint[pFirstPacket->Endpoint];
|
pEndpoint = &target->endpoint[pFirstPacket->Endpoint];
|
||||||
|
|
||||||
LOCK_HTC_RX(target);
|
LOCK_HTC_RX(target);
|
||||||
|
|
||||||
|
@@ -121,7 +121,7 @@ void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credits
|
|||||||
*credits = 0;
|
*credits = 0;
|
||||||
LOCK_HTC_TX(target);
|
LOCK_HTC_TX(target);
|
||||||
for (i = 0; i < ENDPOINT_MAX; i++) {
|
for (i = 0; i < ENDPOINT_MAX; i++) {
|
||||||
pEndpoint = &target->EndPoint[i];
|
pEndpoint = &target->endpoint[i];
|
||||||
if (pEndpoint->ServiceID == WMI_CONTROL_SVC) {
|
if (pEndpoint->ServiceID == WMI_CONTROL_SVC) {
|
||||||
*credits = pEndpoint->TxCredits;
|
*credits = pEndpoint->TxCredits;
|
||||||
break;
|
break;
|
||||||
@@ -185,7 +185,7 @@ static void do_send_completion(HTC_ENDPOINT *pEndpoint,
|
|||||||
|
|
||||||
static void send_packet_completion(HTC_TARGET *target, HTC_PACKET *pPacket)
|
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;
|
HTC_PACKET_QUEUE container;
|
||||||
|
|
||||||
restore_tx_packet(target, pPacket);
|
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++) {
|
for (eid = ENDPOINT_2; eid <= ENDPOINT_5; eid++) {
|
||||||
pEndpoint = &target->EndPoint[eid];
|
pEndpoint = &target->endpoint[eid];
|
||||||
pTxQueue = &pEndpoint->TxQueue;
|
pTxQueue = &pEndpoint->TxQueue;
|
||||||
|
|
||||||
if (HTC_QUEUE_EMPTY(pTxQueue)) {
|
if (HTC_QUEUE_EMPTY(pTxQueue)) {
|
||||||
@@ -1068,7 +1068,7 @@ static A_STATUS htc_send_pkts_sched_queue(HTC_TARGET *target,
|
|||||||
HTC_PACKET *pPacket;
|
HTC_PACKET *pPacket;
|
||||||
int goodPkts;
|
int goodPkts;
|
||||||
|
|
||||||
pEndpoint = &target->EndPoint[eid];
|
pEndpoint = &target->endpoint[eid];
|
||||||
pTxQueue = &pEndpoint->TxQueue;
|
pTxQueue = &pEndpoint->TxQueue;
|
||||||
|
|
||||||
LOCK_HTC_TX(target);
|
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);
|
AR_DEBUG_ASSERT(pPacket->Endpoint < ENDPOINT_MAX);
|
||||||
pEndpoint = &target->EndPoint[pPacket->Endpoint];
|
pEndpoint = &target->endpoint[pPacket->Endpoint];
|
||||||
|
|
||||||
if (!pEndpoint->ServiceID) {
|
if (!pEndpoint->ServiceID) {
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("%s ServiceID is invalid\n",
|
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;
|
int tx_resources;
|
||||||
uint32_t data_attr = 0;
|
uint32_t data_attr = 0;
|
||||||
|
|
||||||
pEndpoint = &target->EndPoint[Epid];
|
pEndpoint = &target->endpoint[Epid];
|
||||||
|
|
||||||
tx_resources =
|
tx_resources =
|
||||||
hif_get_free_queue_number(target->hif_dev, pEndpoint->UL_PipeID);
|
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) {
|
if (pPacket) {
|
||||||
AR_DEBUG_ASSERT(pPacket->Endpoint < ENDPOINT_MAX);
|
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 */
|
/* add HTC_FRAME_HDR in the initial fragment */
|
||||||
netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket);
|
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
|
#endif
|
||||||
} else {
|
} else {
|
||||||
LOCK_HTC_TX(target);
|
LOCK_HTC_TX(target);
|
||||||
pEndpoint = &target->EndPoint[1];
|
pEndpoint = &target->endpoint[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* increment tx processing count on entry */
|
/* increment tx processing count on entry */
|
||||||
@@ -1597,7 +1597,7 @@ CDF_STATUS htc_tx_completion_handler(void *Context,
|
|||||||
A_UINT16 resourcesMax;
|
A_UINT16 resourcesMax;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pEndpoint = &target->EndPoint[EpID];
|
pEndpoint = &target->endpoint[EpID];
|
||||||
target->TX_comp_cnt++;
|
target->TX_comp_cnt++;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -1647,7 +1647,7 @@ void htc_tx_resource_avail_handler(void *context, A_UINT8 pipeID)
|
|||||||
HTC_ENDPOINT *pEndpoint = NULL;
|
HTC_ENDPOINT *pEndpoint = NULL;
|
||||||
|
|
||||||
for (i = 0; i < ENDPOINT_MAX; i++) {
|
for (i = 0; i < ENDPOINT_MAX; i++) {
|
||||||
pEndpoint = &target->EndPoint[i];
|
pEndpoint = &target->endpoint[i];
|
||||||
if (pEndpoint->ServiceID != 0) {
|
if (pEndpoint->ServiceID != 0) {
|
||||||
if (pEndpoint->UL_PipeID == pipeID) {
|
if (pEndpoint->UL_PipeID == pipeID) {
|
||||||
break;
|
break;
|
||||||
@@ -1693,7 +1693,7 @@ void htc_flush_endpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint,
|
|||||||
HTC_TX_TAG Tag)
|
HTC_TX_TAG Tag)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
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) {
|
if (pEndpoint->ServiceID == 0) {
|
||||||
AR_DEBUG_ASSERT(false);
|
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);
|
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 DEBUG_CREDIT
|
||||||
if (ep_debug_mask & (1 << pEndpoint->Id)) {
|
if (ep_debug_mask & (1 << pEndpoint->Id)) {
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
|
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;
|
target->avail_tx_credits += rpt_credits;
|
||||||
|
|
||||||
for (epid_idx = 0; epid_idx < DATA_EP_SIZE; epid_idx++) {
|
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)) {
|
if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -267,7 +267,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pEndpoint = &target->EndPoint[assignedEndpoint];
|
pEndpoint = &target->endpoint[assignedEndpoint];
|
||||||
pEndpoint->Id = assignedEndpoint;
|
pEndpoint->Id = assignedEndpoint;
|
||||||
if (pEndpoint->ServiceID != 0) {
|
if (pEndpoint->ServiceID != 0) {
|
||||||
/* endpoint already in use! */
|
/* endpoint already in use! */
|
||||||
|
Reference in New Issue
Block a user