mirror of
https://github.com/espressif/openthread.git
synced 2026-10-10 17:57:48 +00:00
When a router-eligible Child transitions to Router (e.g. during TestCoapObserve when Leader notifies an upgraded child at its former child RLOC16), OpenThread calls otPlatRadioSetAlternateShortAddress(), which stores the previous short address in mRadioContext.mAlternateShortAddress. Fix alternate short address handling consistently across Nexus, simulation radio, and MAC frame utils: - Advertise OT_RADIO_CAPS_ALT_SHORT_ADDR in both Nexus otPlatRadioGetCaps() and simulation gRadioCaps. - Initialize mCslShortAddress, mShortAddress, and mAlternateShortAddress in otRadioContext to OT_RADIO_INVALID_SHORT_ADDR in both Nexus::Radio::Reset() and simulation platformRadioInit(). - Drop duplicate Radio::mShortAddress and Radio::mExtAddress from Nexus::Radio and use mRadioContext consistently. - Simplify Nexus::Radio::Radio(void) to call Reset(). - Guard against Mac::kShortAddrInvalid and match both short addresses in Nexus::Radio::Matches() and otMacFrameDoesAddrMatchAny().