The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Arsenii Pashchenko <ulijg308@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	ulijg308@gmail.com
Subject: [PATCH 07/61] staging: rtl8723bs: remove redundant issue_deauth wrapper
Date: Wed, 15 Jul 2026 19:47:35 +0700	[thread overview]
Message-ID: <20260715124829.90290-8-ulijg308@gmail.com> (raw)
In-Reply-To: <20260715124829.90290-1-ulijg308@gmail.com>

Remove the redundant issue_deauth() wrapper function. Make the
underlying internal function global and rename it from _issue_deauth()
to issue_deauth() by removing the leading underscore.

Update all call sites across the driver to use the updated
issue_deauth() function directly, passing the explicit trailing
'false' argument where the wrapper was previously used. This
eliminates unnecessary boilerplate and simplifies code traceability.

Signed-off-by: Arsenii Pashchenko <ulijg308@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_ap.c       |  4 ++--
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 11 +++-------
 drivers/staging/rtl8723bs/core/rtw_recv.c     | 20 +++++++++++++++----
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  |  2 +-
 4 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index a6640cd7a..274d99e6a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -1775,7 +1775,7 @@ u8 ap_free_sta(struct adapter *padapter,
 		/* tear down TX AMPDU */
 		send_delba(padapter, 1, psta->hwaddr);/*  // originator */
 
-		issue_deauth(padapter, psta->hwaddr, reason);
+		issue_deauth(padapter, psta->hwaddr, reason, false);
 	}
 
 	psta->htpriv.agg_enable_bitmap = 0x0;/* reset */
@@ -1824,7 +1824,7 @@ void rtw_sta_flush(struct adapter *padapter)
 	}
 	spin_unlock_bh(&pstapriv->asoc_list_lock);
 
-	issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING);
+	issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING, false);
 
 	associated_clients_update(padapter, true);
 }
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 48043dae7..84283bb22 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -1296,7 +1296,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
 
 asoc_class2_error:
 
-	issue_deauth(padapter, GetAddr2Ptr(pframe), status);
+	issue_deauth(padapter, GetAddr2Ptr(pframe), status, false);
 
 	return _FAIL;
 
@@ -3152,7 +3152,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
 	return ret;
 }
 
-static int _issue_deauth(struct adapter *padapter, unsigned char *da,
+int issue_deauth(struct adapter *padapter, unsigned char *da,
 			 unsigned short reason, bool wait_ack)
 {
 	struct xmit_frame			*pmgntframe;
@@ -3210,11 +3210,6 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da,
 	return ret;
 }
 
-int issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason)
-{
-	return _issue_deauth(padapter, da, reason, false);
-}
-
 int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int try_cnt,
 	int wait_ms)
 {
@@ -3222,7 +3217,7 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
 	int i = 0;
 
 	do {
-		ret = _issue_deauth(padapter, da, reason, wait_ms > 0);
+		ret = issue_deauth(padapter, da, reason, wait_ms > 0);
 
 		i++;
 
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 86c5e2c4e..78bd04982 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -798,7 +798,10 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
 		    is_zero_ether_addr(mybssid) ||
 		    (memcmp(pattrib->bssid, mybssid, ETH_ALEN))) {
 			if (!bmcast)
-				issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
+				issue_deauth(adapter,
+							 pattrib->bssid,
+							 WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA,
+							 false);
 
 			ret = _FAIL;
 			goto exit;
@@ -852,7 +855,10 @@ static signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame *p
 				if (jiffies_to_msecs(jiffies - send_issue_deauth_time) > 10000 || send_issue_deauth_time == 0) {
 					send_issue_deauth_time = jiffies;
 
-					issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
+					issue_deauth(adapter,
+						pattrib->bssid,
+						WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA,
+						false);
 				}
 			}
 		}
@@ -883,7 +889,10 @@ static signed int sta2ap_data_frame(struct adapter *adapter, union recv_frame *p
 
 		*psta = rtw_get_stainfo(pstapriv, pattrib->src);
 		if (!*psta) {
-			issue_deauth(adapter, pattrib->src, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
+			issue_deauth(adapter,
+						 pattrib->src,
+						 WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA,
+						 false);
 
 			ret = RTW_RX_HANDLED;
 			goto exit;
@@ -907,7 +916,10 @@ static signed int sta2ap_data_frame(struct adapter *adapter, union recv_frame *p
 			ret = RTW_RX_HANDLED;
 			goto exit;
 		}
-		issue_deauth(adapter, pattrib->src, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
+		issue_deauth(adapter,
+					 pattrib->src,
+					 WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA,
+					 false);
 		ret = RTW_RX_HANDLED;
 		goto exit;
 	}
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 9d42b7494..578708cb3 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -546,7 +546,7 @@ s32 issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
 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);
-int issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason);
+int issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason, bool wait_ack);
 int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int try_cnt, int wait_ms);
 void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status);
 void issue_action_SA_Query(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short tid);
-- 
2.55.0


  parent reply	other threads:[~2026-07-15 12:50 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 12:47 [PATCH 00/61] staging: rtl8723bs: monolithic HAL cleanup and tx power limit fix Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 01/61] staging: rtl8723bs: remove redundant rtw_ap_set_group_key wrapper Arsenii Pashchenko
2026-07-15 13:15   ` Greg Kroah-Hartman
2026-07-15 13:19     ` Greg Kroah-Hartman
2026-07-15 12:47 ` [PATCH 02/61] staging: rtl8723bs: replace is_same_ess with rtw_ssid_differ Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 03/61] staging: rtl8723bs: remove redundant rtw_to_roam wrapper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 04/61] staging: rtl8723bs: remove redundant rtw_dec_to_roam helper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 05/61] staging: rtl8723bs: remove unused OnAtim stub function Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 06/61] staging: rtl8723bs: remove DoReserved stub and clean up OnAction_tbl Arsenii Pashchenko
2026-07-15 12:47 ` Arsenii Pashchenko [this message]
2026-07-15 12:47 ` [PATCH 08/61] staging: rtl8723bs: remove unused NULL_hdl function Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 09/61] staging: rtl8723bs: remove unused set_csa_hdl function Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 10/61] staging: rtl8723bs: remove unused tdls_hdl function Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 11/61] staging: rtl8723bs: inline rtw_ps_deny_get() and remove dead code Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 12/61] staging: rtl8723bs: replace custom CMAC with kernel Crypto API helper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 13/61] staging: rtl8723bs: remove redundant rtw_get_oper_ch() wrapper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 14/61] staging: rtl8723bs: remove ODM_CheckPowerStatus and dead branches Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 15/61] staging: rtl8723bs: remove unimplemented halbtcoutsrc_GetBtReg helper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 16/61] staging: rtl8723bs: remove rtw_free_evt_priv wrapper and rename helper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 17/61] staging: rtl8723bs: remove rtw_free_cmd_priv " Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 18/61] staging: rtl8723bs: replace rtw_dm_in_lps_hdl with direct hal call Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 19/61] staging: rtl8723bs: make lps_ctrl_wk_hdl() static Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 20/61] staging: rtl8723bs: sanitize and align efuse read function headers Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 21/61] staging: rtl8723bs: replace rtw_reset_continual_io_error with atomic_set Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 22/61] staging: rtl8723bs: inline single-use init_mlme_default_rate_set Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 23/61] staging: rtl8723bs: remove issue_probereq wrapper and rename helper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 24/61] staging: rtl8723bs: remove register_task_alive inline helper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 25/61] staging: rtl8723bs: remove unregister_task_alive " Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 26/61] staging: rtl8723bs: clean up Michael MIC pseudo header logic Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 27/61] staging: rtl8723bs: replace rtw_set_oper_bw with direct assignment Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 28/61] staging: rtl8723bs: inline single-use _clear_cam_entry helper Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 29/61] staging: rtl8723bs: collapse set_sta_rate and Update_RA_Entry wrappers Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 30/61] staging: rtl8723bs: replace correct_TSF with direct HAL call Arsenii Pashchenko
2026-07-15 12:47 ` [PATCH 31/61] staging: rtl8723bs: replace rtw_sctx_done with direct status call Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 32/61] staging: rtl8723bs: remove rtw_free_mlme_priv wrapper and rename helper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 33/61] staging: rtl8723bs: remove duplicate prototype of rtw_free_network_nolock Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 34/61] staging: rtl8723bs: replace rtw_get_beacon_interval_from_ie with define Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 35/61] staging: rtl8723bs: inline _rtw_free_network_nolock into wrapper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 36/61] staging: rtl8723bs: remove rtw_wmm_event_callback and update handler Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 37/61] staging: rtl8723bs: replace halbtc8723b1ant_SwMechanism with direct call Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 38/61] staging: rtl8723bs: remove redundant ternary operators from bool returns Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 39/61] staging: rtl8723bs: remove redundant DM wrapper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 40/61] staging: rtl8723bs: remove EXhalbtc8723b2ant_InitHwConfig Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 41/61] staging: rtl8723bs: remove EXhalbtc8723b1ant_InitHwConfig Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 42/61] staging: rtl8723bs: remove ConfigureTxpowerTrack wrapper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 43/61] staging: rtl8723bs: remove hal_init_macaddr wrapper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 44/61] staging: rtl8723bs: remove rtw_init_hal_com_default_value Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 45/61] staging: rtl8723bs: remove c2h_evt_clear wrapper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 46/61] staging: rtl8723bs: remove rtw_get_mgntframe_raid helper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 47/61] staging: rtl8723bs: clean up phy power conversion function Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 48/61] staging: rtl8723bs: remove PHY_TxPowerByRateConfiguration wrapper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 49/61] staging: rtl8723bs: remove phy_GetChannelIndexOfTxPowerLimit helper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 50/61] staging: rtl8723bs: inline SetHwReg8723BS into rtw_hal_set_hwreg Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 51/61] staging: rtl8723bs: inline GetHwReg8723BS into rtw_hal_get_hwreg Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 52/61] staging: rtl8723bs: inline SetHwRegWithBuf8723B into helper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 53/61] staging: rtl8723bs: inline GetHalDefVar8723BSDIO " Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 54/61] staging: rtl8723bs: inline SetHalODMVar into rtw_hal_set_odm_var Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 55/61] staging: rtl8723bs: inline CheckIPSStatus logic with defines Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 56/61] staging: rtl8723bs: inline rtl8723bs_hal_xmitframe_enqueue helper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 57/61] staging: rtl8723bs: inline rtl8723bs_hal_xmit into rtw_hal_xmit Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 58/61] staging: rtl8723bs: extend rtw_hal_mgnt_xmit functionality Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 59/61] staging: rtl8723bs: inline rtl8723bs_init_xmit_priv helper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 60/61] staging: rtl8723bs: inline recv private data freeing helper Arsenii Pashchenko
2026-07-15 12:48 ` [PATCH 61/61] staging: rtl8723bs: fix tx power limit lookup by using correct channel index Arsenii Pashchenko
2026-07-15 13:03 ` [PATCH 00/61] staging: rtl8723bs: monolithic HAL cleanup and tx power limit fix Greg Kroah-Hartman

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=20260715124829.90290-8-ulijg308@gmail.com \
    --to=ulijg308@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