Skip to content

Commit

Permalink
[spinel] handle new spinel net role DISABLED
Browse files Browse the repository at this point in the history
  • Loading branch information
Irving-cl committed Dec 22, 2023
1 parent e2fd726 commit d39a291
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ncp-spinel/SpinelNCPInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5767,6 +5767,7 @@ SpinelNCPInstance::handle_ncp_spinel_value_is(spinel_prop_key_t key, const uint8

if (ncp_state_is_joining_or_joined(get_ncp_state())
&& (value != SPINEL_NET_ROLE_DETACHED)
&& (value != SPINEL_NET_ROLE_DISABLED)
) {
change_ncp_state(ASSOCIATED);
}
Expand All @@ -5784,7 +5785,7 @@ SpinelNCPInstance::handle_ncp_spinel_value_is(spinel_prop_key_t key, const uint8
} else if (value == SPINEL_NET_ROLE_LEADER) {
update_node_type(LEADER);

} else if (value == SPINEL_NET_ROLE_DETACHED) {
} else if (value == SPINEL_NET_ROLE_DETACHED || value == SPINEL_NET_ROLE_DISABLED) {
update_node_type(UNKNOWN);
if (ncp_state_is_associated(get_ncp_state())) {
change_ncp_state(ISOLATED);
Expand Down

0 comments on commit d39a291

Please sign in to comment.