[PATCH 06/10] staging: rtl8723bs: remove unused num member from struct mlme_handler

From: Rishik Yechuri

Date: Tue Oct 13 2026 - 17:24:39 EST


The num member of struct mlme_handler is initialised in mlme_sta_tbl[]
with the WIFI_* subtype constants but is never read. The table is
indexed directly by the frame subtype in mgt_dispatcher(), and only the
func member of each entry is used.

Remove the member and its initialisers. This drops the last references
to several WIFI_* constants that have no equivalent in
<linux/ieee80211.h>, such as WIFI_ACTION_NOACK, so that the private
frame type definitions can be removed in a later change.

No functional change intended.

Signed-off-by: Rishik Yechuri <rishik.yechuri.code@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 30 +++++++++----------
.../staging/rtl8723bs/include/rtw_mlme_ext.h | 1 -
2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index e315d693f..3096d4c61 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -12,23 +12,23 @@
#include <linux/unaligned.h>

static struct mlme_handler mlme_sta_tbl[] = {
- {WIFI_ASSOCREQ, "OnAssocReq", &OnAssocReq},
- {WIFI_ASSOCRSP, "OnAssocRsp", &OnAssocRsp},
- {WIFI_REASSOCREQ, "OnReAssocReq", &OnAssocReq},
- {WIFI_REASSOCRSP, "OnReAssocRsp", &OnAssocRsp},
- {WIFI_PROBEREQ, "OnProbeReq", &OnProbeReq},
- {WIFI_PROBERSP, "OnProbeRsp", &OnProbeRsp},
+ {"OnAssocReq", &OnAssocReq},
+ {"OnAssocRsp", &OnAssocRsp},
+ {"OnReAssocReq", &OnAssocReq},
+ {"OnReAssocRsp", &OnAssocRsp},
+ {"OnProbeReq", &OnProbeReq},
+ {"OnProbeRsp", &OnProbeRsp},

/* below 2 are reserved */
- {0, "DoReserved", &DoReserved},
- {0, "DoReserved", &DoReserved},
- {WIFI_BEACON, "OnBeacon", &OnBeacon},
- {WIFI_ATIM, "OnATIM", &OnAtim},
- {WIFI_DISASSOC, "OnDisassoc", &OnDisassoc},
- {WIFI_AUTH, "OnAuth", &OnAuthClient},
- {WIFI_DEAUTH, "OnDeAuth", &OnDeAuth},
- {WIFI_ACTION, "OnAction", &OnAction},
- {WIFI_ACTION_NOACK, "OnActionNoAck", &OnAction},
+ {"DoReserved", &DoReserved},
+ {"DoReserved", &DoReserved},
+ {"OnBeacon", &OnBeacon},
+ {"OnATIM", &OnAtim},
+ {"OnDisassoc", &OnDisassoc},
+ {"OnAuth", &OnAuthClient},
+ {"OnDeAuth", &OnDeAuth},
+ {"OnAction", &OnAction},
+ {"OnActionNoAck", &OnAction},
};

static struct action_handler OnAction_tbl[] = {
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 847a1d75f..5ef81c347 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -205,7 +205,6 @@ enum {
};

struct mlme_handler {
- unsigned int num;
char *str;
unsigned int (*func)(struct adapter *padapter, union recv_frame *precv_frame);
};
--
2.43.0