From bf4104477e3dd1170ad790b975cb274eefd51b6c Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mon, 11 Jun 2018 19:59:27 -0400 Subject: Re-apply 3 patches that got lost during the rebase --- ...e-the-phymode-along-with-bandwidth-change.patch | 76 ++++++++++++++++++++++ kernel.spec | 13 ++++ kexec-bzimage-verify-pe-signature-fix.patch | 34 ++++++++++ ...6-dell-laptop-Fix-keyboard-backlight-time.patch | 76 ++++++++++++++++++++++ 4 files changed, 199 insertions(+) create mode 100644 ath10k-Update-the-phymode-along-with-bandwidth-change.patch create mode 100644 kexec-bzimage-verify-pe-signature-fix.patch create mode 100644 platform-x86-dell-laptop-Fix-keyboard-backlight-time.patch diff --git a/ath10k-Update-the-phymode-along-with-bandwidth-change.patch b/ath10k-Update-the-phymode-along-with-bandwidth-change.patch new file mode 100644 index 000000000..184c71272 --- /dev/null +++ b/ath10k-Update-the-phymode-along-with-bandwidth-change.patch @@ -0,0 +1,76 @@ +From 24b6fe7240e15b6df53b0ace61a70f58e09f6fc6 Mon Sep 17 00:00:00 2001 +From: Ryan Hsu +Date: Fri, 8 Jun 2018 11:32:39 -0700 +Subject: [PATCH] ath10k: Update the phymode along with bandwidth change + request + +In the case of Station connects to AP with narrower bandwidth at beginning. +And later the AP changes the bandwidth to winder bandwidth, the AP will +beacon with wider bandwidth IE, eg VHT20->VHT40->VHT80 or VHT40->VHT80. + +Since the supported BANDWIDTH will be limited by the PHYMODE, so while +Station receives the bandwidth change request, it will also need to +reconfigure the PHYMODE setting to firmware instead of just configuring +the BANDWIDTH info, otherwise it'll trigger a firmware crash with +non-support bandwidth. + +The issue was observed in WLAN.RM.4.4.1-00051-QCARMSWP-1, QCA6174 with +below scenario. + +Reported-by: Rouven Czerwinski +Signed-off-by: Ryan Hsu +Signed-off-by: Jeremy Cline +--- + drivers/net/wireless/ath/ath10k/mac.c | 16 ++++++++++++++-- + drivers/net/wireless/ath/ath10k/wmi.h | 1 + + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c +index 2d7ef7460780..72d61ca3cb42 100644 +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -5996,8 +5996,19 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) + ath10k_mac_max_vht_nss(vht_mcs_mask))); + + if (changed & IEEE80211_RC_BW_CHANGED) { +- ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM peer bw %d\n", +- sta->addr, bw); ++ enum wmi_phy_mode mode; ++ ++ mode = chan_to_phymode(&def); ++ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM peer bw %d phymode %d\n", ++ sta->addr, bw, mode); ++ ++ err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, ++ WMI_PEER_PHYMODE, mode); ++ if (err) { ++ ath10k_warn(ar, "failed to update STA %pM peer phymode %d: %d\n", ++ sta->addr, mode, err); ++ goto exit; ++ } + + err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, + WMI_PEER_CHAN_WIDTH, bw); +@@ -6038,6 +6049,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) + sta->addr); + } + ++exit: + mutex_unlock(&ar->conf_mutex); + } + +diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h +index c7b30ed9015d..930a0e1b1163 100644 +--- a/drivers/net/wireless/ath/ath10k/wmi.h ++++ b/drivers/net/wireless/ath/ath10k/wmi.h +@@ -6010,6 +6010,7 @@ enum wmi_peer_param { + WMI_PEER_NSS = 0x5, + WMI_PEER_USE_4ADDR = 0x6, + WMI_PEER_DEBUG = 0xa, ++ WMI_PEER_PHYMODE = 0xd, + WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */ + }; + +-- +2.17.1 + diff --git a/kernel.spec b/kernel.spec index b958c74ad..58bd9c9cd 100644 --- a/kernel.spec +++ b/kernel.spec @@ -623,6 +623,9 @@ Patch501: Fix-for-module-sig-verification.patch # rhbz 1431375 Patch502: input-rmi4-remove-the-need-for-artifical-IRQ.patch +# rhbz 1470995 +Patch503: kexec-bzimage-verify-pe-signature-fix.patch + # rbhz 1435837 # https://www.spinics.net/lists/linux-acpi/msg82405.html Patch504: mailbox-ACPI-erroneous-error-message-when-parsing-ACPI.patch @@ -630,6 +633,13 @@ Patch504: mailbox-ACPI-erroneous-error-message-when-parsing-ACPI.patch # CVE-2018-12232 rhbz 1590215 1590216 Patch506: 0001-socket-close-race-condition-between-sock_close-and-s.patch +# https://www.spinics.net/lists/platform-driver-x86/msg15719.html +Patch507: platform-x86-dell-laptop-Fix-keyboard-backlight-time.patch + +# rhbz 1577106 +# http://lists.infradead.org/pipermail/ath10k/2018-June/011582.html +Patch508: ath10k-Update-the-phymode-along-with-bandwidth-change.patch + # END OF PATCH DEFINITIONS %endif @@ -1879,6 +1889,9 @@ fi # # %changelog +* Tue Jun 19 2018 Jeremy Cline +- Re-apply the XPS 13 9370 backlight, ath10k bandwidth, and kexec patches + * Mon Jun 18 2018 Justin M. Forbes - 4.17.2-200 - Linux v4.17.2 Rebase diff --git a/kexec-bzimage-verify-pe-signature-fix.patch b/kexec-bzimage-verify-pe-signature-fix.patch new file mode 100644 index 000000000..6c8a51b95 --- /dev/null +++ b/kexec-bzimage-verify-pe-signature-fix.patch @@ -0,0 +1,34 @@ +From: Dave Young + +Fix kexec_file_load pefile signature verification + +Similar with Fix-for-module-sig-verification.patch, kexec_file syscall also +need pass 1UL to verify_pefile_signature so that secondary keys can be used. + +Fedora bug +https://bugzilla.redhat.com/show_bug.cgi?id=1470995 + +Latest upstream effort is below: +https://www.spinics.net/lists/kernel/msg2825184.html + +Ideally this need an upstream fix, but since nobody response we can workaround +it like the module code did. + +Signed-off-by: Dave Young +--- + arch/x86/kernel/kexec-bzimage64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-x86.orig/arch/x86/kernel/kexec-bzimage64.c ++++ linux-x86/arch/x86/kernel/kexec-bzimage64.c +@@ -533,7 +533,7 @@ static int bzImage64_cleanup(void *loade + static int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len) + { + return verify_pefile_signature(kernel, kernel_len, +- NULL, ++ (void *)1UL, + VERIFYING_KEXEC_PE_SIGNATURE); + } + #endif +-- +2.17.0 diff --git a/platform-x86-dell-laptop-Fix-keyboard-backlight-time.patch b/platform-x86-dell-laptop-Fix-keyboard-backlight-time.patch new file mode 100644 index 000000000..dd6928b04 --- /dev/null +++ b/platform-x86-dell-laptop-Fix-keyboard-backlight-time.patch @@ -0,0 +1,76 @@ +From e6a7379fcb5702da681d7da8e9d9a2a26cc6fa85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timur=20Krist=C3=B3f?= +Date: Fri, 1 Jun 2018 12:32:56 +0200 +Subject: [PATCH] platform/x86: dell-laptop: Fix keyboard backlight timeout on + XPS 13 9370 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The XPS 13 9370 doesn't expose the necessary KBD_LED_AC_TOKEN in +the BIOS, so the driver thinks it cannot adjust the AC keyboard +backlight timeout. This patch adds a quirk to fix this until +Dell adds the missing token to the BIOS. + +For further discussion, see: +https://github.com/dell/libsmbios/issues/48 + +Signed-off-by: Timur Kristóf +Signed-off-by: Andy Shevchenko +Signed-off-by: Jeremy Cline +--- + drivers/platform/x86/dell-laptop.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c +index c52c6723374b..f1fa8612db40 100644 +--- a/drivers/platform/x86/dell-laptop.c ++++ b/drivers/platform/x86/dell-laptop.c +@@ -38,6 +38,7 @@ + struct quirk_entry { + bool touchpad_led; + bool kbd_led_levels_off_1; ++ bool kbd_missing_ac_tag; + + bool needs_kbd_timeouts; + /* +@@ -68,6 +69,10 @@ static struct quirk_entry quirk_dell_xps13_9333 = { + .kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 }, + }; + ++static struct quirk_entry quirk_dell_xps13_9370 = { ++ .kbd_missing_ac_tag = true, ++}; ++ + static struct quirk_entry quirk_dell_latitude_e6410 = { + .kbd_led_levels_off_1 = true, + }; +@@ -291,6 +296,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = { + }, + .driver_data = &quirk_dell_xps13_9333, + }, ++ { ++ .callback = dmi_matched, ++ .ident = "Dell XPS 13 9370", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9370"), ++ }, ++ .driver_data = &quirk_dell_xps13_9370, ++ }, + { + .callback = dmi_matched, + .ident = "Dell Latitude E6410", +@@ -1401,7 +1415,8 @@ static inline int kbd_init_info(void) + * timeout value which is shared for both battery and AC power + * settings. So do not try to set AC values on old models. + */ +- if (dell_smbios_find_token(KBD_LED_AC_TOKEN)) ++ if ((quirks && quirks->kbd_missing_ac_tag) || ++ dell_smbios_find_token(KBD_LED_AC_TOKEN)) + kbd_timeout_ac_supported = true; + + kbd_get_state(&state); +-- +2.17.1 + -- cgit