* [PATCH] staging: rtl8723bs: use bool for PMKSA flags
@ 2026-08-21 14:53 Tiago Panizio Gottardo
0 siblings, 0 replies; only message in thread
From: Tiago Panizio Gottardo @ 2026-08-21 14:53 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Dalvin-Ehinoma Noah Aiguobas, linux-staging, linux-kernel,
Tiago Panizio Gottardo
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@hotmail.com>
---
.../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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-21 14:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 14:53 [PATCH] staging: rtl8723bs: use bool for PMKSA flags Tiago Panizio Gottardo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®