From 4a23cf671d59f2cc97b72dc856377ce1cc321441 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 17 May 2022 03:07:56 +0800 Subject: [PATCH] fix hosted mode MAC address --- services/com/src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/com/src/main.rs b/services/com/src/main.rs index 5ae4a7b98..d3362a1c4 100644 --- a/services/com/src/main.rs +++ b/services/com/src/main.rs @@ -962,6 +962,12 @@ fn xmain() -> ! { for dest in prealloc.iter_mut() { *dest = com.wait_txrx(ComState::LINK_READ.verb, Some(STD_TIMEOUT)); } + #[cfg(not(any(target_os = "none", target_os = "xous")))] + { // assign a fake MAC address in hosted mode so we don't crash smoltcp + for i in 1..4 { + prealloc[i] = i as u16 - 1; + } + } buffer.replace(prealloc).expect("couldn't return result on FlashOp"); } Some(Opcode::WlanFetchPacket) => {