diff options
Diffstat (limited to 'embassy-stm32-wpan/src/mac/commands.rs')
| -rw-r--r-- | embassy-stm32-wpan/src/mac/commands.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/embassy-stm32-wpan/src/mac/commands.rs b/embassy-stm32-wpan/src/mac/commands.rs index a3a40f377..d96f0094a 100644 --- a/embassy-stm32-wpan/src/mac/commands.rs +++ b/embassy-stm32-wpan/src/mac/commands.rs | |||
| @@ -393,9 +393,14 @@ impl<'a, T: AsRef<[u8]>> TryFrom<Frame<&'a T>> for DataRequest { | |||
| 393 | dst_pan_id: frame.dst_pan_id().ok_or(())?.into(), | 393 | dst_pan_id: frame.dst_pan_id().ok_or(())?.into(), |
| 394 | dst_address: frame.dst_addr().ok_or(())?.into(), | 394 | dst_address: frame.dst_addr().ok_or(())?.into(), |
| 395 | msdu_handle: frame.sequence_number().ok_or(())?, | 395 | msdu_handle: frame.sequence_number().ok_or(())?, |
| 396 | ack_tx: 0x00, | 396 | key_source: frame.key_source().unwrap_or_default().try_into().unwrap_or_default(), |
| 397 | ack_tx: frame.ack_request() as u8, | ||
| 397 | gts_tx: false, | 398 | gts_tx: false, |
| 398 | security_level: SecurityLevel::Unsecure, | 399 | security_level: if frame.security_enabled() { |
| 400 | SecurityLevel::Secured | ||
| 401 | } else { | ||
| 402 | SecurityLevel::Unsecure | ||
| 403 | }, | ||
| 399 | ..Default::default() | 404 | ..Default::default() |
| 400 | }; | 405 | }; |
| 401 | 406 | ||
