From 4b496742a123afc429df4d49de28edeba8b40d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sat, 17 Feb 2018 00:21:06 +0100 Subject: [PATCH] wifi: Fix uint32_t to uint64_t (based on Robert Ammon's patch) --- src/wifi/helper/wifi-helper.cc | 4 ++-- src/wifi/test/wifi-error-rate-models-test.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wifi/helper/wifi-helper.cc b/src/wifi/helper/wifi-helper.cc index 2038a0fb7..03d1c5b86 100644 --- a/src/wifi/helper/wifi-helper.cc +++ b/src/wifi/helper/wifi-helper.cc @@ -201,7 +201,7 @@ WifiPhyHelper::PcapSniffTxEvent ( header.SetFrameFlags (frameFlags); - uint32_t rate = 0; + uint64_t rate = 0; if (txVector.GetMode ().GetModulationClass () != WIFI_MOD_CLASS_HT && txVector.GetMode ().GetModulationClass () != WIFI_MOD_CLASS_VHT && txVector.GetMode ().GetModulationClass () != WIFI_MOD_CLASS_HE) { rate = txVector.GetMode ().GetDataRate (txVector.GetChannelWidth (), txVector.GetGuardInterval (), 1) * txVector.GetNss () / 500000; @@ -395,7 +395,7 @@ WifiPhyHelper::PcapSniffRxEvent ( header.SetFrameFlags (frameFlags); - uint32_t rate = 0; + uint64_t rate = 0; if (txVector.GetMode ().GetModulationClass () != WIFI_MOD_CLASS_HT && txVector.GetMode ().GetModulationClass () != WIFI_MOD_CLASS_VHT && txVector.GetMode ().GetModulationClass () != WIFI_MOD_CLASS_HE) { rate = txVector.GetMode ().GetDataRate (txVector.GetChannelWidth (), txVector.GetGuardInterval (), 1) * txVector.GetNss () / 500000; diff --git a/src/wifi/test/wifi-error-rate-models-test.cc b/src/wifi/test/wifi-error-rate-models-test.cc index cbd7e71be..a73714115 100644 --- a/src/wifi/test/wifi-error-rate-models-test.cc +++ b/src/wifi/test/wifi-error-rate-models-test.cc @@ -66,7 +66,7 @@ WifiErrorRateModelsTestCaseDsss::DoRun (void) { // 1024 bytes plus headers - uint32_t size = (1024 + 40 + 14) * 8; + uint64_t size = (1024 + 40 + 14) * 8; // Spot test some values returned from DsssErrorRateModel // Values taken from sample 80211b.c program used in validation paper double value;