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 <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
129f34fd0b
commit
a60f32549e
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue