mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-07 23:20:31 -04:00
Don't set wifi debug mode if it isn't changing.
Since set_wifi_debug_mode always restarts iwd which has unintentional consequences on oled deck (destroys and recreates the network interface) but not on lcd deck first check if previous mode is different than wanted mode before doing anything. See https://gitlab.steamos.cloud/holo/holo/-/merge_requests/747/diffs#2790dcf348b51beca93939ee9fd81f87566d57c9_0_29 for more information.
This commit is contained in:
parent
2f4cfb1e66
commit
1a491db6fe
1 changed files with 7 additions and 1 deletions
|
@ -12,7 +12,7 @@ use std::ffi::OsStr;
|
|||
use tokio::fs::File;
|
||||
use tokio::sync::mpsc::Sender;
|
||||
use tokio::sync::oneshot;
|
||||
use tracing::error;
|
||||
use tracing::{error, info};
|
||||
use zbus::zvariant::{self, Fd};
|
||||
use zbus::{fdo, interface, Connection, SignalContext};
|
||||
|
||||
|
@ -318,6 +318,12 @@ impl SteamOSManager {
|
|||
Ok(mode) => mode,
|
||||
Err(e) => return Err(fdo::Error::InvalidArgs(e.to_string())),
|
||||
};
|
||||
|
||||
if self.wifi_debug_mode == wanted_mode {
|
||||
info!("Not changing wifi debug mode since it's already set to {wanted_mode}");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let buffer_size = match options
|
||||
.get("buffer_size")
|
||||
.map(zbus::zvariant::Value::downcast_ref)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue