diff options
author | Daniel Golle <daniel@makrotopia.org> | 2020-05-30 09:36:17 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-05-30 09:37:36 +0100 |
commit | a002a24536c15926724516b4acf58ad8934a896d (patch) | |
tree | 503005b4a68aad8d5c40a5eb81c8f5436a7d364d /package/kernel | |
parent | f8b4aa5062311ca5bfd865db6d9ace5027e62493 (diff) | |
download | upstream-a002a24536c15926724516b4acf58ad8934a896d.tar.gz upstream-a002a24536c15926724516b4acf58ad8934a896d.tar.bz2 upstream-a002a24536c15926724516b4acf58ad8934a896d.zip |
mac80211: rt2x00: backport patch enabling MFP
From: Rui Salvaterra <rsalvaterra@gmail.com>
Date: Mon, 25 May 2020 14:49:07 +0100
Subject: [PATCH] rt2800: enable MFP support unconditionally
This gives us WPA3 support out of the box without having to manually disable
hardware crypto. The driver will fall back to software crypto if the connection
requires management frame protection.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/mac80211/patches/rt2x00/001-rt2800-enable-MFP-support-unconditionally.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/001-rt2800-enable-MFP-support-unconditionally.patch b/package/kernel/mac80211/patches/rt2x00/001-rt2800-enable-MFP-support-unconditionally.patch new file mode 100644 index 0000000000..5dfcf5bf3b --- /dev/null +++ b/package/kernel/mac80211/patches/rt2x00/001-rt2800-enable-MFP-support-unconditionally.patch @@ -0,0 +1,44 @@ +From b6b15e20421fefae9f78274f9fef80bc97bf5d5c Mon Sep 17 00:00:00 2001 +From: Rui Salvaterra <rsalvaterra@gmail.com> +Date: Mon, 25 May 2020 14:49:07 +0100 +Subject: [PATCH] rt2800: enable MFP support unconditionally + +This gives us WPA3 support out of the box without having to manually disable +hardware crypto. The driver will fall back to software crypto if the connection +requires management frame protection. + +Suggested-by: Stanislaw Gruszka <stf_xl@wp.pl> +Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> +Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +Link: https://lore.kernel.org/r/20200525134906.1672-1-rsalvaterra@gmail.com +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 +--- + drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 3 ++- + 2 files changed, 3 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -9971,9 +9971,7 @@ static int rt2800_probe_hw_mode(struct r + if (!rt2x00_is_usb(rt2x00dev)) + ieee80211_hw_set(rt2x00dev->hw, HOST_BROADCAST_PS_BUFFERING); + +- /* Set MFP if HW crypto is disabled. */ +- if (rt2800_hwcrypt_disabled(rt2x00dev)) +- ieee80211_hw_set(rt2x00dev->hw, MFP_CAPABLE); ++ ieee80211_hw_set(rt2x00dev->hw, MFP_CAPABLE); + + SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev); + SET_IEEE80211_PERM_ADDR(rt2x00dev->hw, +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c +@@ -468,7 +468,8 @@ int rt2x00mac_set_key(struct ieee80211_h + if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) + return 0; + +- if (!rt2x00_has_cap_hw_crypto(rt2x00dev)) ++ /* The hardware can't do MFP */ ++ if (!rt2x00_has_cap_hw_crypto(rt2x00dev) || (sta && sta->mfp)) + return -EOPNOTSUPP; + + /* |