diff options
| author | Matt Johnston <[email protected]> | 2023-05-14 22:48:04 +0800 |
|---|---|---|
| committer | Matt Johnston <[email protected]> | 2023-05-14 22:48:04 +0800 |
| commit | f46e0eb5f28fff64997fee7fc15b123ddc7231fe (patch) | |
| tree | b6fd6f8e5f0a0bf25a9a406a50a217ba1ca0c8ab | |
| parent | 6b5d9642d583bc034ee35b88c903545e7f423b4e (diff) | |
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'
| -rw-r--r-- | src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs index 4a9ada90f..fd11f3674 100644 --- a/src/lib.rs +++ b/src/lib.rs | |||
| @@ -198,6 +198,7 @@ impl PowerManagementMode { | |||
| 198 | fn mode(&self) -> u32 { | 198 | fn mode(&self) -> u32 { |
| 199 | match self { | 199 | match self { |
| 200 | PowerManagementMode::ThroughputThrottling => 1, | 200 | PowerManagementMode::ThroughputThrottling => 1, |
| 201 | PowerManagementMode::None => 0, | ||
| 201 | _ => 2, | 202 | _ => 2, |
| 202 | } | 203 | } |
| 203 | } | 204 | } |
