OSDN Git Service

staging: r8188eu: remove hal_xmit from struct hal_ops
authorMichael Straube <straube.linux@gmail.com>
Fri, 10 Sep 2021 20:50:28 +0000 (22:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:58 +0000 (08:49 +0200)
Remove hal_xmit from struct hal_ops and its wrapper rtw_hal_xmit().
Call rtl8188eu_hal_xmit() directly instead.

Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210910205033.3778-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c
drivers/staging/r8188eu/core/rtw_xmit.c
drivers/staging/r8188eu/hal/hal_intf.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/hal_intf.h

index a01e6f8..26e14e9 100644 (file)
@@ -8100,7 +8100,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
                                pxmitframe->attrib.qsel = 0x11;/* HIQ */
 
                                spin_unlock_bh(&psta_bmc->sleep_q.lock);
-                               if (rtw_hal_xmit(padapter, pxmitframe))
+                               if (rtl8188eu_hal_xmit(padapter, pxmitframe))
                                        rtw_os_xmit_complete(padapter, pxmitframe);
                                spin_lock_bh(&psta_bmc->sleep_q.lock);
                        }
index 1bfb91f..3773ff9 100644 (file)
@@ -9,6 +9,7 @@
 #include "../include/osdep_intf.h"
 #include "../include/usb_ops.h"
 #include "../include/usb_osintf.h"
+#include "../include/rtl8188e_xmit.h"
 
 static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
 static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
@@ -1780,7 +1781,7 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
        }
        spin_unlock_bh(&pxmitpriv->lock);
 
-       if (!rtw_hal_xmit(padapter, pxmitframe))
+       if (!rtl8188eu_hal_xmit(padapter, pxmitframe))
                return 1;
 
        return 0;
@@ -2014,7 +2015,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
                pxmitframe->attrib.triggered = 1;
 
                spin_unlock_bh(&psta->sleep_q.lock);
-               if (rtw_hal_xmit(padapter, pxmitframe))
+               if (rtl8188eu_hal_xmit(padapter, pxmitframe))
                        rtw_os_xmit_complete(padapter, pxmitframe);
                spin_lock_bh(&psta->sleep_q.lock);
        }
@@ -2064,7 +2065,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
                        pxmitframe->attrib.triggered = 1;
 
                        spin_unlock_bh(&psta_bmc->sleep_q.lock);
-                       if (rtw_hal_xmit(padapter, pxmitframe))
+                       if (rtl8188eu_hal_xmit(padapter, pxmitframe))
                                rtw_os_xmit_complete(padapter, pxmitframe);
                        spin_lock_bh(&psta_bmc->sleep_q.lock);
                }
@@ -2138,7 +2139,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
 
                pxmitframe->attrib.triggered = 1;
 
-               if (rtw_hal_xmit(padapter, pxmitframe))
+               if (rtl8188eu_hal_xmit(padapter, pxmitframe))
                        rtw_os_xmit_complete(padapter, pxmitframe);
 
                if ((psta->sleepq_ac_len == 0) && (!psta->has_legacy_ac) && (wmmps_ac)) {
index 98f3374..fecdd27 100644 (file)
@@ -88,14 +88,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt)
        return _FAIL;
 }
 
-s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)
-{
-       if (adapt->HalFunc.hal_xmit)
-               return adapt->HalFunc.hal_xmit(adapt, pxmitframe);
-
-       return false;
-}
-
 s32 rtw_hal_init_xmit_priv(struct adapter *adapt)
 {
        if (adapt->HalFunc.init_xmit_priv)
index 4b732ef..aeaf53c 100644 (file)
@@ -2228,7 +2228,5 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
        halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb;
        halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb;
 
-       halfunc->hal_xmit = &rtl8188eu_hal_xmit;
-
        rtl8188e_set_hal_ops(halfunc);
 }
index d50dc25..da1fd5b 100644 (file)
@@ -147,9 +147,6 @@ struct hal_ops {
                                       enum hal_def_variable eVariable,
                                       void *pValue);
 
-       s32     (*hal_xmit)(struct adapter *padapter,
-                           struct xmit_frame *pxmitframe);
-
        u32     (*read_bbreg)(struct adapter *padapter, u32 RegAddr,
                              u32 BitMask);
        void    (*write_bbreg)(struct adapter *padapter, u32 RegAddr,
@@ -215,8 +212,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter,
 u32    rtw_hal_inirp_init(struct adapter *padapter);
 u32    rtw_hal_inirp_deinit(struct adapter *padapter);
 
-s32    rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe);
-
 s32    rtw_hal_init_xmit_priv(struct adapter *padapter);
 
 s32    rtw_hal_init_recv_priv(struct adapter *padapter);