From a3ef4df5d59e3970c860fb2024edcc2d7bfce172 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 19 Jun 2020 10:52:29 +0200 Subject: [PATCH] 4.4-stable patches added patches: b43-fix-connection-problem-with-wpa3.patch b43_legacy-fix-connection-problem-with-wpa3.patch b43legacy-fix-case-where-channel-status-is-corrupted.patch igb-report-speed-and-duplex-as-unknown-when-device-is-runtime-suspended.patch --- ...b43-fix-connection-problem-with-wpa3.patch | 44 +++++++++++++++ ...acy-fix-connection-problem-with-wpa3.patch | 42 ++++++++++++++ ...se-where-channel-status-is-corrupted.patch | 56 +++++++++++++++++++ ...own-when-device-is-runtime-suspended.patch | 52 +++++++++++++++++ queue-4.4/series | 4 ++ 5 files changed, 198 insertions(+) create mode 100644 queue-4.4/b43-fix-connection-problem-with-wpa3.patch create mode 100644 queue-4.4/b43_legacy-fix-connection-problem-with-wpa3.patch create mode 100644 queue-4.4/b43legacy-fix-case-where-channel-status-is-corrupted.patch create mode 100644 queue-4.4/igb-report-speed-and-duplex-as-unknown-when-device-is-runtime-suspended.patch diff --git a/queue-4.4/b43-fix-connection-problem-with-wpa3.patch b/queue-4.4/b43-fix-connection-problem-with-wpa3.patch new file mode 100644 index 00000000000..c1f39a73d80 --- /dev/null +++ b/queue-4.4/b43-fix-connection-problem-with-wpa3.patch @@ -0,0 +1,44 @@ +From 75d057bda1fbca6ade21378aa45db712e5f7d962 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 26 May 2020 10:59:08 -0500 +Subject: b43: Fix connection problem with WPA3 + +From: Larry Finger + +commit 75d057bda1fbca6ade21378aa45db712e5f7d962 upstream. + +Since the driver was first introduced into the kernel, it has only +handled the ciphers associated with WEP, WPA, and WPA2. It fails with +WPA3 even though mac80211 can handle those additional ciphers in software, +b43 did not report that it could handle them. By setting MFP_CAPABLE using +ieee80211_set_hw(), the problem is fixed. + +With this change, b43 will handle the ciphers it knows in hardware, +and let mac80211 handle the others in software. It is not necessary to +use the module parameter NOHWCRYPT to turn hardware encryption off. +Although this change essentially eliminates that module parameter, +I am choosing to keep it for cases where the hardware is broken, +and software encryption is required for all ciphers. + +Reported-and-tested-by: Rui Salvaterra +Signed-off-by: Larry Finger +Cc: Stable +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20200526155909.5807-2-Larry.Finger@lwfinger.net +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/b43/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/b43/main.c ++++ b/drivers/net/wireless/b43/main.c +@@ -5611,7 +5611,7 @@ static struct b43_wl *b43_wireless_init( + /* fill hw info */ + ieee80211_hw_set(hw, RX_INCLUDES_FCS); + ieee80211_hw_set(hw, SIGNAL_DBM); +- ++ ieee80211_hw_set(hw, MFP_CAPABLE); + hw->wiphy->interface_modes = + BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_MESH_POINT) | diff --git a/queue-4.4/b43_legacy-fix-connection-problem-with-wpa3.patch b/queue-4.4/b43_legacy-fix-connection-problem-with-wpa3.patch new file mode 100644 index 00000000000..66993873a34 --- /dev/null +++ b/queue-4.4/b43_legacy-fix-connection-problem-with-wpa3.patch @@ -0,0 +1,42 @@ +From 6a29d134c04a8acebb7a95251acea7ad7abba106 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 26 May 2020 10:59:09 -0500 +Subject: b43_legacy: Fix connection problem with WPA3 + +From: Larry Finger + +commit 6a29d134c04a8acebb7a95251acea7ad7abba106 upstream. + +Since the driver was first introduced into the kernel, it has only +handled the ciphers associated with WEP, WPA, and WPA2. It fails with +WPA3 even though mac80211 can handle those additional ciphers in software, +b43legacy did not report that it could handle them. By setting MFP_CAPABLE using +ieee80211_set_hw(), the problem is fixed. + +With this change, b43legacy will handle the ciphers it knows in hardware, +and let mac80211 handle the others in software. It is not necessary to +use the module parameter NOHWCRYPT to turn hardware encryption off. +Although this change essentially eliminates that module parameter, +I am choosing to keep it for cases where the hardware is broken, +and software encryption is required for all ciphers. + +Signed-off-by: Larry Finger +Cc: Stable +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20200526155909.5807-3-Larry.Finger@lwfinger.net +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/b43legacy/main.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/b43legacy/main.c ++++ b/drivers/net/wireless/b43legacy/main.c +@@ -3835,6 +3835,7 @@ static int b43legacy_wireless_init(struc + /* fill hw info */ + ieee80211_hw_set(hw, RX_INCLUDES_FCS); + ieee80211_hw_set(hw, SIGNAL_DBM); ++ ieee80211_hw_set(hw, MFP_CAPABLE); /* Allow WPA3 in software */ + + hw->wiphy->interface_modes = + BIT(NL80211_IFTYPE_AP) | diff --git a/queue-4.4/b43legacy-fix-case-where-channel-status-is-corrupted.patch b/queue-4.4/b43legacy-fix-case-where-channel-status-is-corrupted.patch new file mode 100644 index 00000000000..ec9fd572e6f --- /dev/null +++ b/queue-4.4/b43legacy-fix-case-where-channel-status-is-corrupted.patch @@ -0,0 +1,56 @@ +From ec4d3e3a054578de34cd0b587ab8a1ac36f629d9 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 7 Apr 2020 14:00:43 -0500 +Subject: b43legacy: Fix case where channel status is corrupted + +From: Larry Finger + +commit ec4d3e3a054578de34cd0b587ab8a1ac36f629d9 upstream. + +This patch fixes commit 75388acd0cd8 ("add mac80211-based driver for +legacy BCM43xx devices") + +In https://bugzilla.kernel.org/show_bug.cgi?id=207093, a defect in +b43legacy is reported. Upon testing, thus problem exists on PPC and +X86 platforms, is present in the oldest kernel tested (3.2), and +has been present in the driver since it was first added to the kernel. + +The problem is a corrupted channel status received from the device. +Both the internal card in a PowerBook G4 and the PCMCIA version +(Broadcom BCM4306 with PCI ID 14e4:4320) have the problem. Only Rev, 2 +(revision 4 of the 802.11 core) of the chip has been tested. No other +devices using b43legacy are available for testing. + +Various sources of the problem were considered. Buffer overrun and +other sources of corruption within the driver were rejected because +the faulty channel status is always the same, not a random value. +It was concluded that the faulty data is coming from the device, probably +due to a firmware bug. As that source is not available, the driver +must take appropriate action to recover. + +At present, the driver reports the error, and them continues to process +the bad packet. This is believed that to be a mistake, and the correct +action is to drop the correpted packet. + +Fixes: 75388acd0cd8 ("add mac80211-based driver for legacy BCM43xx devices") +Cc: Stable +Signed-off-by: Larry Finger +Reported-and-tested by: F. Erhard +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20200407190043.1686-1-Larry.Finger@lwfinger.net +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/b43legacy/xmit.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/b43legacy/xmit.c ++++ b/drivers/net/wireless/b43legacy/xmit.c +@@ -571,6 +571,7 @@ void b43legacy_rx(struct b43legacy_wldev + default: + b43legacywarn(dev->wl, "Unexpected value for chanstat (0x%X)\n", + chanstat); ++ goto drop; + } + + memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status)); diff --git a/queue-4.4/igb-report-speed-and-duplex-as-unknown-when-device-is-runtime-suspended.patch b/queue-4.4/igb-report-speed-and-duplex-as-unknown-when-device-is-runtime-suspended.patch new file mode 100644 index 00000000000..8ba7248afd7 --- /dev/null +++ b/queue-4.4/igb-report-speed-and-duplex-as-unknown-when-device-is-runtime-suspended.patch @@ -0,0 +1,52 @@ +From 165ae7a8feb53dc47fb041357e4b253bfc927cf9 Mon Sep 17 00:00:00 2001 +From: Kai-Heng Feng +Date: Tue, 5 May 2020 12:01:54 +0800 +Subject: igb: Report speed and duplex as unknown when device is runtime suspended + +From: Kai-Heng Feng + +commit 165ae7a8feb53dc47fb041357e4b253bfc927cf9 upstream. + +igb device gets runtime suspended when there's no link partner. We can't +get correct speed under that state: +$ cat /sys/class/net/enp3s0/speed +1000 + +In addition to that, an error can also be spotted in dmesg: +[ 385.991957] igb 0000:03:00.0 enp3s0: PCIe link lost + +Since device can only be runtime suspended when there's no link partner, +we can skip reading register and let the following logic set speed and +duplex with correct status. + +The more generic approach will be wrap get_link_ksettings() with begin() +and complete() callbacks. However, for this particular issue, begin() +calls igb_runtime_resume() , which tries to rtnl_lock() while the lock +is already hold by upper ethtool layer. + +So let's take this approach until the igb_runtime_resume() no longer +needs to hold rtnl_lock. + +CC: stable +Suggested-by: Alexander Duyck +Signed-off-by: Kai-Heng Feng +Tested-by: Aaron Brown +Signed-off-by: Jeff Kirsher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/intel/igb/igb_ethtool.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c ++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c +@@ -143,7 +143,8 @@ static int igb_get_settings(struct net_d + u32 status; + u32 speed; + +- status = rd32(E1000_STATUS); ++ status = pm_runtime_suspended(&adapter->pdev->dev) ? ++ 0 : rd32(E1000_STATUS); + if (hw->phy.media_type == e1000_media_type_copper) { + + ecmd->supported = (SUPPORTED_10baseT_Half | diff --git a/queue-4.4/series b/queue-4.4/series index 6c57d897f94..2d632b68c15 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -83,3 +83,7 @@ pci-program-mps-for-rciep-devices.patch e1000e-relax-condition-to-trigger-reset-for-me-workaround.patch carl9170-remove-p2p_go-support.patch media-go7007-fix-a-miss-of-snd_card_free.patch +b43legacy-fix-case-where-channel-status-is-corrupted.patch +b43-fix-connection-problem-with-wpa3.patch +b43_legacy-fix-connection-problem-with-wpa3.patch +igb-report-speed-and-duplex-as-unknown-when-device-is-runtime-suspended.patch -- 2.47.3