software/drivers/sd8887/src/wlan/mlan/mlan_wmm.c
/**
 *  @brief This function gets the number of packets in the Tx queue
 *
 *  @param priv           A pointer to mlan_private
 *  @param ptr            A pointer to RA list table
 *  @param max_buf_size   Maximum buffer size
 *
 *  @return             Packet count
 */
@brief This function gets the number of packets in the Tx queue
@param priv           A pointer to mlan_private
@param ptr            A pointer to RA list table
@param max_buf_size   Maximum buffer size

@return             Packet count
@brief This function gets the number of packets in the Tx queue @param priv A pointer to mlan_private @param ptr A pointer to RA list table @param max_buf_size Maximum buffer size @return Packet count
static int
wlan_num_pkts_in_txq(mlan_private *priv, raListTbl *ptr, int max_buf_size)
{
	int count = 0, total_size = 0;
	pmlan_buffer pmbuf;
	ENTER();
	for (pmbuf = (pmlan_buffer)ptr->buf_head.pnext;
	     pmbuf != (pmlan_buffer)(&ptr->buf_head); pmbuf = pmbuf->pnext) {
		total_size += pmbuf->data_len;
		if (total_size < max_buf_size)
			++count;
		else
			break;
	}
	LEAVE();
	return count;
}
static int wlan_num_pkts_in_txq ( mlan_private * priv , raListTbl * ptr , int max_buf_size ) { int count = 0 , total_size = 0 ; pmlan_buffer pmbuf ; ENTER ( ) ; for ( pmbuf = ( pmlan_buffer ) ptr -> buf_head . pnext ; pmbuf != ( pmlan_buffer ) ( & ptr -> buf_head ) ; pmbuf = pmbuf -> pnext ) { total_size += pmbuf -> data_len ; if ( total_size < max_buf_size ) ++ count ; else break ; } LEAVE ( ) ; return count ; }
@brief This function gets the number of packets in the Tx queue
  @param priv           A pointer to mlan_private
  @param ptr            A pointer to RA list table
  @param max_buf_size   Maximum buffer size
@brief This function gets the number of packets in the Tx queue @param priv A pointer to mlan_private @param ptr A pointer to RA list table @param max_buf_size Maximum buffer size