mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
passphrase_info does not have to be passed &mut
This commit is contained in:
parent
d2f6ce5afd
commit
7432c4069b
@ -232,7 +232,7 @@ impl<'a> Control<'a> {
|
|||||||
pub async fn join_wpa2_passphrase_info(
|
pub async fn join_wpa2_passphrase_info(
|
||||||
&mut self,
|
&mut self,
|
||||||
ssid: &str,
|
ssid: &str,
|
||||||
passphrase_info: &mut PassphraseInfo,
|
passphrase_info: &PassphraseInfo,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
self.set_iovar_u32("ampdu_ba_wsize", 8).await;
|
self.set_iovar_u32("ampdu_ba_wsize", 8).await;
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ impl<'a> Control<'a> {
|
|||||||
passphrase: [0; 64],
|
passphrase: [0; 64],
|
||||||
};
|
};
|
||||||
pfi.passphrase[..passphrase.len()].copy_from_slice(passphrase.as_bytes());
|
pfi.passphrase[..passphrase.len()].copy_from_slice(passphrase.as_bytes());
|
||||||
self.join_wpa2_passphrase_info(ssid, &mut pfi).await
|
self.join_wpa2_passphrase_info(ssid, &pfi).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Join a protected network with the provided ssid and precomputed PSK.
|
/// Join a protected network with the provided ssid and precomputed PSK.
|
||||||
@ -283,7 +283,7 @@ impl<'a> Control<'a> {
|
|||||||
passphrase: [0; 64],
|
passphrase: [0; 64],
|
||||||
};
|
};
|
||||||
pfi.passphrase[..psk.len()].copy_from_slice(psk);
|
pfi.passphrase[..psk.len()].copy_from_slice(psk);
|
||||||
self.join_wpa2_passphrase_info(ssid, &mut pfi).await
|
self.join_wpa2_passphrase_info(ssid, &pfi).await
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn wait_for_join(&mut self, i: SsidInfo) -> Result<(), Error> {
|
async fn wait_for_join(&mut self, i: SsidInfo) -> Result<(), Error> {
|
||||||
|
Loading…
Reference in New Issue
Block a user