From 9c2523ded4e7b7be01c8d686eb1f94ca3c5f0759 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 22 Dec 2023 22:20:55 +0800 Subject: [PATCH] fix #227 --- RELEASE-v0.9.md | 1 + services/net/src/connection_manager.rs | 46 +++++++++++++++++++++----- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/RELEASE-v0.9.md b/RELEASE-v0.9.md index 003b836c6..1428f3b47 100644 --- a/RELEASE-v0.9.md +++ b/RELEASE-v0.9.md @@ -430,6 +430,7 @@ perform the Xous firmware upgrade. This requires running manual update commands, - Cleanup areas where `net` could block on a hung `connection_manager` - Stop running CI on `betrusted-soc` commits: there have been no changes to the design, all of the recent commits are fixing breaking changes in CI tooling. We should not force users to update their `soc` for a design that hasn't actually changed. Thus, users may note that the `soc` commit is not parallel with HEAD on `main`. CI & release staging will from now on be manually triggered only when an actual design change is made. - `smoltcp` is pinned to a branch. A lot of significant fixes have occurred since their last release in June, and we'd like to get this baked into 0.9.15. It's unclear when they will tag out a release, so this is a temporary fix to allow us to move ahead. Will revert to an officially blessed release once it's available! +- fix #227 (make wlan status sends fail gracefully) ## Roadmap - Lots of testing and bug fixes diff --git a/services/net/src/connection_manager.rs b/services/net/src/connection_manager.rs index c1a5aacd1..2d6475265 100644 --- a/services/net/src/connection_manager.rs +++ b/services/net/src/connection_manager.rs @@ -223,7 +223,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } wifi_state = WifiState::Error; } @@ -240,7 +243,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } } WifiState::Error => { @@ -332,7 +338,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } if wifi_stats_cache.ipv4.dhcp == com_rs::DhcpState::Bound { wifi_state = WifiState::Connected; @@ -384,7 +393,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } } @@ -456,7 +468,11 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + }; } } WifiState::Off => { @@ -480,7 +496,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } } } @@ -587,7 +606,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } if !run.swap(true, Ordering::SeqCst) { if !pumping.load(Ordering::SeqCst) { // avoid having multiple pump messages being sent if a user tries to rapidly toggle the run/stop switch @@ -612,7 +634,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } if !run.swap(true, Ordering::SeqCst) { if !pumping.load(Ordering::SeqCst) { // avoid having multiple pump messages being sent if a user tries to rapidly toggle the run/stop switch @@ -640,7 +665,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc log::warn!("Couldn't update wifi state subscriber: {:?}", e), + _ => (), + } } } Some(ConnectionManagerOpcode::EcReset) => msg_scalar_unpack!(msg, _, _, _, _, {