diff options
| author | Mattias Grönlund <[email protected]> | 2022-12-31 16:25:37 +0100 |
|---|---|---|
| committer | Mattias Grönlund <[email protected]> | 2022-12-31 16:25:37 +0100 |
| commit | 871700f05dbd30aac71d6a3b5446e7743a18b90b (patch) | |
| tree | 65cf8d0514fae4e46a2a34fa022e606c83da70aa /src/lib.rs | |
| parent | 1b6799d93f0bbd6154c124d51aa47aeed0acf15d (diff) | |
Fixed length for wlan_read.
The length provided in command word for FUNC_WLAN READ, should
describe the actual bytes requested, not the size of the buffer
which is sized in u32.
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs index fa73b32e0..a606d6be3 100644 --- a/src/lib.rs +++ b/src/lib.rs | |||
| @@ -687,7 +687,7 @@ where | |||
| 687 | if status & STATUS_F2_PKT_AVAILABLE != 0 { | 687 | if status & STATUS_F2_PKT_AVAILABLE != 0 { |
| 688 | let len = (status & STATUS_F2_PKT_LEN_MASK) >> STATUS_F2_PKT_LEN_SHIFT; | 688 | let len = (status & STATUS_F2_PKT_LEN_MASK) >> STATUS_F2_PKT_LEN_SHIFT; |
| 689 | 689 | ||
| 690 | self.bus.wlan_read(&mut buf[..(len as usize + 3) / 4]).await; | 690 | self.bus.wlan_read(&mut buf, len).await; |
| 691 | trace!("rx {:02x}", &slice8_mut(&mut buf)[..(len as usize).min(48)]); | 691 | trace!("rx {:02x}", &slice8_mut(&mut buf)[..(len as usize).min(48)]); |
| 692 | self.rx(&slice8_mut(&mut buf)[..len as usize]); | 692 | self.rx(&slice8_mut(&mut buf)[..len as usize]); |
| 693 | } | 693 | } |
