[PATCH] staging: rtl8723bs: use bool for PMKSA flags

From: Tiago Panizio Gottardo

Date: Fri Aug 21 2026 - 10:57:30 EST


The inserted and matched variables only track boolean state in the PMKSA
helpers. Use bool instead of u8 and give the variables clearer names.

No functional changes intended.

Signed-off-by: Tiago Panizio Gottardo <tiago.panizio@xxxxxxxxxxx>
---
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index a8fa485304f6..bb3db79c99cd 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1830,27 +1830,26 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
struct net_device *ndev,
struct cfg80211_pmksa *pmksa)
{
- u8 index, blInserted = false;
+ bool inserted = false;
+ u8 index;
struct adapter *padapter = rtw_netdev_priv(ndev);
struct security_priv *psecuritypriv = &padapter->securitypriv;

if (is_zero_ether_addr((u8 *)pmksa->bssid))
return -EINVAL;

- blInserted = false;
-
/* overwrite PMKID */
for (index = 0 ; index < NUM_PMKID_CACHE; index++) {
if (!memcmp(psecuritypriv->PMKIDList[index].Bssid, (u8 *)pmksa->bssid, ETH_ALEN)) {
memcpy(psecuritypriv->PMKIDList[index].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN);
psecuritypriv->PMKIDList[index].bUsed = true;
psecuritypriv->PMKIDIndex = index + 1;
- blInserted = true;
+ inserted = true;
break;
}
}

- if (!blInserted) {
+ if (!inserted) {
memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, (u8 *)pmksa->bssid, ETH_ALEN);
memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN);

@@ -1867,7 +1866,8 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
struct net_device *ndev,
struct cfg80211_pmksa *pmksa)
{
- u8 index, bMatched = false;
+ bool matched = false;
+ u8 index;
struct adapter *padapter = rtw_netdev_priv(ndev);
struct security_priv *psecuritypriv = &padapter->securitypriv;

@@ -1880,12 +1880,12 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
eth_zero_addr(psecuritypriv->PMKIDList[index].Bssid);
memset(psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN);
psecuritypriv->PMKIDList[index].bUsed = false;
- bMatched = true;
+ matched = true;
break;
}
}

- if (!bMatched)
+ if (!matched)
return -EINVAL;

return 0;
--
2.55.0