software/drivers/sd8887/src/wlan/mlan/mlan_wmm.c
/**
 *  @brief find tdls buffer from tdls pending queue
 *
 *  @param priv		  A pointer to mlan_private
 *  @param mac        TDLS peer mac address
 *
 *  @return           pmlan_buffer or MNULL
 */
@brief find tdls buffer from tdls pending queue
@param priv           A pointer to mlan_private
@param mac        TDLS peer mac address

@return           pmlan_buffer or MNULL
@brief find tdls buffer from tdls pending queue @param priv A pointer to mlan_private @param mac TDLS peer mac address @return pmlan_buffer or MNULL
static pmlan_buffer
wlan_find_packets_tdls_txq(mlan_private *priv, t_u8 *mac)
{
	pmlan_buffer pmbuf = MNULL;
	mlan_adapter *pmadapter = priv->adapter;
	t_u8 ra[MLAN_MAC_ADDR_LENGTH];
	ENTER();
	pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle,
					     &priv->tdls_pending_txq,
					     MNULL, MNULL);
	if (!pmbuf) {
		LEAVE();
		return MNULL;
	}
	while (pmbuf != (pmlan_buffer)&priv->tdls_pending_txq) {
		memcpy(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
		       MLAN_MAC_ADDR_LENGTH);
		if (!memcmp(priv->adapter, ra, mac, MLAN_MAC_ADDR_LENGTH)) {
			LEAVE();
			return pmbuf;
		}
		pmbuf = pmbuf->pnext;
	}
	LEAVE();
	return MNULL;
}
static pmlan_buffer wlan_find_packets_tdls_txq ( mlan_private * priv , t_u8 * mac ) { pmlan_buffer pmbuf = MNULL ; mlan_adapter * pmadapter = priv -> adapter ; t_u8 ra [ MLAN_MAC_ADDR_LENGTH ] ; ENTER ( ) ; pmbuf = ( pmlan_buffer ) util_peek_list ( priv -> adapter -> pmoal_handle , & priv -> tdls_pending_txq , MNULL , MNULL ) ; if ( ! pmbuf ) { LEAVE ( ) ; return MNULL ; } while ( pmbuf != ( pmlan_buffer ) & priv -> tdls_pending_txq ) { memcpy ( pmadapter , ra , pmbuf -> pbuf + pmbuf -> data_offset , MLAN_MAC_ADDR_LENGTH ) ; if ( ! memcmp ( priv -> adapter , ra , mac , MLAN_MAC_ADDR_LENGTH ) ) { LEAVE ( ) ; return pmbuf ; } pmbuf = pmbuf -> pnext ; } LEAVE ( ) ; return MNULL ; }
@brief find tdls buffer from tdls pending queue
  @param priv           A pointer to mlan_private
  @param mac        TDLS peer mac address
@brief find tdls buffer from tdls pending queue @param priv A pointer to mlan_private @param mac TDLS peer mac address