rtw88: 8821c: Don't set RX_FLAG_DECRYPTED if packet has no encryption
authorGuo-Feng Fan <vincent_fann@realtek.com>
Thu, 15 Apr 2021 08:47:01 +0000 (16:47 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 21 Apr 2021 09:37:36 +0000 (12:37 +0300)
commit559f6cb318375e9deb01d7d0e957d0d90a2db63d
tree45dd1c353c81524492bb7728fc47d4dc330281e9
parent3b25bac893534858a8cd0ff79afa929beb8e3b20
rtw88: 8821c: Don't set RX_FLAG_DECRYPTED if packet has no encryption

The value of GET_RX_DESC_SWDEC() indicates that if this RX
packet requires software decryption or not. And software
decryption is required when the packet was encrypted and the
hardware failed to decrypt it.

So, GET_RX_DESC_SWDEC() is negative does not mean that this
packet is decrypted, it might just have no encryption at all.
To actually see if the packet is decrypted, driver needs to
further check if the hardware has successfully decrypted it,
with a specific type of encryption algorithm.

Signed-off-by: Guo-Feng Fan <vincent_fann@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210415084703.27255-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/rtw8821c.c