mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
net-esp-hosted: put link down on wifi disconnect.
This commit is contained in:
parent
065b0f34af
commit
ef7523e5b7
@ -128,6 +128,7 @@ where
|
|||||||
|
|
||||||
let mut runner = Runner {
|
let mut runner = Runner {
|
||||||
ch: ch_runner,
|
ch: ch_runner,
|
||||||
|
state_ch,
|
||||||
shared: &state.shared,
|
shared: &state.shared,
|
||||||
next_seq: 1,
|
next_seq: 1,
|
||||||
handshake,
|
handshake,
|
||||||
@ -142,6 +143,7 @@ where
|
|||||||
|
|
||||||
pub struct Runner<'a, SPI, IN, OUT> {
|
pub struct Runner<'a, SPI, IN, OUT> {
|
||||||
ch: ch::Runner<'a, MTU>,
|
ch: ch::Runner<'a, MTU>,
|
||||||
|
state_ch: ch::StateRunner<'a>,
|
||||||
shared: &'a Shared,
|
shared: &'a Shared,
|
||||||
|
|
||||||
next_seq: u16,
|
next_seq: u16,
|
||||||
@ -322,6 +324,10 @@ where
|
|||||||
|
|
||||||
match payload {
|
match payload {
|
||||||
CtrlMsgPayload::EventEspInit(_) => self.shared.init_done(),
|
CtrlMsgPayload::EventEspInit(_) => self.shared.init_done(),
|
||||||
|
CtrlMsgPayload::EventStationDisconnectFromAp(e) => {
|
||||||
|
info!("disconnected, code {}", e.resp);
|
||||||
|
self.state_ch.set_link_state(LinkState::Down);
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user