[ To be honest, it looks like commit 5befa937e8da: "staging: rtl8723bs:
  Fix IEEE80211 authentication algorithm constants." was just wrong and
  should be reverted.  The names look similar, yes but *all* three
  values are different.

  Quytelda, can you send a revert patch or fix it or something?  -dan ]

Hello Quytelda Kahja,

The patch 5befa937e8da: "staging: rtl8723bs: Fix IEEE80211
authentication algorithm constants." from Mar 27, 2018, leads to the
following static checker warning:

    drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:479 wpa_set_auth_algs()
    warn: bitwise AND condition is false here

    drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:490 wpa_set_auth_algs()
    warn: bitwise AND condition is false here

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
   474  static int wpa_set_auth_algs(struct net_device *dev, u32 value)
   475  {
   476          struct adapter *padapter = (struct adapter *) 
rtw_netdev_priv(dev);
   477          int ret = 0;
   478  
   479          if ((value & WLAN_AUTH_SHARED_KEY) && (value & WLAN_AUTH_OPEN)) 
{
                                                       ^^^^^^^^^^^^^^^^^^^^^^
   480                  DBG_871X("wpa_set_auth_algs, WLAN_AUTH_SHARED_KEY and 
WLAN_AUTH_OPEN [value:0x%x]\n", value);
   481                  padapter->securitypriv.ndisencryptstatus = 
Ndis802_11Encryption1Enabled;
   482                  padapter->securitypriv.ndisauthtype = 
Ndis802_11AuthModeAutoSwitch;
   483                  padapter->securitypriv.dot11AuthAlgrthm = 
dot11AuthAlgrthm_Auto;
   484          } else if (value & WLAN_AUTH_SHARED_KEY)        {
   485                  DBG_871X("wpa_set_auth_algs, WLAN_AUTH_SHARED_KEY  
[value:0x%x]\n", value);
   486                  padapter->securitypriv.ndisencryptstatus = 
Ndis802_11Encryption1Enabled;
   487  
   488                  padapter->securitypriv.ndisauthtype = 
Ndis802_11AuthModeShared;
   489                  padapter->securitypriv.dot11AuthAlgrthm = 
dot11AuthAlgrthm_Shared;
   490          } else if (value & WLAN_AUTH_OPEN) {
                           ^^^^^^^^^^^^^^^^^^^^^^

   491                  DBG_871X("wpa_set_auth_algs, WLAN_AUTH_OPEN\n");
   492                  /* padapter->securitypriv.ndisencryptstatus = 
Ndis802_11EncryptionDisabled; */
   493                  if (padapter->securitypriv.ndisauthtype < 
Ndis802_11AuthModeWPAPSK) {
   494                          padapter->securitypriv.ndisauthtype = 
Ndis802_11AuthModeOpen;
   495                          padapter->securitypriv.dot11AuthAlgrthm = 
dot11AuthAlgrthm_Open;
   496                  }
   497          } else if (value & WLAN_AUTH_LEAP) {
   498                  DBG_871X("wpa_set_auth_algs, WLAN_AUTH_LEAP\n");
   499          } else {
   500                  DBG_871X("wpa_set_auth_algs, error!\n");
   501                  ret = -EINVAL;
   502          }
   503  
   504          return ret;
   505  
   506  }

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to