Closed Fail-Safe closed 4 years ago
Possibly duplicate of #117
This is a duplicate of several other reports, for one reason or another, we get a bad tx/rx rate from firmware. It is not a real problem, I just have not found time to go tweak the driver to catch the -1 rate (0xff) and force it to be zero instead. Maybe with a single one-time one line warning since probably this is a minor firmware bug. Patches welcome...
@greearb so something like this?
diff --git a/ath10k-5.4/wmi.c b/ath10k-5.4/wmi.c
index 1aad6dec8eb3..4197025e9917 100644
--- a/ath10k-5.4/wmi.c
+++ b/ath10k-5.4/wmi.c
@@ -26,6 +26,8 @@
#define ATH10K_WMI_BARRIER_TIMEOUT_HZ (3 * HZ)
#define ATH10K_WMI_DFS_CONF_TIMEOUT_HZ (HZ / 6)
+#define ATH10K_WMI_TX_BEACON_INVALID_RATE_CODE 0xff
+
const char* cck_speed_by_idx[] = {"1Mbps", "2Mbps", "5.5Mbps", "11Mbps" };
/* MAIN WMI cmd track */
@@ -6221,6 +6223,10 @@ static void ath10k_wmi_event_beacon_tx(struct ath10k *ar, struct sk_buff *skb)
status == 0 ? "OK" : (status == 1 ? "XRETRY" : (status == 2 ? "DROP" : "UNKNOWN")),
ev->mpdus_tried, ev->mpdus_failed, ev->tx_rate_code, ev->tx_rate_flags, ev->tsFlags);
+ /* workaround for possibly firmware bug */
+ if (ev->tx_rate_code == ATH10K_WMI_TX_BEACON_INVALID_RATE_CODE)
+ ev->tx_rate_code = 0;
+
arvif = ath10k_get_arvif(ar, vdev_id);
if (!arvif) {
ath10k_warn(ar, "wmi-event-beacon-tx, could not find vdev for id: %u\n",
There may be several places that the invalid rate code goes up the stack, but yes in general that is what I was hoping for. Maybe add a static 'done_once' boolean and print one warning in case that case is hit so that you can look in logs to see if indeed you have caught that case?
The fix is pushed to latest openwrt.
Not sure if this is related to firmware or not. If this looks like a driver issue I will take it up with the OpenWRT forums.
Description of the problem (how to configure, how to reproduce, how often it happens). Seeing an occasional stacktrace pop up in my kernel logs. My Netgear R7800 recovers, but there is a several second (3-4 perhaps) drop in WiFi connectivity.
Software (OS, Firmware version, kernel, driver, etc) OS: OpenWrt SNAPSHOT r13097-1c008b61bd / LuCI Master git-20.114.19431-d0518a1 Kernel: 5.4.35 Firmware version:
firmware-5-ct-htt-mgt-community.bin
04-24-20 release Driver: ath10k-ct-smallbuffers driver + patch as proposed by Dave Taht HereHardware (NIC chipset, platform, etc) Netgear Nighthawk X4S R7800, QCA9884, arm_cortex-a15_neon-vfpv4
Logs (dmesg, maybe supplicant and/or hostap)