diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c')
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c index 7b06aab04ee6..b44e902ed338 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c @@ -17,8 +17,8 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num) while (pHalData->SdioTxOQTFreeSpace < agg_num) { if ( - (padapter->bSurpriseRemoved == true) || - (padapter->bDriverStopped == true) + (padapter->bSurpriseRemoved) || + (padapter->bDriverStopped) ) { DBG_871X("%s: bSurpriseRemoved or bDriverStopped (wait TxOQT)\n", __func__); return false; @@ -58,7 +58,7 @@ static s32 rtl8723_dequeue_writeport(struct adapter *padapter) ret = ret || check_fwstate(pmlmepriv, _FW_UNDER_SURVEY); - if (ret == true) + if (ret) pxmitbuf = dequeue_pending_xmitbuf_under_survey(pxmitpriv); else pxmitbuf = dequeue_pending_xmitbuf(pxmitpriv); @@ -85,7 +85,7 @@ static s32 rtl8723_dequeue_writeport(struct adapter *padapter) query_free_page: /* check if hardware tx fifo page is enough */ - if (false == rtw_hal_sdio_query_tx_freepage(pri_padapter, PageIdx, pxmitbuf->pg_num)) { + if (!rtw_hal_sdio_query_tx_freepage(pri_padapter, PageIdx, pxmitbuf->pg_num)) { if (!bUpdatePageNum) { /* Total number of page is NOT available, so update current FIFO status */ HalQueryTxBufferStatus8723BSdio(padapter); @@ -99,8 +99,8 @@ query_free_page: } if ( - (padapter->bSurpriseRemoved == true) || - (padapter->bDriverStopped == true) + (padapter->bSurpriseRemoved) || + (padapter->bDriverStopped) ) { RT_TRACE( _module_hal_xmit_c_, @@ -153,7 +153,7 @@ s32 rtl8723bs_xmit_buf_handler(struct adapter *padapter) return _FAIL; } - ret = (padapter->bDriverStopped == true) || (padapter->bSurpriseRemoved == true); + ret = (padapter->bDriverStopped) || (padapter->bSurpriseRemoved); if (ret) { RT_TRACE( _module_hal_xmit_c_, @@ -170,7 +170,7 @@ s32 rtl8723bs_xmit_buf_handler(struct adapter *padapter) queue_pending = check_pending_xmitbuf(pxmitpriv); - if (queue_pending == false) + if (!queue_pending) return _SUCCESS; ret = rtw_register_tx_alive(padapter); @@ -202,7 +202,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv s32 err, ret; u32 k = 0; struct hw_xmit *hwxmits, *phwxmit; - u8 no_res, idx, hwentry; + u8 idx, hwentry; struct tx_servq *ptxservq; struct list_head *sta_plist, *sta_phead, *frame_plist, *frame_phead; struct xmit_frame *pxmitframe; @@ -213,7 +213,6 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv int inx[4]; err = 0; - no_res = false; hwxmits = pxmitpriv->hwxmits; hwentry = pxmitpriv->hwxmit_entry; ptxservq = NULL; @@ -236,8 +235,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv phwxmit = hwxmits + inx[idx]; if ( - (check_pending_xmitbuf(pxmitpriv) == true) && - (padapter->mlmepriv.LinkDetectInfo.bHigherBusyTxTraffic == true) + (check_pending_xmitbuf(pxmitpriv)) && + (padapter->mlmepriv.LinkDetectInfo.bHigherBusyTxTraffic) ) { if ((phwxmit->accnt > 0) && (phwxmit->accnt < 5)) { err = -2; @@ -285,7 +284,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv txlen = txdesc_size + rtw_wlan_pkt_size(pxmitframe); if( !pxmitbuf || ((_RND(pxmitbuf->len, 8) + txlen) > max_xmit_len) || - (k >= (rtw_hal_sdio_max_txoqt_free_space(padapter)-1)) + (k >= (rtw_hal_sdio_max_txoqt_free_space(padapter) - 1)) ) { if (pxmitbuf) { /* pxmitbuf->priv_data will be NULL, and will crash here */ @@ -356,8 +355,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv rtw_count_tx_stats(padapter, pxmitframe, pxmitframe->attrib.last_txcmdsz); txlen = txdesc_size + pxmitframe->attrib.last_txcmdsz; - pxmitframe->pg_num = (txlen + 127)/128; - pxmitbuf->pg_num += (txlen + 127)/128; + pxmitframe->pg_num = (txlen + 127) / 128; + pxmitbuf->pg_num += (txlen + 127) / 128; /* if (k != 1) */ /* ((struct xmit_frame*)pxmitbuf->priv_data)->pg_num += pxmitframe->pg_num; */ pxmitbuf->ptail += _RND(txlen, 8); /* round to 8 bytes alignment */ @@ -426,8 +425,8 @@ static s32 rtl8723bs_xmit_handler(struct adapter *padapter) next: if ( - (padapter->bDriverStopped == true) || - (padapter->bSurpriseRemoved == true) + (padapter->bDriverStopped) || + (padapter->bSurpriseRemoved) ) { RT_TRACE( _module_hal_xmit_c_, @@ -523,7 +522,7 @@ s32 rtl8723bs_mgnt_xmit( rtl8723b_update_txdesc(pmgntframe, pmgntframe->buf_addr); pxmitbuf->len = txdesc_size + pattrib->last_txcmdsz; - pxmitbuf->pg_num = (pxmitbuf->len + 127)/128; /* 128 is tx page size */ + pxmitbuf->pg_num = (pxmitbuf->len + 127) / 128; /* 128 is tx page size */ pxmitbuf->ptail = pmgntframe->buf_addr + pxmitbuf->len; pxmitbuf->ff_hwaddr = rtw_get_ff_hwaddr(pmgntframe); @@ -570,7 +569,7 @@ s32 rtl8723bs_hal_xmit( (pxmitframe->attrib.ether_type != 0x888e) && (pxmitframe->attrib.dhcp_pkt != 1) ) { - if (padapter->mlmepriv.LinkDetectInfo.bBusyTraffic == true) + if (padapter->mlmepriv.LinkDetectInfo.bBusyTraffic) rtw_issue_addbareq_cmd(padapter, pxmitframe); } @@ -637,7 +636,6 @@ s32 rtl8723bs_init_xmit_priv(struct adapter *padapter) void rtl8723bs_free_xmit_priv(struct adapter *padapter) { - struct hal_com_data *phal; struct xmit_priv *pxmitpriv; struct xmit_buf *pxmitbuf; struct __queue *pqueue; @@ -645,7 +643,6 @@ void rtl8723bs_free_xmit_priv(struct adapter *padapter) struct list_head tmplist; - phal = GET_HAL_DATA(padapter); pxmitpriv = &padapter->xmitpriv; pqueue = &pxmitpriv->pending_xmitbuf_queue; phead = get_list_head(pqueue); |