Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723bs: Fix IEEE80211 authentication algorithm constants.

This driver's local ieee80211 include file defines the constants
AUTH_ALG_* to represent authenication algorithm options. However,
these constants are defined in 'linux/ieee80211.h' as WLAN_AUTH_*,
and have the correct values.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Quytelda Kahja and committed by
Greg Kroah-Hartman
5befa937 79652e2c

+8 -12
-4
drivers/staging/rtl8723bs/include/ieee80211.h
··· 84 84 #define IEEE_PARAM_IEEE_802_1X 6 85 85 #define IEEE_PARAM_WPAX_SELECT 7 86 86 87 - #define AUTH_ALG_OPEN_SYSTEM 0x1 88 - #define AUTH_ALG_SHARED_KEY 0x2 89 - #define AUTH_ALG_LEAP 0x00000004 90 - 91 87 #define IEEE_MLME_STA_DEAUTH 1 92 88 #define IEEE_MLME_STA_DISASSOC 2 93 89
+8 -8
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
··· 476 476 struct adapter *padapter = (struct adapter *) rtw_netdev_priv(dev); 477 477 int ret = 0; 478 478 479 - if ((value & AUTH_ALG_SHARED_KEY) && (value & AUTH_ALG_OPEN_SYSTEM)) { 480 - DBG_871X("wpa_set_auth_algs, AUTH_ALG_SHARED_KEY and AUTH_ALG_OPEN_SYSTEM [value:0x%x]\n", value); 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 481 padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; 482 482 padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeAutoSwitch; 483 483 padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Auto; 484 - } else if (value & AUTH_ALG_SHARED_KEY) { 485 - DBG_871X("wpa_set_auth_algs, AUTH_ALG_SHARED_KEY [value:0x%x]\n", value); 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 486 padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; 487 487 488 488 padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeShared; 489 489 padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Shared; 490 - } else if (value & AUTH_ALG_OPEN_SYSTEM) { 491 - DBG_871X("wpa_set_auth_algs, AUTH_ALG_OPEN_SYSTEM\n"); 490 + } else if (value & WLAN_AUTH_OPEN) { 491 + DBG_871X("wpa_set_auth_algs, WLAN_AUTH_OPEN\n"); 492 492 /* padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; */ 493 493 if (padapter->securitypriv.ndisauthtype < Ndis802_11AuthModeWPAPSK) { 494 494 padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; 495 495 padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Open; 496 496 } 497 - } else if (value & AUTH_ALG_LEAP) { 498 - DBG_871X("wpa_set_auth_algs, AUTH_ALG_LEAP\n"); 497 + } else if (value & WLAN_AUTH_LEAP) { 498 + DBG_871X("wpa_set_auth_algs, WLAN_AUTH_LEAP\n"); 499 499 } else { 500 500 DBG_871X("wpa_set_auth_algs, error!\n"); 501 501 ret = -EINVAL;