wcn_bsp: the firmware's debug log off by default, and a resume leaves it as it was

With the Marlin3 ARM log on the firmware pulls PCIe WAKE# within 0-2 s of every
L2 entry to push log packets. sprd_ep_resume() turned it on after every resume
and the sysfs default at every chip power-on (wifi-start's at+armlog=0 did not
outlive Bluetooth's power-on). Off, three mem sleeps in a row with Wi-Fi up and
PCIe wakeup enabled slept the full 20 s.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
This commit is contained in:
Abdurrahman Kaan DikeçandClaude Fable 5.1 committed 2026-10-07 00:37:45 +03:00
1 parent c30ae707cd
commit f0323bfbcd
2 files changed
+13 -1

No files matched your search

+5 -1
View File
@@ -1268,7 +1268,11 @@ static int sprd_ep_resume(struct device *dev)
wcn_bus_change_state(priv, WCN_BUS_UP);
atomic_set(&priv->is_suspending, 0);
wcn_set_armlog(true);
/*
* MU300: the vendor turned the firmware's ARM log on here after every resume. The firmware keeps the setting
* through D3hot, and with the log on it pulls PCIe WAKE# within 0-2 s of every L2 entry to push log packets:
* a system sleep with Wi-Fi up ended at once (FINDINGS 37). It is off by default (sysfs.c); leave it as it was.
*/
mdbg_device_lock_notify();
for (chn = 0; chn < 16; chn++) {
ops = mchn_ops(chn);
@@ -1064,6 +1064,14 @@ int init_wcn_sysfs(void)
atomic_set(&sysfs_info.is_reset, 0x0);
sysfs_info.armlog_status = 1;
#endif
/*
* MU300: the firmware's ARM log off, as in Android's user builds (it is turned on at every chip power-on
* from this value, and wifi-start's "at+armlog=0" did not outlive the next power-on). With it on, the
* firmware pulls PCIe WAKE# within 0-2 s of every L2 entry to push log packets, and a system sleep with
* PCIe wakeup enabled ended at once (FINDINGS 37). echo 1 > /sys/devices/virtual/misc/wcn/devices/armlog_status
* turns it on for debugging.
*/
sysfs_info.armlog_status = 0;
return 0;
}