cyw43: Create leave function on Control struct.
Create a function, which disassociates us, from the currently connected infra.
This commit is contained in:
parent
05ee02b593
commit
e025693914
2 changed files with 6 additions and 0 deletions
cyw43/src
|
@ -96,6 +96,7 @@ pub(crate) const IOCTL_CMD_UP: u32 = 2;
|
||||||
pub(crate) const IOCTL_CMD_DOWN: u32 = 3;
|
pub(crate) const IOCTL_CMD_DOWN: u32 = 3;
|
||||||
pub(crate) const IOCTL_CMD_SET_SSID: u32 = 26;
|
pub(crate) const IOCTL_CMD_SET_SSID: u32 = 26;
|
||||||
pub(crate) const IOCTL_CMD_SET_CHANNEL: u32 = 30;
|
pub(crate) const IOCTL_CMD_SET_CHANNEL: u32 = 30;
|
||||||
|
pub(crate) const IOCTL_CMD_DISASSOC: u32 = 52;
|
||||||
pub(crate) const IOCTL_CMD_ANTDIV: u32 = 64;
|
pub(crate) const IOCTL_CMD_ANTDIV: u32 = 64;
|
||||||
pub(crate) const IOCTL_CMD_SET_AP: u32 = 118;
|
pub(crate) const IOCTL_CMD_SET_AP: u32 = 118;
|
||||||
pub(crate) const IOCTL_CMD_SET_VAR: u32 = 263;
|
pub(crate) const IOCTL_CMD_SET_VAR: u32 = 263;
|
||||||
|
|
|
@ -433,6 +433,11 @@ impl<'a> Control<'a> {
|
||||||
events: &self.events,
|
events: &self.events,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// Leave the wifi, with which we are currently associated.
|
||||||
|
pub async fn leave(&mut self) {
|
||||||
|
self.ioctl(IoctlType::Set, IOCTL_CMD_DISASSOC, 0, &mut []).await;
|
||||||
|
info!("Disassociated")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Scanner<'a> {
|
pub struct Scanner<'a> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue