From: Leonardo Martins Martins <dev.lmmrtns@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Leonardo Martins Martins <dev.lmmrtns@gmail.com>
Subject: [PATCH 4/4] staging: rtl8723bs: coalesce issue_probereq functions into a single one
Date: Thu, 03 Sep 2026 02:18:10 -0300 [thread overview]
Message-ID: <20260903-issue_probereq-v1-4-82f153d157a1@gmail.com> (raw)
In-Reply-To: <20260903-issue_probereq-v1-0-82f153d157a1@gmail.com>
The function _issue_probereq() and its wrappers issue_probereq() and
issue_probereq_ex() have a difference of a single parameter in how
they're called, which is the value of append_wps - 0 for
issue_probereq_ex() and 1 for issue_probereq() - meaning that these
wrappers don't bring much value, remove both of them, rename
_issue_probereq() to issue_probereq(), and replace the usages of the
wrappers with the unified function (with the value of append_wps added,
with true and false instead of 1 and 0 since it's a bool).
issue_probereq() and issue_probereq_ex() are not used in any other file
so the unified function was not added to the header file and kept the
static type.
Signed-off-by: Leonardo Martins Martins <dev.lmmrtns@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 54 +++++++++++-------------
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 -
2 files changed, 25 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index b3642c5021a230bd70e5d8fd8d5bf77ad1d8946a..c39fb142302edf267edca31babce40120c74451e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -2401,8 +2401,8 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
dump_mgntframe(padapter, pmgntframe);
}
-static void _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da,
- bool append_wps)
+static void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da,
+ bool append_wps)
{
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
@@ -2481,16 +2481,6 @@ static void _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *p
dump_mgntframe(padapter, pmgntframe);
}
-inline void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da)
-{
- _issue_probereq(padapter, pssid, da, 1);
-}
-
-void issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da)
-{
- _issue_probereq(padapter, pssid, da, 0);
-}
-
/* if psta == NULL, indicate we are station(client) now... */
void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short status)
{
@@ -3727,22 +3717,25 @@ void site_survey(struct adapter *padapter)
/* IOT issue, When wifi_spec is not set, send one probe req without WPS IE. */
if (padapter->registrypriv.wifi_spec)
- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL);
+ issue_probereq(padapter,
+ &pmlmeext->sitesurvey_res.ssid[i],
+ NULL, true);
else
- issue_probereq_ex(padapter,
- &pmlmeext->sitesurvey_res.ssid[i],
- NULL);
+ issue_probereq(padapter,
+ &pmlmeext->sitesurvey_res.ssid[i],
+ NULL, false);
- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL);
+ issue_probereq(padapter, &pmlmeext->sitesurvey_res.ssid[i],
+ NULL, true);
}
if (pmlmeext->sitesurvey_res.scan_mode == SCAN_ACTIVE) {
/* IOT issue, When wifi_spec is not set, send one probe req without WPS IE. */
if (padapter->registrypriv.wifi_spec)
- issue_probereq(padapter, NULL, NULL);
+ issue_probereq(padapter, NULL, NULL, true);
else
- issue_probereq_ex(padapter, NULL, NULL);
- issue_probereq(padapter, NULL, NULL);
+ issue_probereq(padapter, NULL, NULL, false);
+ issue_probereq(padapter, NULL, NULL, true);
}
}
}
@@ -4860,15 +4853,18 @@ void linked_status_chk(struct adapter *padapter)
{
if (rx_chk != _SUCCESS) {
if (pmlmeext->retry == 0) {
- issue_probereq_ex(padapter,
- &pmlmeinfo->network.ssid,
- pmlmeinfo->network.mac_address);
- issue_probereq_ex(padapter,
- &pmlmeinfo->network.ssid,
- pmlmeinfo->network.mac_address);
- issue_probereq_ex(padapter,
- &pmlmeinfo->network.ssid,
- pmlmeinfo->network.mac_address);
+ issue_probereq(padapter,
+ &pmlmeinfo->network.ssid,
+ pmlmeinfo->network.mac_address,
+ false);
+ issue_probereq(padapter,
+ &pmlmeinfo->network.ssid,
+ pmlmeinfo->network.mac_address,
+ false);
+ issue_probereq(padapter,
+ &pmlmeinfo->network.ssid,
+ pmlmeinfo->network.mac_address,
+ false);
}
}
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 8e35aabb0ccf96a2bb0c1208db8ad74598a687e0..d486cd462509e9d43d43a7d6718a3bb3935df52d 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -541,8 +541,6 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
void issue_assocreq(struct adapter *padapter);
void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type);
void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short status);
-void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da);
-void issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da);
int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms);
s32 issue_nulldata_in_interrupt(struct adapter *padapter, u8 *da);
int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int try_cnt, int wait_ms);
--
2.47.3
prev parent reply other threads:[~2026-09-03 5:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 5:18 [PATCH 0/4] staging: rtl8723bs: refactor issue_probereq() into a single function Leonardo Martins Martins
2026-09-03 5:18 ` [PATCH 1/4] staging: rtl8723bs: remove invariant parameters from issue_probereq_ex() Leonardo Martins Martins
2026-09-03 5:18 ` [PATCH 2/4] staging: rtl8723bs: change issue_probereq return types to void Leonardo Martins Martins
2026-09-03 5:18 ` [PATCH 3/4] staging: rtl8723bs: remove invariant parameters from _issue_probereq() Leonardo Martins Martins
2026-09-03 5:18 ` Leonardo Martins Martins [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=20260903-issue_probereq-v1-4-82f153d157a1@gmail.com \
--to=dev.lmmrtns@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®