diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c')
| -rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c index f50726d2ed0c..e40f69c13c44 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c @@ -93,7 +93,7 @@ query_free_page: ) goto free_xmitbuf; - if (rtw_sdio_wait_enough_TxOQT_space(padapter, pxmitbuf->agg_num) == false) + if (!rtw_sdio_wait_enough_TxOQT_space(padapter, pxmitbuf->agg_num)) goto free_xmitbuf; traffic_check_for_leave_lps(padapter, true, pxmitbuf->agg_num); @@ -225,7 +225,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv frame_phead = get_list_head(pframe_queue); - while (list_empty(frame_phead) == false) { + while (!list_empty(frame_phead)) { frame_plist = get_next(frame_phead); pxmitframe = container_of(frame_plist, struct xmit_frame, list); @@ -256,11 +256,6 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); if (!pxmitbuf) { -#ifdef DBG_XMIT_BUF - netdev_err(padapter->pnetdev, - "%s: xmit_buf is not enough!\n", - __func__); -#endif err = -2; complete(&(pxmitpriv->xmit_comp)); break; @@ -269,7 +264,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv } /* ok to send, remove frame from queue */ - if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) + if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE)) if ( (pxmitframe->attrib.psta->state & WIFI_SLEEP_STATE) && (pxmitframe->attrib.triggered == 0) @@ -395,9 +390,8 @@ next: spin_lock_bh(&pxmitpriv->lock); ret = rtw_txframes_pending(padapter); spin_unlock_bh(&pxmitpriv->lock); - if (ret == 1) { + if (ret == 1) goto next; - } return _SUCCESS; } @@ -415,7 +409,7 @@ int rtl8723bs_xmit_thread(void *context) if (signal_pending(current)) { flush_signals(current); } - } while (_SUCCESS == ret); + } while (ret == _SUCCESS); complete(&pxmitpriv->SdioXmitTerminate); @@ -464,8 +458,8 @@ s32 rtl8723bs_mgnt_xmit( *Handle xmitframe(packet) come from rtw_xmit() * * Return: - *true dump packet directly ok - *false enqueue, temporary can't transmit packets to hardware + * true dump packet directly ok + * false enqueue, temporary can't transmit packets to hardware */ s32 rtl8723bs_hal_xmit( struct adapter *padapter, struct xmit_frame *pxmitframe @@ -474,7 +468,6 @@ s32 rtl8723bs_hal_xmit( struct xmit_priv *pxmitpriv; s32 err; - pxmitframe->attrib.qsel = pxmitframe->attrib.priority; pxmitpriv = &padapter->xmitpriv; @@ -491,7 +484,7 @@ s32 rtl8723bs_hal_xmit( spin_lock_bh(&pxmitpriv->lock); err = rtw_xmitframe_enqueue(padapter, pxmitframe); spin_unlock_bh(&pxmitpriv->lock); - if (err != _SUCCESS) { + if (err) { rtw_free_xmitframe(pxmitpriv, pxmitframe); pxmitpriv->tx_drop++; @@ -511,7 +504,7 @@ s32 rtl8723bs_hal_xmitframe_enqueue( s32 err; err = rtw_xmitframe_enqueue(padapter, pxmitframe); - if (err != _SUCCESS) { + if (err) { rtw_free_xmitframe(pxmitpriv, pxmitframe); pxmitpriv->tx_drop++; @@ -534,7 +527,6 @@ s32 rtl8723bs_init_xmit_priv(struct adapter *padapter) struct xmit_priv *xmitpriv = &padapter->xmitpriv; struct hal_com_data *phal; - phal = GET_HAL_DATA(padapter); spin_lock_init(&phal->SdioTxFIFOFreePageLock); @@ -552,7 +544,6 @@ void rtl8723bs_free_xmit_priv(struct adapter *padapter) struct list_head *plist, *phead; struct list_head tmplist; - phead = get_list_head(pqueue); INIT_LIST_HEAD(&tmplist); @@ -566,7 +557,7 @@ void rtl8723bs_free_xmit_priv(struct adapter *padapter) spin_unlock_bh(&pqueue->lock); phead = &tmplist; - while (list_empty(phead) == false) { + while (!list_empty(phead)) { plist = get_next(phead); list_del_init(plist); |
