Skip to content
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

Merged
merged 1 commit into from
May 20, 2024

Conversation

aashu216
Copy link
Contributor

@aashu216 aashu216 commented May 17, 2024

[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.

…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>
Copy link

size-report bot commented May 17, 2024

Size Report of OpenThread

Merging #10260 into main(be10913).

name branch text data bss total
ot-cli-ftd main 466992 856 66364 534212
#10260 466992 856 66364 534212
+/- 0 0 0 0
ot-ncp-ftd main 435836 760 61576 498172
#10260 435836 760 61576 498172
+/- 0 0 0 0
libopenthread-ftd.a main 236086 95 40310 276491
#10260 236086 95 40310 276491
+/- 0 0 0 0
libopenthread-cli-ftd.a main 57533 0 8075 65608
#10260 57533 0 8075 65608
+/- 0 0 0 0
libopenthread-ncp-ftd.a main 31863 0 5916 37779
#10260 31863 0 5916 37779
+/- 0 0 0 0
ot-cli-mtd main 364456 760 51220 416436
#10260 364456 760 51220 416436
+/- 0 0 0 0
ot-ncp-mtd main 346980 760 46448 394188
#10260 346980 760 46448 394188
+/- 0 0 0 0
libopenthread-mtd.a main 158097 0 25182 183279
#10260 158097 0 25182 183279
+/- 0 0 0 0
libopenthread-cli-mtd.a main 39756 0 8059 47815
#10260 39756 0 8059 47815
+/- 0 0 0 0
libopenthread-ncp-mtd.a main 24743 0 5916 30659
#10260 24743 0 5916 30659
+/- 0 0 0 0
ot-cli-ftd-br main 550720 864 131204 682788
#10260 550720 864 131204 682788
+/- 0 0 0 0
libopenthread-ftd-br.a main 324516 100 105126 429742
#10260 324516 100 105126 429742
+/- 0 0 0 0
libopenthread-cli-ftd-br.a main 71320 0 8099 79419
#10260 71320 0 8099 79419
+/- 0 0 0 0
ot-rcp main 62216 564 20604 83384
#10260 62216 564 20604 83384
+/- 0 0 0 0
libopenthread-rcp.a main 9542 0 5052 14594
#10260 9542 0 5052 14594
+/- 0 0 0 0
libopenthread-radio.a main 18870 0 214 19084
#10260 18870 0 214 19084
+/- 0 0 0 0

@jwhui jwhui requested a review from abtink May 17, 2024 17:00
Copy link
Member

@abtink abtink left a 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
Copy link
Member

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

Copy link
Contributor Author

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?

@jwhui jwhui requested a review from abtink May 20, 2024 15:57
@jwhui jwhui changed the title [utils] Fixed to avoid compilation issue when disabling OPENTHREAD_CO… [utils] fix compile when OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0 May 20, 2024
@jwhui jwhui changed the title [utils] fix compile when OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0 [utils] fix build when OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0 May 20, 2024
@jwhui jwhui merged commit 0ce49fc into openthread:main May 20, 2024
103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants