wifi: rtl8xxxu: enable MFP support with security flag of RX descriptor
authorMartin Kaistra <martin.kaistra@linutronix.de>
Thu, 18 Apr 2024 07:18:13 +0000 (09:18 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 22 Apr 2024 01:53:10 +0000 (09:53 +0800)
commitcbfbb4ddbc8503478e0a138f9a31f61686cc5f11
tree672429c54f85bc68cc4a8f06affe82b67689b24d
parent55e2843dd33a55f448579f1ab69aabe6f7077b04
wifi: rtl8xxxu: enable MFP support with security flag of RX descriptor

In order to connect to networks which require 802.11w, add the
MFP_CAPABLE flag and let mac80211 do the actual crypto in software.

When a robust management frame is received, rx_dec->swdec is not set,
even though the HW did not decrypt it. Extend the check and don't set
RX_FLAG_DECRYPTED for these frames in order to use SW decryption.

Use the security flag in the RX descriptor for this purpose, like it is
done in the rtw88 driver.

Cc: stable@vger.kernel.org
Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240418071813.1883174-3-martin.kaistra@linutronix.de
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c