From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 5/5] staging: r8188eu: remove HW_VAR_DM_FUNC_CLR from SetHwReg8188EU()
Date: Sat, 9 Jul 2022 11:44:58 +0200 [thread overview]
Message-ID: <20220709094458.9578-6-straube.linux@gmail.com> (raw)
In-Reply-To: <20220709094458.9578-1-straube.linux@gmail.com>
Remove the HW_VAR_DM_FUNC_CLR case from SetHwReg8188EU() and move its
functionality to a static function. This is part of the ongoing effort
to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++++++++--
drivers/staging/r8188eu/hal/usb_halinit.c | 5 -----
drivers/staging/r8188eu/include/hal_intf.h | 1 -
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 31d936ad063a..eecb00e41d6a 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -6655,6 +6655,14 @@ static void rtw_reset_dm_func_flag(struct adapter *adapter)
odmpriv->SupportAbility = dmpriv->InitODMFlag;
}
+static void rtw_clear_dm_func_flag(struct adapter *adapter)
+{
+ struct hal_data_8188e *haldata = &adapter->haldata;
+ struct odm_dm_struct *odmpriv = &haldata->odmpriv;
+
+ odmpriv->SupportAbility = 0;
+}
+
void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
{
struct sta_info *psta, *psta_bmc;
@@ -7110,7 +7118,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
- SetHwReg8188EU(padapter, HW_VAR_DM_FUNC_CLR, NULL);
+ rtw_clear_dm_func_flag(padapter);
/* cancel link timer */
_cancel_timer_ex(&pmlmeext->link_timer);
@@ -7380,7 +7388,7 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
if ((pmlmeext->sitesurvey_res.state == SCAN_START) || (pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) {
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
- SetHwReg8188EU(padapter, HW_VAR_DM_FUNC_CLR, NULL);
+ rtw_clear_dm_func_flag(padapter);
/* config the initial gain under scanning, need to write the BB registers */
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 92446cd1a096..04beded95475 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1061,8 +1061,6 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 *val)
void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
{
- struct hal_data_8188e *haldata = &Adapter->haldata;
- struct odm_dm_struct *podmpriv = &haldata->odmpriv;
u8 reg;
int res;
@@ -1156,9 +1154,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
rtw_write32(Adapter, REG_RCR, reg32 | RCR_CBSSID_BCN);
}
break;
- case HW_VAR_DM_FUNC_CLR:
- podmpriv->SupportAbility = 0;
- break;
default:
break;
}
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index d33e75bcac74..c1db7f834e20 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -12,7 +12,6 @@ enum hw_variables {
HW_VAR_SET_OPMODE,
HW_VAR_CORRECT_TSF,
HW_VAR_MLME_SITESURVEY,
- HW_VAR_DM_FUNC_CLR,
};
typedef s32 (*c2h_id_filter)(u8 id);
--
2.36.1
prev parent reply other threads:[~2022-07-09 9:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 9:44 [PATCH 0/5] staging: r8188eu: SetHwReg8188EU() cleanups Michael Straube
2022-07-09 9:44 ` [PATCH 1/5] staging: r8188eu: remove HW_VAR_BASIC_RATE from SetHwReg8188EU() Michael Straube
2022-07-09 9:44 ` [PATCH 2/5] staging: r8188eu: remove HW_VAR_DM_FUNC_OP " Michael Straube
2022-07-09 9:44 ` [PATCH 3/5] staging: r8188eu: remove HW_VAR_DM_FLAG " Michael Straube
2022-07-09 9:44 ` [PATCH 4/5] staging: r8188eu: remove HW_VAR_DM_FUNC_RESET " Michael Straube
2022-07-09 9:44 ` Michael Straube [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220709094458.9578-6-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.