diff mbox series

ath9k on ASUS X202E hangs after 4.20.13

Message ID 20190507145201.xcu4dv7rjc3a3nhg@angus.ind.wpi.edu (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show
Series ath9k on ASUS X202E hangs after 4.20.13 | expand

Commit Message

Anderson, Charles R May 7, 2019, 2:52 p.m. UTC
Please Cc: me on any replies since I'm not subscribed.  Thanks.

I'm using Fedora 29 with their kernels.  4.20.13 is the newest kernel that works flawlessly on my ASUS X202E with the ath9k driver.  On 4.20.14, all 5.0.x, and 5.1.0, wireless hangs after being moderately heavily loaded--large downloads, rdesktop session, SSH.  

I opened a RH bugzilla here with no response so far:

https://bugzilla.redhat.com/show_bug.cgi?id=1700110

My test case has been:

- Boot kernel 4.20.13
- Make sure Wi-Fi is connected and wired ethernet is disconnected.
- Repeatedly run this: rm -rf evince ; git clone https://github.com/GNOME/evince.git
- The git clone should finish to 100% every time.

- Boot any kernel 4.20.14 through 5.0.11 or 5.1.0.
- Make sure Wi-Fi is connected and wired ethernet is disconnected.
- Repeatedly run this: rm -rf evince ; git clone https://github.com/GNOME/evince.git
- Usually after 1-3 runs, git clone hangs at less than 100% complete.
- Ctrl-C and rerun the git clone.  Now it hangs right away.
- Sometimes "ping" stops responding to the default gateway (wi-fi router).

I tried to look at the code differences between 4.20.13 and 4.20.14 and the ones below are the only ones that seem relevant to wireless or ath9k to me, but these areas have changed a lot in 5.0.x and 5.1.0 making it difficult to find any relevant changes there.

Can someone make suggestions on how to debug this further?

Thanks.



ath9k drivers in use:

ath9k                 155648  0
ath9k_common           24576  1 ath9k
ath9k_hw              503808  2 ath9k_common,ath9k
mac80211              933888  1 ath9k
ath3k                  24576  0
ath                    36864  3 ath9k_common,ath9k,ath9k_hw
cfg80211              770048  4 ath9k_common,ath9k,ath,mac80211
bluetooth             610304  32 btrtl,btintel,btbcm,bnep,ath3k,btusb,rfcomm

02:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
        Subsystem: Lite-On Communications Inc Device 6628
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7d00000 (64-bit, non-prefetchable) [size=512K]
        Expansion ROM at f7d80000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
        Kernel driver in use: ath9k
        Kernel modules: ath9k
diff mbox series

Patch

diff -urb '--exclude=.git' kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/drivers/phy/qualcomm/phy-ath79-usb.c kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/drivers/phy/qualcomm/phy-ath79-usb.c
--- kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/drivers/phy/qualcomm/phy-ath79-usb.c	2018-12-23 18:55:59.000000000 -0500
+++ kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/drivers/phy/qualcomm/phy-ath79-usb.c	2019-04-15 17:47:40.605610254 -0400
@@ -31,7 +31,7 @@ 
 
 	err = reset_control_deassert(priv->reset);
 	if (err && priv->no_suspend_override)
-		reset_control_assert(priv->no_suspend_override);
+		reset_control_deassert(priv->no_suspend_override);
 
 	return err;
 }
@@ -69,7 +69,7 @@ 
 	if (!priv)
 		return -ENOMEM;
 
-	priv->reset = devm_reset_control_get(&pdev->dev, "usb-phy");
+	priv->reset = devm_reset_control_get(&pdev->dev, "phy");
 	if (IS_ERR(priv->reset))
 		return PTR_ERR(priv->reset);
 
diff -urb '--exclude=.git' kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/include/linux/if_arp.h kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/include/linux/if_arp.h
--- kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/include/linux/if_arp.h	2018-12-23 18:55:59.000000000 -0500
+++ kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/include/linux/if_arp.h	2019-04-15 17:47:40.889617050 -0400
@@ -54,6 +54,7 @@ 
 	case ARPHRD_IPGRE:
 	case ARPHRD_VOID:
 	case ARPHRD_NONE:
+	case ARPHRD_RAWIP:
 		return false;
 	default:
 		return true;
diff -urb '--exclude=.git' kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/net/mac80211/cfg.c kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/net/mac80211/cfg.c
--- kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/net/mac80211/cfg.c	2019-04-15 17:43:06.394863881 -0400
+++ kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/net/mac80211/cfg.c	2019-04-15 17:47:41.034620519 -0400
@@ -1494,6 +1494,10 @@ 
 	if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
 		sta->sta.tdls = true;
 
+	if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION &&
+	    !sdata->u.mgd.associated)
+		return -EINVAL;
+
 	err = sta_apply_parameters(local, sta, params);
 	if (err) {
 		sta_info_free(local, sta);
diff -urb '--exclude=.git' kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/net/mac80211/rx.c kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/net/mac80211/rx.c
--- kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/net/mac80211/rx.c	2019-04-15 17:43:06.397863955 -0400
+++ kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/net/mac80211/rx.c	2019-04-15 17:47:41.038620615 -0400
@@ -231,7 +231,7 @@ 
 		struct ieee80211_hdr_3addr hdr;
 		u8 category;
 		u8 action_code;
-	} __packed action;
+	} __packed __aligned(2) action;
 
 	if (!sdata)
 		return;
@@ -2720,7 +2720,9 @@ 
 	skb_set_queue_mapping(skb, q);
 
 	if (!--mesh_hdr->ttl) {
-		IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
+		if (!is_multicast_ether_addr(hdr->addr1))
+			IEEE80211_IFSTA_MESH_CTR_INC(ifmsh,
+						     dropped_frames_ttl);
 		goto out;
 	}
 
diff -urb '--exclude=.git' kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/net/wireless/reg.c kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/net/wireless/reg.c
--- kernel-4.20.13-200.fc29/kernel-4.20.fc29/linux-4.20.13-200.fc29.x86_64/net/wireless/reg.c	2018-12-23 18:55:59.000000000 -0500
+++ kernel-4.20.14-200.fc29/kernel-4.20.fc29/linux-4.20.14-200.fc29.x86_64/net/wireless/reg.c	2019-04-15 17:47:41.086621763 -0400
@@ -1255,7 +1255,7 @@ 
  * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"),
  * however it is safe for now to assume that a frequency rule should not be
  * part of a frequency's band if the start freq or end freq are off by more
- * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the
+ * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the
  * 60 GHz band.
  * This resolution can be lowered and should be considered as we add
  * regulatory rule support for other "bands".
@@ -1270,7 +1270,7 @@ 
 	 * with the Channel starting frequency above 45 GHz.
 	 */
 	u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ?
-			10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
+			20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
 	if (abs(freq_khz - freq_range->start_freq_khz) <= limit)
 		return true;
 	if (abs(freq_khz - freq_range->end_freq_khz) <= limit)