diff --git a/src/devices/wifi/mac-high-nqap.cc b/src/devices/wifi/mac-high-nqap.cc index 25e5f1d8f..41fc33d55 100644 --- a/src/devices/wifi/mac-high-nqap.cc +++ b/src/devices/wifi/mac-high-nqap.cc @@ -116,13 +116,13 @@ MacHighNqap::GetSupportedRates (void) const for (uint32_t i = 0; i < m_phy->GetNModes (); i++) { WifiMode mode = m_phy->GetMode (i); - rates.AddSupportedRate (mode.GetPhyRate ()); + rates.AddSupportedRate (mode.GetDataRate ()); } // set the basic rates for (uint32_t j = 0; j < m_stations->GetNBasicModes (); j++) { WifiMode mode = m_stations->GetBasicMode (j); - rates.SetBasicRate (mode.GetPhyRate ()); + rates.SetBasicRate (mode.GetDataRate ()); } return rates; } @@ -273,7 +273,7 @@ MacHighNqap::Receive (Ptr packet, WifiMacHeader const *hdr) for (uint32_t i = 0; i < m_stations->GetNBasicModes (); i++) { WifiMode mode = m_stations->GetBasicMode (i); - if (!rates.IsSupportedRate (mode.GetPhyRate ())) + if (!rates.IsSupportedRate (mode.GetDataRate ())) { problem = true; break; @@ -293,7 +293,7 @@ MacHighNqap::Receive (Ptr packet, WifiMacHeader const *hdr) for (uint32_t j = 0; j < m_phy->GetNModes (); j++) { WifiMode mode = m_phy->GetMode (j); - if (rates.IsSupportedRate (mode.GetPhyRate ())) + if (rates.IsSupportedRate (mode.GetDataRate ())) { station->AddSupportedMode (mode); } diff --git a/src/devices/wifi/mac-high-nqsta.cc b/src/devices/wifi/mac-high-nqsta.cc index 0dbadd875..83f6cfa62 100644 --- a/src/devices/wifi/mac-high-nqsta.cc +++ b/src/devices/wifi/mac-high-nqsta.cc @@ -379,10 +379,10 @@ MacHighNqsta::Receive (Ptr packet, WifiMacHeader const *hdr) for (uint32_t i = 0; i < m_phy->GetNModes (); i++) { WifiMode mode = m_phy->GetMode (i); - if (rates.IsSupportedRate (mode.GetPhyRate ())) + if (rates.IsSupportedRate (mode.GetDataRate ())) { ap->AddSupportedMode (mode); - if (rates.IsBasicRate (mode.GetPhyRate ())) + if (rates.IsBasicRate (mode.GetDataRate ())) { m_stations->AddBasicMode (mode); } @@ -406,7 +406,7 @@ MacHighNqsta::GetSupportedRates (void) const for (uint32_t i = 0; i < m_phy->GetNModes (); i++) { WifiMode mode = m_phy->GetMode (i); - rates.AddSupportedRate (mode.GetPhyRate ()); + rates.AddSupportedRate (mode.GetDataRate ()); } return rates; } diff --git a/src/devices/wifi/wifi-net-device.cc b/src/devices/wifi/wifi-net-device.cc index 4dddb4369..9440a5da2 100644 --- a/src/devices/wifi/wifi-net-device.cc +++ b/src/devices/wifi/wifi-net-device.cc @@ -95,7 +95,7 @@ GetWifiModeForPhyMode (Ptr phy, enum WifiDefaultParameters::PhyModePara for (uint32_t i= 0; i < phy->GetNModes (); i++) { WifiMode mode = phy->GetMode (i); - if (mode.GetPhyRate () == phyRate) + if (mode.GetDataRate () == phyRate) { return mode; } diff --git a/src/devices/wifi/wifi-phy.cc b/src/devices/wifi/wifi-phy.cc index ac88d2951..c29a49b96 100644 --- a/src/devices/wifi/wifi-phy.cc +++ b/src/devices/wifi/wifi-phy.cc @@ -39,28 +39,29 @@ namespace ns3 { // Define all the WifiMode needed for 802.11a static WifiMode g_6mba = WifiModeFactory::CreateBpsk ("wifia-6mbs", true, - 20000000, 6000000 * 1 / 2, 6000000); + 20000000, 6000000, 12000000); static WifiMode g_9mba = WifiModeFactory::CreateBpsk ("wifia-9mbs", false, - 20000000, 9000000 * 3 / 4, 9000000); + 20000000, 9000000, 12000000); +// XXX explain why Bpsk rather than Qpsk static WifiMode g_12mba = WifiModeFactory::CreateBpsk ("wifia-12mbs", true, - 20000000, 12000000 * 1 / 2, 12000000); + 20000000, 12000000, 24000000); static WifiMode g_18mba = WifiModeFactory::CreateBpsk ("wifia-18mbs", false, - 20000000, 18000000 * 3 / 4, 18000000); + 20000000, 18000000, 24000000); static WifiMode g_24mba = WifiModeFactory::CreateBpsk ("wifia-24mbs", true, - 20000000, 24000000 * 1 / 2, 24000000); + 20000000, 24000000, 48000000); static WifiMode g_36mba = WifiModeFactory::CreateBpsk ("wifia-36mbs", false, - 20000000, 36000000 * 3 / 4, 36000000); + 20000000, 36000000, 48000000); static WifiMode g_48mba = WifiModeFactory::CreateBpsk ("wifia-48mbs", false, - 20000000, 48000000 * 2 / 3, 48000000); + 20000000, 48000000, 72000000); static WifiMode g_54mba = WifiModeFactory::CreateBpsk ("wifia-54mbs", false, - 20000000, 54000000 * 3 / 4, 54000000); + 20000000, 54000000, 72000000); /**************************************************************** @@ -1204,7 +1205,7 @@ WifiPhy::EndSync (Ptr packet, Ptr event) * all SNIR changes in the snir vector. */ double per = CalculatePer (event, &ni); - NS_LOG_DEBUG ("mode="<<(event->GetPayloadMode ().GetPhyRate ())<< + NS_LOG_DEBUG ("mode="<<(event->GetPayloadMode ().GetDataRate ())<< ", ber="<<(1-GetChunkSuccessRate (event->GetPayloadMode (), snr, 1))<< ", snr="<