Remove another coverage test which causes problems. (#871)

Coverage is handled by modifying firmware state, and the driver stores
the values the first time it is set. When we reset this state might be lost
so it will be reloaded from the firmware. We set the coverage back to 0
so the reloaded value will be the default again.
We also remove a check which can fail incorrectly.
This commit is contained in:
Tim Wilkinson 2023-06-12 23:29:38 -07:00 committed by GitHub
parent 8c4369e966
commit 52c7286a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 4 deletions

View File

@ -71,7 +71,23 @@ local station_zero = 0
local log = aredn.log.open(logfile, 16000)
local function reset_network()
local coverage
local f = io.popen("iw " .. phy .. " info")
if f then
for line in f:lines()
do
coverage = tonumber(line:match("Coverage class: (%d+)"))
if coverage then
os.execute("iw " .. phy .. " set coverage 0 > /dev/null 2>&1")
break
end
end
f:close()
end
write_all("/sys/kernel/debug/ieee80211/" .. phy .. "/ath10k/simulate_fw_crash", "hw-restart")
if coverage then
os.execute("iw " .. phy .. " set coverage " .. coverage .. " > /dev/null 2>&1")
end
end
function run_monitor_10k()

View File

@ -277,13 +277,23 @@ Index: openwrt/package/kernel/ath10k-ct/patches/999-0002-ath10k-5_10Mhz.patch
+ * OUI specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the Probe Request frame.
--- /dev/null
+++ openwrt/package/kernel/ath10k-ct/patches/999-0004-ath10k-coverage.patch
@@ -0,0 +1,16 @@
@@ -0,0 +1,26 @@
+--- a/ath10k-5.15/hw.c
++++ b/ath10k-5.15/hw.c
+@@ -665,13 +665,6 @@
+@@ -655,23 +655,6 @@
+ slottime_reg = ar->fw_coverage.reg_slottime_orig;
+ timeout_reg = ar->fw_coverage.reg_ack_cts_timeout_orig;
+
+ slottime = MS(slottime_reg, WAVE1_PCU_GBL_IFS_SLOT);
+ slottime = slottime / phyclk;
+- /* Do some sanity checks on the slottime register. */
+- if (slottime_reg % phyclk) {
+- ath10k_warn(ar,
+- "failed to set coverage class: expected integer microsecond value in register\n");
+-
+- goto store_regs;
+- }
+-
+- slottime = MS(slottime_reg, WAVE1_PCU_GBL_IFS_SLOT);
+- slottime = slottime / phyclk;
+- if (slottime != 9 && slottime != 20) {
+- ath10k_warn(ar,
+- "failed to set coverage class: expected slot time of 9 or 20us in HW register. It is %uus.\n",