mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
wifi: rtl8xxxu: enable MFP support
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 frames 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. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://msgid.link/20240314164850.86432-1-martin.kaistra@linutronix.de
This commit is contained in:
committed by
Ping-Ke Shih
parent
c76936a7e1
commit
77f5924fc4
@@ -6473,7 +6473,9 @@ int rtl8xxxu_parse_rxdesc16(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
|
||||
rx_status->mactime = rx_desc->tsfl;
|
||||
rx_status->flag |= RX_FLAG_MACTIME_START;
|
||||
|
||||
if (!rx_desc->swdec)
|
||||
if (!rx_desc->swdec &&
|
||||
!(_ieee80211_is_robust_mgmt_frame(hdr) &&
|
||||
ieee80211_has_protected(hdr->frame_control)))
|
||||
rx_status->flag |= RX_FLAG_DECRYPTED;
|
||||
if (rx_desc->crc32)
|
||||
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
@@ -6578,7 +6580,9 @@ int rtl8xxxu_parse_rxdesc24(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
|
||||
rx_status->mactime = rx_desc->tsfl;
|
||||
rx_status->flag |= RX_FLAG_MACTIME_START;
|
||||
|
||||
if (!rx_desc->swdec)
|
||||
if (!rx_desc->swdec &&
|
||||
!(_ieee80211_is_robust_mgmt_frame(hdr) &&
|
||||
ieee80211_has_protected(hdr->frame_control)))
|
||||
rx_status->flag |= RX_FLAG_DECRYPTED;
|
||||
if (rx_desc->crc32)
|
||||
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
@@ -7998,6 +8002,7 @@ static int rtl8xxxu_probe(struct usb_interface *interface,
|
||||
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
|
||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
|
||||
ieee80211_hw_set(hw, MFP_CAPABLE);
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user