[06/20] staging: r8188eu: simplify rtl8188eu_xmit_tasklet
Commit Message
Simplify the rtl8188eu_xmit_tasklet function. Remove an unnecessary
temporary variable and reformat the code.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/hal/usb_ops_linux.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
@@ -481,22 +481,14 @@ u32 rtw_read_port(struct adapter *adapter, u8 *rmem)
void rtl8188eu_xmit_tasklet(unsigned long priv)
{
- int ret = false;
struct adapter *adapt = (struct adapter *)priv;
struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
if (check_fwstate(&adapt->mlmepriv, _FW_UNDER_SURVEY))
return;
- while (1) {
- if ((adapt->bDriverStopped) ||
- (adapt->bSurpriseRemoved) ||
- (adapt->bWritePortCancel))
- break;
-
- ret = rtl8188eu_xmitframe_complete(adapt, pxmitpriv);
-
- if (!ret)
+ do {
+ if (adapt->bDriverStopped || adapt->bSurpriseRemoved || adapt->bWritePortCancel)
break;
- }
+ } while (rtl8188eu_xmitframe_complete(adapt, pxmitpriv));
}