[PATCH 01/61] staging: rtl8723bs: remove redundant rtw_ap_set_group_key wrapper
From: Arsenii Pashchenko
Date: Wed Jul 15 2026 - 08:49:37 EST
Eliminate the redundant rtw_ap_set_group_key() wrapper function by
calling rtw_ap_set_key() directly with the set_tx parameter set to 1.
This reduces boilerplate code and cleans up the driver interface.
Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_ap.c | 7 +------
drivers/staging/rtl8723bs/include/rtw_ap.h | 2 +-
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 ++++++--
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 065850a9e..a6640cd7a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -1195,7 +1195,7 @@ u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
return res;
}
-static int rtw_ap_set_key(struct adapter *padapter,
+int rtw_ap_set_key(struct adapter *padapter,
u8 *key,
u8 alg,
int keyid,
@@ -1258,11 +1258,6 @@ static int rtw_ap_set_key(struct adapter *padapter,
return res;
}
-int rtw_ap_set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
-{
- return rtw_ap_set_key(padapter, key, alg, keyid, 1);
-}
-
int rtw_ap_set_wep_key(struct adapter *padapter,
u8 *key,
u8 keylen,
diff --git a/drivers/staging/rtl8723bs/include/rtw_ap.h b/drivers/staging/rtl8723bs/include/rtw_ap.h
index 83e835eb6..cdd9f291f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_ap.h
+++ b/drivers/staging/rtl8723bs/include/rtw_ap.h
@@ -22,7 +22,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr);
void rtw_acl_remove_sta(struct adapter *padapter, u8 *addr);
u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta);
-int rtw_ap_set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid);
+int rtw_ap_set_key(struct adapter *padapter, u8 *key, u8 alg, int keyid, u8 set_tx);
int rtw_ap_set_wep_key(struct adapter *padapter, u8 *key, u8 keylen, int keyid, u8 set_tx);
void associated_clients_update(struct adapter *padapter, u8 updated);
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 1484336d7..ce76a8586 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -604,7 +604,9 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;/* */
- rtw_ap_set_group_key(padapter, param->u.crypt.key, psecuritypriv->dot118021XGrpPrivacy, param->u.crypt.idx);
+ rtw_ap_set_key(padapter, param->u.crypt.key,
+ psecuritypriv->dot118021XGrpPrivacy,
+ param->u.crypt.idx, 1);
pbcmc_sta = rtw_get_bcmc_stainfo(padapter);
if (pbcmc_sta) {
@@ -678,7 +680,9 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;/* */
- rtw_ap_set_group_key(padapter, param->u.crypt.key, psecuritypriv->dot118021XGrpPrivacy, param->u.crypt.idx);
+ rtw_ap_set_key(padapter, param->u.crypt.key,
+ psecuritypriv->dot118021XGrpPrivacy,
+ param->u.crypt.idx, 1);
pbcmc_sta = rtw_get_bcmc_stainfo(padapter);
if (pbcmc_sta) {
--
2.55.0