[PATCH 1/7] staging: r8188eu: remove mgnt_xmit from struct hal_ops

From: Michael Straube
Date: Fri Sep 10 2021 - 16:50:52 EST


Remove mgnt_xmit from struct hal_ops and its wrapper
rtw_hal_mgnt_xmit(). Call rtl8188eu_mgnt_xmit() directly instead.

Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +++---
drivers/staging/r8188eu/core/rtw_mp.c | 2 +-
drivers/staging/r8188eu/hal/hal_intf.c | 8 --------
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +-
drivers/staging/r8188eu/hal/usb_halinit.c | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 4 ----
6 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index abbf541618ed..a01e6f822cc0 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -4258,7 +4258,7 @@ void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe)
if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
return;

- rtw_hal_mgnt_xmit(padapter, pmgntframe);
+ rtl8188eu_mgnt_xmit(padapter, pmgntframe);
}

s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms)
@@ -4273,7 +4273,7 @@ s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntfr
rtw_sctx_init(&sctx, timeout_ms);
pxmitbuf->sctx = &sctx;

- ret = rtw_hal_mgnt_xmit(padapter, pmgntframe);
+ ret = rtl8188eu_mgnt_xmit(padapter, pmgntframe);

if (ret == _SUCCESS)
ret = rtw_sctx_wait(&sctx);
@@ -4294,7 +4294,7 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmg
pxmitpriv->ack_tx = true;

pmgntframe->ack_report = 1;
- if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) {
+ if (rtl8188eu_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) {
ret = rtw_ack_tx_wait(pxmitpriv, timeout_ms);
}

diff --git a/drivers/staging/r8188eu/core/rtw_mp.c b/drivers/staging/r8188eu/core/rtw_mp.c
index 82268f754da0..8b53a460edf8 100644
--- a/drivers/staging/r8188eu/core/rtw_mp.c
+++ b/drivers/staging/r8188eu/core/rtw_mp.c
@@ -498,7 +498,7 @@ void PhySetTxPowerLevel(struct adapter *pAdapter)
/* */
static void dump_mpframe(struct adapter *padapter, struct xmit_frame *pmpframe)
{
- rtw_hal_mgnt_xmit(padapter, pmpframe);
+ rtl8188eu_mgnt_xmit(padapter, pmpframe);
}

static struct xmit_frame *alloc_mp_xmitframe(struct xmit_priv *pxmitpriv)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index ee92af81ea05..98f33747c680 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -96,14 +96,6 @@ s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)
return false;
}

-s32 rtw_hal_mgnt_xmit(struct adapter *adapt, struct xmit_frame *pmgntframe)
-{
- s32 ret = _FAIL;
- if (adapt->HalFunc.mgnt_xmit)
- ret = adapt->HalFunc.mgnt_xmit(adapt, pmgntframe);
- return ret;
-}
-
s32 rtw_hal_init_xmit_priv(struct adapter *adapt)
{
if (adapt->HalFunc.init_xmit_priv)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index f5268d295278..6cdc2e40aad4 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -561,7 +561,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
pattrib->pktlen = pattrib->last_txcmdsz;
memcpy(pmgntframe->buf_addr, ReservedPagePacket, TotalPacketLen);

- rtw_hal_mgnt_xmit(adapt, pmgntframe);
+ rtl8188eu_mgnt_xmit(adapt, pmgntframe);

DBG_88E("%s: Set RSVD page location to Fw\n", __func__);
FillH2CCmd_88E(adapt, H2C_COM_RSVD_PAGE, sizeof(RsvdPageLoc), (u8 *)&RsvdPageLoc);
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index c5347c5459d6..4b732efeef39 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2229,7 +2229,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb;

halfunc->hal_xmit = &rtl8188eu_hal_xmit;
- halfunc->mgnt_xmit = &rtl8188eu_mgnt_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 c1e120593574..d50dc2554d61 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -149,8 +149,6 @@ struct hal_ops {

s32 (*hal_xmit)(struct adapter *padapter,
struct xmit_frame *pxmitframe);
- s32 (*mgnt_xmit)(struct adapter *padapter,
- struct xmit_frame *pmgntframe);

u32 (*read_bbreg)(struct adapter *padapter, u32 RegAddr,
u32 BitMask);
@@ -218,8 +216,6 @@ 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_mgnt_xmit(struct adapter *padapter,
- struct xmit_frame *pmgntframe);

s32 rtw_hal_init_xmit_priv(struct adapter *padapter);

--
2.33.0