staging: r8188eu: remove xmitframe_direct function
authorIvan Safonov <insafonov@gmail.com>
Sun, 18 Sep 2016 17:24:01 +0000 (00:24 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2016 11:33:48 +0000 (13:33 +0200)
xmitframe_direct is a simple wrapper around
rtw_xmitframe_coalesce and rtw_dump_xframe functions.
Many wrappers complicates code reading.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c

index 5482f479907c1798abdd28ce1ec7a6bb97e4eb79..169d6c842dc2c4381b4bc6bb2eac4c6c916f4a7e 100644 (file)
@@ -605,18 +605,6 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
        return true;
 }
 
-static s32 xmitframe_direct(struct adapter *adapt, struct xmit_frame *pxmitframe)
-{
-       s32 res;
-
-       res = rtw_xmitframe_coalesce(adapt, pxmitframe->pkt, pxmitframe);
-       if (res == _SUCCESS)
-               rtw_dump_xframe(adapt, pxmitframe);
-       else
-               DBG_88E("==> %s xmitframe_coalsece failed\n", __func__);
-       return res;
-}
-
 /*
  * Return
  *     true    dump packet directly
@@ -648,7 +636,12 @@ s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)
        pxmitframe->buf_addr = pxmitbuf->pbuf;
        pxmitbuf->priv_data = pxmitframe;
 
-       if (xmitframe_direct(adapt, pxmitframe) != _SUCCESS) {
+       res = rtw_xmitframe_coalesce(adapt, pxmitframe->pkt, pxmitframe);
+
+       if (res == _SUCCESS) {
+               rtw_dump_xframe(adapt, pxmitframe);
+       } else {
+               DBG_88E("==> %s xmitframe_coalsece failed\n", __func__);
                rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
                rtw_free_xmitframe(pxmitpriv, pxmitframe);
        }