Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:11 +0200
commit36c4608d4578d6412d1738ed74396ae6e7e05fbe (patch)
treec6190c4c00cda602c8d37bc4e9cba2d7a1392ce7
parenta4c9c325f712690f56c8e4fb4267ab66aa8fb800 (diff)
mwifiex: fix 802.11n/WPA detection (bnc#1012628).
-rw-r--r--patches.kernel.org/5.2.9-139-mwifiex-fix-802.11n-WPA-detection.patch59
-rw-r--r--series.conf1
2 files changed, 60 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-139-mwifiex-fix-802.11n-WPA-detection.patch b/patches.kernel.org/5.2.9-139-mwifiex-fix-802.11n-WPA-detection.patch
new file mode 100644
index 0000000000..7ba27eb9ac
--- /dev/null
+++ b/patches.kernel.org/5.2.9-139-mwifiex-fix-802.11n-WPA-detection.patch
@@ -0,0 +1,59 @@
+From: Brian Norris <briannorris@chromium.org>
+Date: Wed, 24 Jul 2019 12:46:34 -0700
+Subject: [PATCH] mwifiex: fix 802.11n/WPA detection
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: df612421fe2566654047769c6852ffae1a31df16
+
+commit df612421fe2566654047769c6852ffae1a31df16 upstream.
+
+Commit 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant
+vendor IEs") adjusted the ieee_types_vendor_header struct, which
+inadvertently messed up the offsets used in
+mwifiex_is_wpa_oui_present(). Add that offset back in, mirroring
+mwifiex_is_rsn_oui_present().
+
+As it stands, commit 63d7ef36103d breaks compatibility with WPA (not
+WPA2) 802.11n networks, since we hit the "info: Disable 11n if AES is
+not supported by AP" case in mwifiex_is_network_compatible().
+
+Fixes: 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant vendor IEs")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Brian Norris <briannorris@chromium.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/net/wireless/marvell/mwifiex/main.h | 1 +
+ drivers/net/wireless/marvell/mwifiex/scan.c | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
+index b025ba164412..e39bb5c42c9a 100644
+--- a/drivers/net/wireless/marvell/mwifiex/main.h
++++ b/drivers/net/wireless/marvell/mwifiex/main.h
+@@ -124,6 +124,7 @@ enum {
+
+ #define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S)
+
++#define WPA_GTK_OUI_OFFSET 2
+ #define RSN_GTK_OUI_OFFSET 2
+
+ #define MWIFIEX_OUI_NOT_PRESENT 0
+diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
+index e2786ab612ca..dd02bbd9544e 100644
+--- a/drivers/net/wireless/marvell/mwifiex/scan.c
++++ b/drivers/net/wireless/marvell/mwifiex/scan.c
+@@ -181,7 +181,8 @@ mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher)
+ u8 ret = MWIFIEX_OUI_NOT_PRESENT;
+
+ if (has_vendor_hdr(bss_desc->bcn_wpa_ie, WLAN_EID_VENDOR_SPECIFIC)) {
+- iebody = (struct ie_body *) bss_desc->bcn_wpa_ie->data;
++ iebody = (struct ie_body *)((u8 *)bss_desc->bcn_wpa_ie->data +
++ WPA_GTK_OUI_OFFSET);
+ oui = &mwifiex_wpa_oui[cipher][0];
+ ret = mwifiex_search_oui_in_ie(iebody, oui);
+ if (ret)
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index f23f7ea896..09139eba0c 100644
--- a/series.conf
+++ b/series.conf
@@ -1159,6 +1159,7 @@
patches.kernel.org/5.2.9-136-NFSv4-Fix-an-Oops-in-nfs4_do_setattr.patch
patches.kernel.org/5.2.9-137-KVM-Fix-leak-vCPU-s-VMCS-value-into-other-pCPU.patch
patches.kernel.org/5.2.9-138-KVM-arm-arm64-Sync-ICH_VMCR_EL2-back-when-about.patch
+ patches.kernel.org/5.2.9-139-mwifiex-fix-802.11n-WPA-detection.patch
########################################################
# Build fixes that apply to the vanilla kernel too.