software/drivers/sd8887/src/wlan/mlan/mlan_txrx.c
/**
 *  @brief Transmit the By-passed packet awaiting in by-pass queue
 *
 *  @param pmadapter Pointer to the mlan_adapter driver data struct
 *
 *  @return        N/A
 */
@brief Transmit the By-passed packet awaiting in by-pass queue
@param pmadapter Pointer to the mlan_adapter driver data struct

@return        N/A
@brief Transmit the By - passed packet awaiting in by - pass queue @param pmadapter Pointer to the mlan_adapter driver data struct @return N / A
t_void
wlan_process_bypass_tx(pmlan_adapter pmadapter)
{
	pmlan_buffer pmbuf;
	mlan_tx_param tx_param;
	mlan_status status = MLAN_STATUS_SUCCESS;
	pmlan_private priv;
	int j = 0;
	ENTER();
	for (j = 0; j < pmadapter->priv_num; ++j) {
		priv = pmadapter->priv[j];
		if (priv) {
			pmbuf = (pmlan_buffer)util_dequeue_list(pmadapter->
								pmoal_handle,
								&priv->
								bypass_txq,
								pmadapter->
								callbacks.
								moal_spin_lock,
								pmadapter->
								callbacks.
								moal_spin_unlock);
			if (pmbuf) {
				PRINTM(MINFO, "Dequeuing bypassed packet %p\n",
				       pmbuf);
				tx_param.next_pkt_len = 0;
				status = wlan_process_tx(pmadapter->
							 priv[pmbuf->bss_index],
							 pmbuf, &tx_param);
				if (status == MLAN_STATUS_RESOURCE) {
					util_enqueue_list_head(pmadapter->
							       pmoal_handle,
							       &priv->
							       bypass_txq,
							       (pmlan_linked_list)
							       pmbuf,
							       pmadapter->
							       callbacks.
							       moal_spin_lock,
							       pmadapter->
							       callbacks.
							       moal_spin_unlock);
				} else {
					pmadapter->callbacks.
						moal_spin_lock(pmadapter->
							       pmoal_handle,
							       priv->bypass_txq.
							       plock);
					pmadapter->bypass_pkt_count--;
					pmadapter->callbacks.
						moal_spin_unlock(pmadapter->
								 pmoal_handle,
								 priv->
								 bypass_txq.
								 plock);
				}
				break;
			} else {
				PRINTM(MINFO, "Nothing to send\n");
			}
		}
	}
	LEAVE();
}
t_void wlan_process_bypass_tx ( pmlan_adapter pmadapter ) { pmlan_buffer pmbuf ; mlan_tx_param tx_param ; mlan_status status = MLAN_STATUS_SUCCESS ; pmlan_private priv ; int j = 0 ; ENTER ( ) ; for ( j = 0 ; j < pmadapter -> priv_num ; ++ j ) { priv = pmadapter -> priv [ j ] ; if ( priv ) { pmbuf = ( pmlan_buffer ) util_dequeue_list ( pmadapter -> pmoal_handle , & priv -> bypass_txq , pmadapter -> callbacks . moal_spin_lock , pmadapter -> callbacks . moal_spin_unlock ) ; if ( pmbuf ) { PRINTM ( MINFO , " \n " , pmbuf ) ; tx_param . next_pkt_len = 0 ; status = wlan_process_tx ( pmadapter -> priv [ pmbuf -> bss_index ] , pmbuf , & tx_param ) ; if ( status == MLAN_STATUS_RESOURCE ) { util_enqueue_list_head ( pmadapter -> pmoal_handle , & priv -> bypass_txq , ( pmlan_linked_list ) pmbuf , pmadapter -> callbacks . moal_spin_lock , pmadapter -> callbacks . moal_spin_unlock ) ; } else { pmadapter -> callbacks . moal_spin_lock ( pmadapter -> pmoal_handle , priv -> bypass_txq . plock ) ; pmadapter -> bypass_pkt_count -- ; pmadapter -> callbacks . moal_spin_unlock ( pmadapter -> pmoal_handle , priv -> bypass_txq . plock ) ; } break ; } else { PRINTM ( MINFO , " \n " ) ; } } } LEAVE ( ) ; }
@brief Transmit the By-passed packet awaiting in by-pass queue
  @param pmadapter Pointer to the mlan_adapter driver data struct
@brief Transmit the By - passed packet awaiting in by - pass queue @param pmadapter Pointer to the mlan_adapter driver data struct
/* XXX: nex_pkt_len ??? */ /* Queue the packet again so that it will be TX'ed later */