wifi: WifiHelper creates the PHY before the MAC

Besides being more natural, it allows the MAC helper to create
a Protection/Ack Manager for every FrameExchangeManager in case
of multi-link devices.
This commit is contained in:
Stefano Avallone
2021-03-31 11:55:05 +02:00
parent 02c20072bc
commit a826d8a447

View File

@@ -808,11 +808,11 @@ WifiHelper::Install (const WifiPhyHelper &phyHelper,
device->SetHeConfiguration (heConfiguration);
}
Ptr<WifiRemoteStationManager> manager = m_stationManager.Create<WifiRemoteStationManager> ();
Ptr<WifiMac> mac = macHelper.Create (device, m_standard);
Ptr<WifiPhy> phy = phyHelper.Create (node, device);
phy->ConfigureStandardAndBand (it->second.phyStandard, it->second.phyBand);
device->SetMac (mac);
device->SetPhy (phy);
Ptr<WifiMac> mac = macHelper.Create (device, m_standard);
device->SetMac (mac);
device->SetRemoteStationManager (manager);
node->AddDevice (device);
if ((it->second.phyStandard >= WIFI_PHY_STANDARD_80211ax) && (m_obssPdAlgorithm.IsTypeIdSet ()))