fix hosted mode MAC address

This commit is contained in:
bunnie 2022-05-17 03:07:56 +08:00
parent ca275308ef
commit 4a23cf671d

View file

@ -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) => {