staging: rtl8723bs: modify struct field to use standard bool type
authorAbraham Samuel Adekunle <abrahamadekunle50@gmail.com>
Fri, 4 Apr 2025 08:20:39 +0000 (09:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 14:28:08 +0000 (16:28 +0200)
The struct sta_info field ieee8021x_blocked uses the uint values
0 and 1 to represent false and true values respectively.

Convert cases to use the bool type instead to ensure consistency
with other parts of the containing code where true or false have
been used.

This change causes the struct field to change size from a 32bit to
an 8bit. However, the change is safe to make because the sta_info
struct is not read from the hardware.

Reported by Coccinelle.

Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
Link: https://lore.kernel.org/r/Z++WV1132FCULn+0@HP-650
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ap.c
drivers/staging/rtl8723bs/include/sta_info.h

index 50022bb5911efeccd562134a6e3c23e2bd9c0a63..383a6f7c06f4453171e2be7f3e9a5f95010a4eff 100644 (file)
@@ -389,7 +389,7 @@ void update_bmc_sta(struct adapter *padapter)
                psta->qos_option = 0;
                psta->htpriv.ht_option = false;
 
-               psta->ieee8021x_blocked = 0;
+               psta->ieee8021x_blocked = false;
 
                memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
 
index b3535fed3de768b7e15da3f6c8b600b4711dd77b..63343998266ad5795eb0a375da497a89b76f357c 100644 (file)
@@ -86,7 +86,7 @@ struct sta_info {
        uint qos_option;
        u8 hwaddr[ETH_ALEN];
 
-       uint    ieee8021x_blocked;      /* 0: allowed, 1:blocked */
+       bool ieee8021x_blocked;
        uint    dot118021XPrivacy; /* aes, tkip... */
        union Keytype   dot11tkiptxmickey;
        union Keytype   dot11tkiprxmickey;