[PATCH 06/61] staging: rtl8723bs: remove DoReserved stub and clean up OnAction_tbl
From: Arsenii Pashchenko
Date: Wed Jul 15 2026 - 08:57:51 EST
The DoReserved() function is an empty stub that merely returns _SUCCESS
without performing any actual work. Remove the redundant function
definition and its prototype.
Concurrently, clean up the OnAction_tbl array by physically removing the
now-unused elements that referenced DoReserved or contained NULL. Since
OnAction() iterates through this table sequentially using ARRAY_SIZE(),
removing these entries safely shrinks the array size and eliminates dead
code.
Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 16 ++--------------
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +-
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 774fa9e32..48043dae7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -20,8 +20,8 @@ static struct mlme_handler mlme_sta_tbl[] = {
{WIFI_PROBERSP, "OnProbeRsp", &OnProbeRsp},
/* below 2 are reserved */
- {0, "DoReserved", &DoReserved},
- {0, "DoReserved", &DoReserved},
+ {0, "DoReserved", NULL},
+ {0, "DoReserved", NULL},
{WIFI_BEACON, "OnBeacon", &OnBeacon},
{WIFI_ATIM, "OnATIM", NULL},
{WIFI_DISASSOC, "OnDisassoc", &OnDisassoc},
@@ -33,18 +33,10 @@ static struct mlme_handler mlme_sta_tbl[] = {
static struct action_handler OnAction_tbl[] = {
{RTW_WLAN_CATEGORY_SPECTRUM_MGMT, "ACTION_SPECTRUM_MGMT", on_action_spct},
- {RTW_WLAN_CATEGORY_QOS, "ACTION_QOS", &DoReserved},
- {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &DoReserved},
{RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back},
{RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public},
- {RTW_WLAN_CATEGORY_RADIO_MEASUREMENT, "ACTION_RADIO_MEASUREMENT", &DoReserved},
- {RTW_WLAN_CATEGORY_FT, "ACTION_FT", &DoReserved},
{RTW_WLAN_CATEGORY_HT, "ACTION_HT", &OnAction_ht},
{RTW_WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &OnAction_sa_query},
- {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved},
- {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved},
- {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved},
- {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved},
};
static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
@@ -1836,10 +1828,6 @@ unsigned int OnAction(struct adapter *padapter, union recv_frame *precv_frame)
return _SUCCESS;
}
-unsigned int DoReserved(struct adapter *padapter, union recv_frame *precv_frame)
-{
- return _SUCCESS;
-}
static struct xmit_frame *_alloc_mgtxmitframe(struct xmit_priv *pxmitpriv, bool once)
{
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 332411ead..9d42b7494 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -562,7 +562,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame);
unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame);
unsigned int OnProbeRsp(struct adapter *padapter, union recv_frame *precv_frame);
-unsigned int DoReserved(struct adapter *padapter, union recv_frame *precv_frame);
+
unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame);
unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame);
unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame);
--
2.55.0