aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32-wpan/src/mac/runner.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/embassy-stm32-wpan/src/mac/runner.rs b/embassy-stm32-wpan/src/mac/runner.rs
index a0090012e..007544c67 100644
--- a/embassy-stm32-wpan/src/mac/runner.rs
+++ b/embassy-stm32-wpan/src/mac/runner.rs
@@ -46,6 +46,8 @@ impl<'a> Runner<'a> {
46 } 46 }
47 }, 47 },
48 async { 48 async {
49 let mut msdu_handle = 0x02;
50
49 loop { 51 loop {
50 let (buf, len) = self.tx_channel.recv().await; 52 let (buf, len) = self.tx_channel.recv().await;
51 53
@@ -56,7 +58,7 @@ impl<'a> Runner<'a> {
56 dst_addr_mode: AddressMode::Short, 58 dst_addr_mode: AddressMode::Short,
57 dst_pan_id: PanId([0x1A, 0xAA]), 59 dst_pan_id: PanId([0x1A, 0xAA]),
58 dst_address: MacAddress::BROADCAST, 60 dst_address: MacAddress::BROADCAST,
59 msdu_handle: 0x02, 61 msdu_handle: msdu_handle,
60 ack_tx: 0x00, 62 ack_tx: 0x00,
61 gts_tx: false, 63 gts_tx: false,
62 security_level: SecurityLevel::Unsecure, 64 security_level: SecurityLevel::Unsecure,
@@ -67,6 +69,8 @@ impl<'a> Runner<'a> {
67 .await 69 .await
68 .unwrap(); 70 .unwrap();
69 71
72 msdu_handle += 1;
73
70 // The tx channel should always be of equal capacity to the tx_buf channel 74 // The tx channel should always be of equal capacity to the tx_buf channel
71 self.tx_buf_channel.try_send(buf).unwrap(); 75 self.tx_buf_channel.try_send(buf).unwrap();
72 } 76 }