From a60f32549e9b2a4e6a8b2009467b4af48d26caee Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Mon, 12 Dec 2022 11:53:07 +0100 Subject: [PATCH] net: l2: ieee802154: Align LL address update routine IEEE802154 L2 may modify the LL address during interface operation (when processing MAC command). So far the L2 workaround the LL address update protection by clearing the NET_IF_UP flag temporarily, but due to recent changes it no longer works. Update this workaround to verify NET_IF_RUNNING flag instead. Signed-off-by: Robert Lubos --- subsys/net/l2/ieee802154/ieee802154_mgmt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/net/l2/ieee802154/ieee802154_mgmt.c b/subsys/net/l2/ieee802154/ieee802154_mgmt.c index 723010a1d1e..27aea961206 100644 --- a/subsys/net/l2/ieee802154/ieee802154_mgmt.c +++ b/subsys/net/l2/ieee802154/ieee802154_mgmt.c @@ -203,11 +203,11 @@ static inline void update_net_if_link_addr(struct net_if *iface, struct ieee8021 { bool was_if_up; - was_if_up = net_if_flag_test_and_clear(iface, NET_IF_UP); + was_if_up = net_if_flag_test_and_clear(iface, NET_IF_RUNNING); net_if_set_link_addr(iface, ctx->linkaddr.addr, ctx->linkaddr.len, ctx->linkaddr.type); if (was_if_up) { - net_if_flag_set(iface, NET_IF_UP); + net_if_flag_set(iface, NET_IF_RUNNING); } }