software/drivers/sd8887/src/wlan/mlan/mlan_txrx.c
/**
 *   @brief This function processes the received buffer
 *
 *   @param pmadapter A pointer to mlan_adapter
 *   @param pmbuf     A pointer to the received buffer
 *
 *   @return        MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
 */
@brief This function processes the received buffer
@param pmadapter A pointer to mlan_adapter
@param pmbuf     A pointer to the received buffer


@brief This function processes the received buffer @param pmadapter A pointer to mlan_adapter @param pmbuf A pointer to the received buffer
mlan_status
wlan_handle_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
{
	mlan_status ret = MLAN_STATUS_SUCCESS;
	pmlan_private priv = MNULL;
	RxPD *prx_pd;
#ifdef DEBUG_LEVEL1
	t_u32 sec = 0, usec = 0;
#endif
	ENTER();
	prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset);
	priv = wlan_get_priv_by_id(pmadapter, prx_pd->bss_num & BSS_NUM_MASK,
				   prx_pd->bss_type);
	if (!priv)
		priv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY);
	if (!priv) {
		ret = MLAN_STATUS_FAILURE;
		goto done;
	}
	pmbuf->bss_index = priv->bss_index;
	PRINTM_GET_SYS_TIME(MDATA, &sec, &usec);
	PRINTM_NETINTF(MDATA, priv);
	PRINTM(MDATA, "%lu.%06lu : Data <= FW\n", sec, usec);
	ret = priv->ops.process_rx_packet(pmadapter, pmbuf);
done:
	LEAVE();
	return ret;
}
mlan_status wlan_handle_rx_packet ( pmlan_adapter pmadapter , pmlan_buffer pmbuf ) { mlan_status ret = MLAN_STATUS_SUCCESS ; pmlan_private priv = MNULL ; RxPD * prx_pd ; #ifdef DEBUG_LEVEL1 t_u32 sec = 0 , usec = 0 ; #endif ENTER ( ) ; prx_pd = ( RxPD * ) ( pmbuf -> pbuf + pmbuf -> data_offset ) ; priv = wlan_get_priv_by_id ( pmadapter , prx_pd -> bss_num & BSS_NUM_MASK , prx_pd -> bss_type ) ; if ( ! priv ) priv = wlan_get_priv ( pmadapter , MLAN_BSS_ROLE_ANY ) ; if ( ! priv ) { ret = MLAN_STATUS_FAILURE ; goto done ; } pmbuf -> bss_index = priv -> bss_index ; PRINTM_GET_SYS_TIME ( MDATA , & sec , & usec ) ; PRINTM_NETINTF ( MDATA , priv ) ; PRINTM ( MDATA , " \n " , sec , usec ) ; ret = priv -> ops . process_rx_packet ( pmadapter , pmbuf ) ; done : LEAVE ( ) ; return ret ; }
@brief This function processes the received buffer
   @param pmadapter A pointer to mlan_adapter
   @param pmbuf     A pointer to the received buffer
@brief This function processes the received buffer @param pmadapter A pointer to mlan_adapter @param pmbuf A pointer to the received buffer
/* Get the BSS number from RxPD, get corresponding priv */