diff options
author | Fabio Aiuto <fabioaiuto83@gmail.com> | 2021-04-07 15:49:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-07 17:13:03 +0200 |
commit | 709c8e49b51c3702417941ac5f45ae12e4e405ce (patch) | |
tree | 93fed10a17d71a6a2f88de5ac3dbd5582a879324 /drivers/staging/rtl8723bs/core/rtw_security.c | |
parent | b4f27a06f6382b9d6f9f5cd8a6445b0af001a2a6 (diff) | |
download | linux-709c8e49b51c3702417941ac5f45ae12e4e405ce.tar.bz2 |
staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites
remove unnecessary bracks on DBG_871X removal sites
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/35f5edf0f39b717b3de3ad7861cbaa5f4ba60576.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/core/rtw_security.c')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_security.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index eca1e0f0680c..302479d9236b 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -1587,9 +1587,8 @@ static signed int aes_decipher(u8 *key, uint hdrlen, /* compare the mic */ for (i = 0; i < 8; i++) { - if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) { + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) res = _FAIL; - } } return res; } @@ -1688,9 +1687,9 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe) ori_len = pattrib->pkt_len-WLAN_HDR_A3_LEN+BIP_AAD_SIZE; BIP_AAD = rtw_zmalloc(ori_len); - if (BIP_AAD == NULL) { + if (BIP_AAD == NULL) return _FAIL; - } + /* PKT start */ pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data; /* mapping to wlan header */ @@ -1707,15 +1706,15 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe) memcpy(&le_tmp64, p+4, 6); temp_ipn = le64_to_cpu(le_tmp64); /* BIP packet number should bigger than previous BIP packet */ - if (temp_ipn <= pmlmeext->mgnt_80211w_IPN_rx) { + if (temp_ipn <= pmlmeext->mgnt_80211w_IPN_rx) goto BIP_exit; - } + /* copy key index */ memcpy(&le_tmp, p+2, 2); keyid = le16_to_cpu(le_tmp); - if (keyid != padapter->securitypriv.dot11wBIPKeyid) { + if (keyid != padapter->securitypriv.dot11wBIPKeyid) goto BIP_exit; - } + /* clear the MIC field of MME to zero */ memset(p+2+len-8, 0, 8); |