/* * Description * Transmit xmitbuf to hardware tx fifo * * Return * _SUCCESS ok * _FAIL something error */ s32 rtl8188es_xmit_buf_handler(PADAPTER padapter) { struct xmit_priv *pxmitpriv; u8 queue_empty, queue_pending; s32 ret; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); pxmitpriv = &padapter->xmitpriv; ret = _rtw_down_sema(&pxmitpriv->xmit_sema); if (ret == _FAIL) { RT_TRACE(_module_hal_xmit_c_, _drv_emerg_, ("down SdioXmitBufSema fail!\n")); return _FAIL; } //#ifdef CONFIG_CONCURRENT_MODE // if (padapter->pbuddy_adapter->bup){ // if ((padapter->pbuddy_adapter->bSurpriseRemoved == _TRUE) || // (padapter->pbuddy_adapter->bDriverStopped == _TRUE)) // buddy_rm_stop = _TRUE; // } //#endif if ((padapter->bSurpriseRemoved == _TRUE) || (padapter->bDriverStopped == _TRUE) //#ifdef CONFIG_CONCURRENT_MODE // ||(buddy_rm_stop == _TRUE) //#endif ) { RT_TRACE(_module_hal_xmit_c_, _drv_notice_, ("%s: bDriverStopped(%d) bSurpriseRemoved(%d)\n", __FUNCTION__, padapter->bDriverStopped, padapter->bSurpriseRemoved)); return _FAIL; } queue_pending = check_pending_xmitbuf(pxmitpriv); #ifdef CONFIG_CONCURRENT_MODE if(rtw_buddy_adapter_up(padapter)) queue_pending |= check_pending_xmitbuf(&padapter->pbuddy_adapter->xmitpriv); #endif if(queue_pending == _FALSE) return _SUCCESS; #ifdef CONFIG_LPS_LCLK ret = rtw_register_tx_alive(padapter); if (ret != _SUCCESS) return _SUCCESS; #endif do { queue_empty = rtl8188es_dequeue_writeport(padapter); // dump secondary adapter xmitbuf #ifdef CONFIG_CONCURRENT_MODE if(rtw_buddy_adapter_up(padapter)) queue_empty &= rtl8188es_dequeue_writeport(padapter->pbuddy_adapter); #endif } while ( !queue_empty); #ifdef CONFIG_LPS_LCLK rtw_unregister_tx_alive(padapter); #endif return _SUCCESS; }
/* * Description * Transmit xmitbuf to hardware tx fifo * * Return * _SUCCESS ok * _FAIL something error */ s32 rtl8188es_xmit_buf_handler(PADAPTER padapter) { struct mlme_priv *pmlmepriv; struct xmit_priv *pxmitpriv; struct xmit_buf *pxmitbuf; struct xmit_frame *pframe; u8 *freePage; u32 requiredPage; u8 PageIdx , queue_empty; _irqL irql; u32 n; s32 ret; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); #ifdef CONFIG_CONCURRENT_MODE s32 buddy_rm_stop = _FAIL; #endif pmlmepriv = &padapter->mlmepriv; pxmitpriv = &padapter->xmitpriv; freePage = pHalData->SdioTxFIFOFreePage; ret = _rtw_down_sema(&pxmitpriv->xmit_sema); if (ret == _FAIL) { RT_TRACE(_module_hal_xmit_c_, _drv_emerg_, ("down SdioXmitBufSema fail!\n")); return _FAIL; } //#ifdef CONFIG_CONCURRENT_MODE // if (padapter->pbuddy_adapter->bup){ // if ((padapter->pbuddy_adapter->bSurpriseRemoved == _TRUE) || // (padapter->pbuddy_adapter->bDriverStopped == _TRUE)) // buddy_rm_stop = _TRUE; // } //#endif if ((padapter->bSurpriseRemoved == _TRUE) || (padapter->bDriverStopped == _TRUE) //#ifdef CONFIG_CONCURRENT_MODE // ||(buddy_rm_stop == _TRUE) //#endif ) { #ifdef CONFIG_LPS_LCLK rtw_unregister_tx_alive(padapter); #endif RT_TRACE(_module_hal_xmit_c_, _drv_notice_, ("%s: bDriverStopped(%d) bSurpriseRemoved(%d)\n", __FUNCTION__, padapter->bDriverStopped, padapter->bSurpriseRemoved)); return _FAIL; } #ifdef CONFIG_LPS_LCLK ret = rtw_register_tx_alive(padapter); if (ret != _SUCCESS) return _SUCCESS; #endif do { queue_empty = rtl8188es_dequeue_writeport(padapter, freePage); // dump secondary adapter xmitbuf #ifdef CONFIG_CONCURRENT_MODE if(rtw_buddy_adapter_up(padapter)) queue_empty &= rtl8188es_dequeue_writeport(padapter->pbuddy_adapter, freePage); #endif } while ( !queue_empty); #ifdef CONFIG_LPS_LCLK rtw_unregister_tx_alive(padapter); #endif return _SUCCESS; }