wifi: (fixes #880) Init last busy structs at initialization time
Otherwise, channel changes done after Install() and before Initialize() do not trigger an update of the last busy structs.
This commit is contained in:
@@ -139,6 +139,13 @@ ChannelAccessManager::~ChannelAccessManager()
|
||||
m_phyListener = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
ChannelAccessManager::DoInitialize()
|
||||
{
|
||||
NS_LOG_FUNCTION(this);
|
||||
InitLastBusyStructs();
|
||||
}
|
||||
|
||||
void
|
||||
ChannelAccessManager::DoDispose()
|
||||
{
|
||||
|
||||
@@ -261,6 +261,7 @@ class ChannelAccessManager : public Object
|
||||
bool IsBusy() const;
|
||||
|
||||
protected:
|
||||
void DoInitialize() override;
|
||||
void DoDispose() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -363,6 +363,14 @@ WifiMac::DoInitialize()
|
||||
{
|
||||
it->second->Initialize();
|
||||
}
|
||||
|
||||
for (auto& link : m_links)
|
||||
{
|
||||
if (auto cam = link->channelAccessManager)
|
||||
{
|
||||
cam->Initialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user