Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-17 06:38:43 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-17 06:38:47 +0200
commit6b29705cf675290f698fea41d86658b05f194cca (patch)
tree8830c111e8c76b83286f85ef80ec68f5dfcb2945
parentdbda86be5e7039fa3e3cb4758a719acfc9635460 (diff)
rtlwifi: rtl8723ae: Fix missing break in switch statement
-rw-r--r--patches.kernel.org/5.1.3-012-rtlwifi-rtl8723ae-Fix-missing-break-in-switch-s.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.kernel.org/5.1.3-012-rtlwifi-rtl8723ae-Fix-missing-break-in-switch-s.patch b/patches.kernel.org/5.1.3-012-rtlwifi-rtl8723ae-Fix-missing-break-in-switch-s.patch
new file mode 100644
index 0000000000..6a9a13a615
--- /dev/null
+++ b/patches.kernel.org/5.1.3-012-rtlwifi-rtl8723ae-Fix-missing-break-in-switch-s.patch
@@ -0,0 +1,42 @@
+From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Date: Tue, 16 Apr 2019 10:17:22 -0500
+Subject: [PATCH] rtlwifi: rtl8723ae: Fix missing break in switch statement
+References: bnc#1012628
+Patch-mainline: 5.1.3
+Git-commit: 84242b82d81c54e009a2aaa74d3d9eff70babf56
+
+commit 84242b82d81c54e009a2aaa74d3d9eff70babf56 upstream.
+
+Add missing break statement in order to prevent the code from falling
+through to case 0x1025, and erroneously setting rtlhal->oem_id to
+RT_CID_819X_ACER when rtlefuse->eeprom_svid is equal to 0x10EC and
+none of the cases in switch (rtlefuse->eeprom_smid) match.
+
+This bug was found thanks to the ongoing efforts to enable
+-Wimplicit-fallthrough.
+
+Fixes: 238ad2ddf34b ("rtlwifi: rtl8723ae: Clean up the hardware info routine")
+Cc: stable@vger.kernel.org
+Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
+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/realtek/rtlwifi/rtl8723ae/hw.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
+index 6bab162e1bb8..655460f61bbc 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
+@@ -1675,6 +1675,7 @@ static void _rtl8723e_read_adapter_info(struct ieee80211_hw *hw,
+ rtlhal->oem_id = RT_CID_819X_LENOVO;
+ break;
+ }
++ break;
+ case 0x1025:
+ rtlhal->oem_id = RT_CID_819X_ACER;
+ break;
+--
+2.21.0
+
diff --git a/series.conf b/series.conf
index 5318602cf1..ae11db4812 100644
--- a/series.conf
+++ b/series.conf
@@ -97,6 +97,7 @@
patches.kernel.org/5.1.3-009-virt-vbox-Sanity-check-parameter-types-for-hgcm.patch
patches.kernel.org/5.1.3-010-USB-serial-fix-unthrottle-races.patch
patches.kernel.org/5.1.3-011-mwl8k-Fix-rate_idx-underflow.patch
+ patches.kernel.org/5.1.3-012-rtlwifi-rtl8723ae-Fix-missing-break-in-switch-s.patch
########################################################
# Build fixes that apply to the vanilla kernel too.