mirror of
https://github.com/espressif/openthread.git
synced 2026-08-24 03:09:52 +00:00
[channel-manager] allow channel manager feature without channel-monitor (#2670)
This commit fixes an issue to allow "channel manager" feature to be enabled without requiring the channel-monitor feature.
This commit is contained in:
committed by
Jonathan Hui
parent
31e0fec12a
commit
51d487ed57
@@ -369,16 +369,6 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#else // OPENTHREAD_ENABLE_CHANNEL_MONITOR
|
||||
|
||||
otError ChannelManager::FindBetterChannel(uint8_t &, uint16_t &)
|
||||
{
|
||||
otLogInfoUtil(GetInstance(), "ChannelManager: ChannelMonitor feature is disabled - cannot select channel");
|
||||
return OT_ERROR_DISABLED_FEATURE;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_CHANNEL_MONITOR
|
||||
|
||||
bool ChannelManager::ShouldAttamptChannelChange(void)
|
||||
{
|
||||
uint16_t ccaFailureRate = GetInstance().Get<Mac::Mac>().GetCcaFailureRate();
|
||||
@@ -440,6 +430,16 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#else // OPENTHREAD_ENABLE_CHANNEL_MONITOR
|
||||
|
||||
otError ChannelManager::RequestChannelSelect(bool)
|
||||
{
|
||||
otLogInfoUtil(GetInstance(), "ChannelManager: ChannelMonitor feature is disabled - cannot select channel");
|
||||
return OT_ERROR_DISABLED_FEATURE;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_CHANNEL_MONITOR
|
||||
|
||||
void ChannelManager::StartAutoSelectTimer(void)
|
||||
{
|
||||
VerifyOrExit(mState == kStateIdle);
|
||||
|
||||
@@ -276,10 +276,13 @@ private:
|
||||
static void HandleStateChanged(Notifier::Callback &aCallback, uint32_t aChangedFlags);
|
||||
void HandleStateChanged(uint32_t aChangedFlags);
|
||||
void PreparePendingDataset(void);
|
||||
otError FindBetterChannel(uint8_t &aNewChannel, uint16_t &aOccupancy);
|
||||
bool ShouldAttamptChannelChange(void);
|
||||
void StartAutoSelectTimer(void);
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHANNEL_MONITOR
|
||||
otError FindBetterChannel(uint8_t &aNewChannel, uint16_t &aOccupancy);
|
||||
bool ShouldAttamptChannelChange(void);
|
||||
#endif
|
||||
|
||||
Mac::ChannelMask mSupportedChannelMask;
|
||||
Mac::ChannelMask mFavoredChannelMask;
|
||||
uint64_t mActiveTimestamp;
|
||||
|
||||
Reference in New Issue
Block a user