staging: rtl8723bs: remove references to nonexistent CONFIG_IEEE80211W option
PATCH 1/1 staging: rtl8723bs: remove references to nonexistent CONFIG_IEEE80211W option
Comments in the rtl8723bs driver contain many references to CONFIG_IEEE80211W, which does not exist in the kernel (though it does exist in wpa_supplicant, where this code was likely also used). Remove them.
Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.
Signed-off-by Ethan Nelson-Moore <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 -- .../staging/rtl8723bs/core/rtw_ioctl_set.c | 1 - drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 --- drivers/staging/rtl8723bs/core/rtw_security.c | 26 ++++++------------- drivers/staging/rtl8723bs/include/drv_types.h | 2 +- drivers/staging/rtl8723bs/include/ieee80211.h | 4 +-- drivers/staging/rtl8723bs/include/rtw_cmd.h | 5 ++-- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 1 - 8 files changed, 13 insertions(+), 31 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -2
@@ -1002,7 +1002,6 @@ u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)return res; } -/* add for CONFIG_IEEE80211W, none 11w can use it */ u8 rtw_reset_securitypriv_cmd (struct adapter *padapter) {struct cmd_obj *ph2c;
@@ -1761,7 +1760,6 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)case CHECK_HIQ_WK_CID :rtw_chk_hi_queue_hdl (padapter);break ; -/* add for CONFIG_IEEE80211W, none 11w can use it */ case RESET_SECURITYPRIV :rtw_reset_securitypriv (padapter);break ;
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +0 -1
@@ -350,7 +350,6 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)if (check_fwstate (pmlmepriv, _FW_LINKED) == true) {rtw_disassoc_cmd (padapter,0 , true);rtw_indicate_disconnect (padapter); -/* modify for CONFIG_IEEE80211W, none 11w can use it */ rtw_free_assoc_resources_cmd (padapter);rtw_pwr_wakeup (padapter); }
drivers/staging/rtl8723bs/core/rtw_mlme.c +0 -3
@@ -900,7 +900,6 @@ void rtw_indicate_disconnect(struct adapter *padapter)rtw_cfg80211_indicate_disconnect (padapter); -/* modify for CONFIG_IEEE80211W, none 11w also can use the same command */ rtw_reset_securitypriv_cmd (padapter);/* set ips_deny_time to avoid enter IPS before LPS leave */
@@ -1084,7 +1083,6 @@ void rtw_reset_securitypriv(struct adapter *adapter)u8 backupPMKIDIndex =0 ;u8 backupTKIPCountermeasure =0x00 ;u32 backupTKIPcountermeasure_time =0 ; -/* add for CONFIG_IEEE80211W, none 11w also can use */ struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;spin_lock_bh (&adapter->security_key_mutex);
@@ -1134,7 +1132,6 @@ void rtw_reset_securitypriv(struct adapter *adapter) psec_priv->ndisencryptstatus = Ndis802_11WEPDisabled;/* */ } -/* add for CONFIG_IEEE80211W, none 11w also can use */ spin_unlock_bh (&adapter->security_key_mutex); }
drivers/staging/rtl8723bs/core/rtw_security.c +8 -18
@@ -630,7 +630,7 @@ static void construct_mic_iv(u8 *mic_iv,u8 *mpdu, uint payload_length, u8 *pn_vector, - uint frtype) /* add for CONFIG_IEEE80211W, none 11w also can use */ + uint frtype) { signed int i;
@@ -671,7 +671,7 @@ static void construct_mic_iv(u8 *mic_iv,static void construct_mic_header1 (u8 *mic_header1,signed int header_length,u8 *mpdu, -uint frtype)/* for CONFIG_IEEE80211W, none 11w also can use */ +uint frtype) { mic_header1[0 ] = (u8)((header_length -2 ) /256 ); mic_header1[1 ] = (u8)((header_length -2 ) %256 );
@@ -754,7 +754,7 @@ static void construct_ctr_preload(u8 *ctr_preload, u8 *mpdu, u8 *pn_vector, signed int c, - uint frtype) /* for CONFIG_IEEE80211W, none 11w also can use */ + uint frtype) {signed int i =0 ;
@@ -819,7 +819,7 @@ static signed int aes_cipher(u8 *key, uint hdrlen,if (hdrlen !=WLAN_HDR_A3_QOS_LEN ) hdrlen +=2 ; - } else if ((frtype == WIFI_DATA) && /* add for CONFIG_IEEE80211W, none 11w also can use */ + } else if ((frtype == WIFI_DATA) && ((frsubtype == 0x08) || (frsubtype == 0x09) || (frsubtype == 0x0a) ||
@@ -845,12 +845,12 @@ static signed int aes_cipher(u8 *key, uint hdrlen, pframe,/* message, */ plen, pn_vector, - frtype); /* add for CONFIG_IEEE80211W, none 11w also can use */ + frtype);construct_mic_header1 (mic_header1, hdrlen, pframe,/* message */ - frtype);/* add for CONFIG_IEEE80211W, none 11w also can use */ + frtype); construct_mic_header2(mic_header2, pframe, /* message, */
@@ -899,7 +899,6 @@ static signed int aes_cipher(u8 *key, uint hdrlen,for (i =0 ; i < num_blocks; i++) {construct_ctr_preload (ctr_preload, a4_exists, qc_exists, pframe,/* message, */ pn_vector, i +1 , frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ aes128k128d (key, ctr_preload, aes_out);crypto_xor_cpy (chain_buffer, aes_out, &pframe[payload_index],16 );for (j =0 ; j <16 ; j++)
@@ -911,7 +910,6 @@ static signed int aes_cipher(u8 *key, uint hdrlen,/* encrypt it and copy the unpadded part back */ construct_ctr_preload (ctr_preload, a4_exists, qc_exists, pframe,/* message, */ pn_vector, num_blocks +1 , frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ for (j =0 ; j <16 ; j++) padded_buffer[j] =0x00 ;
@@ -927,7 +925,6 @@ static signed int aes_cipher(u8 *key, uint hdrlen,/* Encrypt the MIC */ construct_ctr_preload (ctr_preload, a4_exists, qc_exists, pframe,/* message, */ pn_vector,0 , frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ for (j =0 ; j <16 ; j++) padded_buffer[j] =0x00 ;
@@ -1037,7 +1034,7 @@ static signed int aes_decipher(u8 *key, uint hdrlen,if (hdrlen !=WLAN_HDR_A3_QOS_LEN ) hdrlen +=2 ; - } else if ((frtype == WIFI_DATA) && /* only for data packet . add for CONFIG_IEEE80211W, none 11w also can use */ + } else if ((frtype == WIFI_DATA) && ((frsubtype == 0x08) || (frsubtype == 0x09) || (frsubtype == 0x0a) ||
@@ -1058,7 +1055,7 @@ static signed int aes_decipher(u8 *key, uint hdrlen,construct_ctr_preload (ctr_preload, a4_exists, qc_exists, pframe, pn_vector, i +1 , - frtype);/* add for CONFIG_IEEE80211W, none 11w also can use */ + frtype);aes128k128d (key, ctr_preload, aes_out);crypto_xor_cpy (chain_buffer, aes_out, &pframe[payload_index],16 );
@@ -1072,7 +1069,6 @@ static signed int aes_decipher(u8 *key, uint hdrlen,/* encrypt it and copy the unpadded part back */ construct_ctr_preload (ctr_preload, a4_exists, qc_exists, pframe, pn_vector, num_blocks +1 , frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ for (j =0 ; j <16 ; j++) padded_buffer[j] =0x00 ;
@@ -1097,10 +1093,8 @@ static signed int aes_decipher(u8 *key, uint hdrlen, pn_vector[5 ] = pframe[hdrlen +7 ];construct_mic_iv (mic_iv, qc_exists, a4_exists, message, plen -8 , pn_vector, frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ construct_mic_header1 (mic_header1, hdrlen, message, frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ construct_mic_header2 (mic_header2, message, a4_exists, qc_exists); payload_remainder = (plen -8 ) %16 ;
@@ -1145,7 +1139,6 @@ static signed int aes_decipher(u8 *key, uint hdrlen,for (i =0 ; i < num_blocks; i++) {construct_ctr_preload (ctr_preload, a4_exists, qc_exists, message, pn_vector, i +1 , frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ aes128k128d (key, ctr_preload, aes_out);crypto_xor_cpy (chain_buffer, aes_out, &message[payload_index],16 );for (j =0 ; j <16 ; j++)
@@ -1157,7 +1150,6 @@ static signed int aes_decipher(u8 *key, uint hdrlen,/* encrypt it and copy the unpadded part back */ construct_ctr_preload (ctr_preload, a4_exists, qc_exists, message, pn_vector, num_blocks +1 , frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ for (j =0 ; j <16 ; j++) padded_buffer[j] =0x00 ;
@@ -1172,7 +1164,6 @@ static signed int aes_decipher(u8 *key, uint hdrlen,/* Encrypt the MIC */ construct_ctr_preload (ctr_preload, a4_exists, qc_exists, message, pn_vector,0 , frtype); -/* add for CONFIG_IEEE80211W, none 11w also can use */ for (j =0 ; j <16 ; j++) padded_buffer[j] =0x00 ;
@@ -1446,7 +1437,6 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,* This is a mode for using block cipher (AES in this case) for authentication. * OMAC1 was standardized with the name CMAC by NIST in a Special Publication * (SP) 800-38B. -* modify for CONFIG_IEEE80211W */ int omac1_aes_128 (u8 *key,u8 *data,size_t data_len,u8 *mac) {
drivers/staging/rtl8723bs/include/drv_types.h +1 -1
@@ -286,7 +286,7 @@ struct adapter {struct recv_priv recvpriv;struct sta_priv stapriv;struct security_priv securitypriv; -spinlock_t security_key_mutex;/* add for CONFIG_IEEE80211W, none 11w also can use */ +spinlock_t security_key_mutex;struct registry_priv registrypriv;struct eeprom_priv eeprompriv;
drivers/staging/rtl8723bs/include/ieee80211.h +2 -2
@@ -528,9 +528,9 @@ enum {RTW_WLAN_CATEGORY_FT =6 ,RTW_WLAN_CATEGORY_HT =7 ,RTW_WLAN_CATEGORY_SA_QUERY =8 , -RTW_WLAN_CATEGORY_UNPROTECTED_WNM =11 ,/* add for CONFIG_IEEE80211W, none 11w also can use */ +RTW_WLAN_CATEGORY_UNPROTECTED_WNM =11 ,RTW_WLAN_CATEGORY_TDLS =12 , -RTW_WLAN_CATEGORY_SELF_PROTECTED =15 ,/* add for CONFIG_IEEE80211W, none 11w also can use */ +RTW_WLAN_CATEGORY_SELF_PROTECTED =15 ,RTW_WLAN_CATEGORY_WMM =17 , RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */ };
drivers/staging/rtl8723bs/include/rtw_cmd.h +2 -3
@@ -133,8 +133,8 @@ enum { INTEl_WIDI_WK_CID,C2H_WK_CID ,RTP_TIMER_CFG_WK_CID , -RESET_SECURITYPRIV ,/* add for CONFIG_IEEE80211W, none 11w also can use */ -FREE_ASSOC_RESOURCES ,/* add for CONFIG_IEEE80211W, none 11w also can use */ +RESET_SECURITYPRIV , +FREE_ASSOC_RESOURCES ,DM_IN_LPS_WK_CID ,DM_RA_MSK_WK_CID ,/* add for STA update RAMask when bandwidth change. */ BEAMFORMING_WK_CID,
@@ -594,7 +594,6 @@ extern u8 rtw_setfwdig_cmd(struct adapter *padapter, u8 type);extern u8 rtw_setfwra_cmd (struct adapter *padapter,u8 type);extern u8 rtw_addbareq_cmd (struct adapter *padapter,u8 tid,u8 *addr); -/* add for CONFIG_IEEE80211W, none 11w also can use */ extern u8 rtw_reset_securitypriv_cmd (struct adapter *padapter);extern u8 rtw_free_assoc_resources_cmd (struct adapter *padapter);extern u8 rtw_dynamic_chk_wk_cmd (struct adapter *adapter);
drivers/staging/rtl8723bs/os_dep/os_intfs.c +0 -1
@@ -658,7 +658,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter)if (_rtw_init_recv_priv (&padapter->recvpriv, padapter) == _FAIL) goto free_xmit_priv; -/* add for CONFIG_IEEE80211W, none 11w also can use */ spin_lock_init (&padapter->security_key_mutex);/* We don't need to memset padapter->XXX to zero, because adapter is allocated by vzalloc(). */
Signature · 1 line
2.43.0