qcacmn: add htc_get_tx_queue_depth api

Wish to know the number of unsent packets in a given tx queue

Change-Id: I73999de9aaadbb61eea13388e583e341e1d7855a
CRs-Fixed: 2018893
This commit is contained in:
Houston Hoffman
2017-03-14 16:15:29 -07:00
committed by Sandeep Puligilla
parent ac99ac8eea
commit adc3147da9
2 changed files with 16 additions and 0 deletions

View File

@@ -689,6 +689,14 @@ A_STATUS HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
/* function to fetch stats from htc layer*/
struct ol_ath_htc_stats *ieee80211_ioctl_get_htc_stats(HTC_HANDLE
HTCHandle);
/**
* htc_get_tx_queue_depth() - get the tx queue depth of an htc endpoint
* @htc_handle: htc handle
* @enpoint_id: endpoint to check
*
* Return: htc_handle tx queue depth
*/
int htc_get_tx_queue_depth(HTC_HANDLE *htc_handle, HTC_ENDPOINT_ID endpoint_id);
#ifdef HIF_USB
#define HTCReturnReceivePkt(target, p, osbuf) \

View File

@@ -142,6 +142,14 @@ void htc_dump_counter_info(HTC_HANDLE HTCHandle)
__func__, target->ce_send_cnt, target->TX_comp_cnt));
}
int htc_get_tx_queue_depth(HTC_HANDLE *htc_handle, HTC_ENDPOINT_ID endpoint_id)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(htc_handle);
HTC_ENDPOINT *endpoint = &target->endpoint[endpoint_id];
return HTC_PACKET_QUEUE_DEPTH(&endpoint->TxQueue);
}
void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credits)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);