Fix PowerManagementMode::None

Mode was being set to 2 (PM2_POWERSAVE_MODE), should be
0 (NO_POWERSAVE_MODE). Setting None mode failed with a panic:

85.707099 DEBUG set pm2_sleep_ret = [00, 00, 00, 00]
└─ cyw43::control::{impl#0}::set_iovar_v::{async_fn#0} @ cyw43/src/fmt.rs:127
85.710469 ERROR panicked at 'IOCTL error -29'
This commit is contained in:
Matt Johnston 2023-05-14 22:48:04 +08:00
parent 6b5d9642d5
commit f46e0eb5f2

View File

@ -198,6 +198,7 @@ impl PowerManagementMode {
fn mode(&self) -> u32 { fn mode(&self) -> u32 {
match self { match self {
PowerManagementMode::ThroughputThrottling => 1, PowerManagementMode::ThroughputThrottling => 1,
PowerManagementMode::None => 0,
_ => 2, _ => 2,
} }
} }