diff options
| author | Simon Börjesson <[email protected]> | 2025-11-03 21:42:19 +0100 |
|---|---|---|
| committer | Simon Börjesson <[email protected]> | 2025-12-02 23:16:20 +0100 |
| commit | 1965d5e6dbcb39775cacc06750702c27bdd4fda8 (patch) | |
| tree | 7033a0eb34d82afe8ccc27fc5381187fefa534e3 | |
| parent | 7d8168b9cc35bfa28105cf629631bb72d507afc7 (diff) | |
Disable authentication before setting up Ap
| -rw-r--r-- | cyw43/src/control.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cyw43/src/control.rs b/cyw43/src/control.rs index 49e3faee4..219198d1f 100644 --- a/cyw43/src/control.rs +++ b/cyw43/src/control.rs | |||
| @@ -436,6 +436,9 @@ impl<'a> Control<'a> { | |||
| 436 | // Set wifi up again | 436 | // Set wifi up again |
| 437 | self.up().await; | 437 | self.up().await; |
| 438 | 438 | ||
| 439 | // Disable authentication | ||
| 440 | self.ioctl_set_u32(Ioctl::SetAuth, 0, AUTH_OPEN).await; | ||
| 441 | |||
| 439 | // Turn on AP mode | 442 | // Turn on AP mode |
| 440 | self.ioctl_set_u32(Ioctl::SetAp, 0, 1).await; | 443 | self.ioctl_set_u32(Ioctl::SetAp, 0, 1).await; |
| 441 | 444 | ||
| @@ -470,8 +473,6 @@ impl<'a> Control<'a> { | |||
| 470 | pfi.passphrase[..passphrase.as_bytes().len()].copy_from_slice(passphrase.as_bytes()); | 473 | pfi.passphrase[..passphrase.as_bytes().len()].copy_from_slice(passphrase.as_bytes()); |
| 471 | self.ioctl(IoctlType::Set, Ioctl::SetWsecPmk, 0, &mut pfi.to_bytes()) | 474 | self.ioctl(IoctlType::Set, Ioctl::SetWsecPmk, 0, &mut pfi.to_bytes()) |
| 472 | .await; | 475 | .await; |
| 473 | } else { | ||
| 474 | self.ioctl_set_u32(Ioctl::SetAuth, 0, 0).await; | ||
| 475 | } | 476 | } |
| 476 | 477 | ||
| 477 | // Change mutlicast rate from 1 Mbps to 11 Mbps | 478 | // Change mutlicast rate from 1 Mbps to 11 Mbps |
