[PATCH 2/7] staging: r8188eu: remove hal_xmit from struct hal_ops
From: Michael Straube
Date: Fri Sep 10 2021 - 16:50:55 EST
Remove hal_xmit from struct hal_ops and its wrapper rtw_hal_xmit().
Call rtl8188eu_hal_xmit() directly instead.
Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 9 +++++----
drivers/staging/r8188eu/hal/hal_intf.c | 8 --------
drivers/staging/r8188eu/hal/usb_halinit.c | 2 --
drivers/staging/r8188eu/include/hal_intf.h | 5 -----
5 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index a01e6f822cc0..26e14e91a42c 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -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);
}
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 1bfb91f445df..3773ff97198f 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -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)) {
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 98f33747c680..fecdd272f84e 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -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)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 4b732efeef39..aeaf53c1cfbf 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -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);
}
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index d50dc2554d61..da1fd5bddeb7 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -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);
--
2.33.0