wifi: Add method for generating and capturing an ath11k dump

This commit is contained in:
Vicki Pfau 2025-01-17 20:25:41 -08:00
parent 7b7afffc46
commit 54351414fa
8 changed files with 210 additions and 5 deletions

View file

@ -29,8 +29,8 @@ use crate::power::{
};
use crate::process::{run_script, script_output};
use crate::wifi::{
extract_wifi_trace, set_wifi_backend, set_wifi_debug_mode, set_wifi_power_management_state,
WifiBackend, WifiDebugMode, WifiPowerManagement,
extract_wifi_trace, generate_wifi_dump, set_wifi_backend, set_wifi_debug_mode,
set_wifi_power_management_state, WifiBackend, WifiDebugMode, WifiPowerManagement,
};
use crate::{path, API_VERSION};
@ -379,6 +379,16 @@ impl SteamOSManager {
.into())
}
async fn generate_debug_dump(&self) -> fdo::Result<String> {
Ok(generate_wifi_dump()
.await
.inspect_err(|message| error!("Error capturing dump output: {message}"))
.map_err(to_zbus_fdo_error)?
.into_os_string()
.to_string_lossy()
.into())
}
#[zbus(property)]
async fn inhibit_ds(&self) -> fdo::Result<bool> {
let (tx, rx) = oneshot::channel();