This is a note to let you know that I've just added the patch titled staging: rtl8723bs: fix wpa_set_auth_algs() function to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: staging-rtl8723bs-fix-wpa_set_auth_algs-function.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b658acbf64ae38b8fca982c2929ccc0bf4eb1ea2 Mon Sep 17 00:00:00 2001 From: Fabio Aiuto <fabioaiuto83@xxxxxxxxx> Date: Thu, 15 Jul 2021 16:57:00 +0200 Subject: staging: rtl8723bs: fix wpa_set_auth_algs() function From: Fabio Aiuto <fabioaiuto83@xxxxxxxxx> commit b658acbf64ae38b8fca982c2929ccc0bf4eb1ea2 upstream. fix authentication algorithm constants. wpa_set_auth_algs() function contains some conditional statements masking the checked value with the wrong constants. This produces some unintentional dead code. Mask the value with the right macros. Fixes: 5befa937e8da ("staging: rtl8723bs: Fix IEEE80211 authentication algorithm constants.") Reported-by: Colin Ian King <colin.king@xxxxxxxxxxxxx> Tested-on: Lenovo Ideapad MiiX 300-10IBY Signed-off-by: Fabio Aiuto <fabioaiuto83@xxxxxxxxx> Link: https://lore.kernel.org/r/20210715145700.9427-1-fabioaiuto83@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c @@ -349,16 +349,16 @@ static int wpa_set_auth_algs(struct net_ struct adapter *padapter = rtw_netdev_priv(dev); int ret = 0; - if ((value & WLAN_AUTH_SHARED_KEY) && (value & WLAN_AUTH_OPEN)) { + if ((value & IW_AUTH_ALG_SHARED_KEY) && (value & IW_AUTH_ALG_OPEN_SYSTEM)) { padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeAutoSwitch; padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Auto; - } else if (value & WLAN_AUTH_SHARED_KEY) { + } else if (value & IW_AUTH_ALG_SHARED_KEY) { padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeShared; padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Shared; - } else if (value & WLAN_AUTH_OPEN) { + } else if (value & IW_AUTH_ALG_OPEN_SYSTEM) { /* padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; */ if (padapter->securitypriv.ndisauthtype < Ndis802_11AuthModeWPAPSK) { padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; Patches currently in stable-queue which might be from fabioaiuto83@xxxxxxxxx are queue-5.14/staging-rtl8723bs-fix-wpa_set_auth_algs-function.patch