-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[utils] fix build when OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0
#10260
Conversation
…NFIG_CHANNEL_MONITOR_ENABLE [Issue] Disabling channel monitor feature on ot-daemon by setting following flag "OT_CHANNEL_MONITOR = 0" a compilation error was present. [Fix] Some pieces of code in OpenThread shall be under OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE. Signed-off-by: Ashishkumar Vara <ashish.vara@nxp.com>
Size Report of OpenThread
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aashu216.
I am fine merging this PR to fix the build errors.
However, looking at the code, I see many methods that could be better guarded and only provided when CHANNEL_MONITOR is enabled. The addition of CSL channel changes has increased the complexity of the entire module. Fixing this properly will require a larger change. I can try to address this later when I have the opportunity.
@@ -423,12 +425,14 @@ void ChannelManager::StartAutoSelectTimer(void) | |||
#if OPENTHREAD_FTD | |||
void ChannelManager::SetAutoNetworkChannelSelectionEnabled(bool aEnabled) | |||
{ | |||
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should guard this whole method with CHANNEL_MONITOR_ENABLE
. Auto-selection mode only make sense when "channel-moinitor" feature is enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @abtink, yes it needs large changes if we want to guard this method. Can you please help merge with this PR to fix build issue as of now?
OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0
OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0
OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0
[Issue] Disabling channel monitor feature on ot-daemon by setting following flag "OT_CHANNEL_MONITOR = 0" a compilation error was present.
[Fix] Some pieces of code in OpenThread shall be under OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE.