Bug 2351

Summary: Wrong symbol rate calculation for channels with 10 and 5 Mhz width
Product: ns-3 Reporter: Ali Rostami <rostami>
Component: wifiAssignee: sebastien.deronne
Status: RESOLVED FIXED    
Severity: major CC: ns-bugs
Priority: P5    
Version: ns-3.25   
Hardware: All   
OS: All   
Attachments: Suggested Patch
final patch

Description Ali Rostami 2016-03-29 11:55:41 UTC
Created attachment 2360 [details]
Suggested Patch

WifiMode::GetDataRate function seems to calculate the symbol rate for 20Mhz channel, while considers other differences between 20, 10, and 5 Mhz channels such as the number of usable subcarriers.
The function uses following line to calculate the symbol rate:
      double symbolRate = (1 / 4.0) * 1e6;
While is should be:
      double symbolRate = (1 / 8.0) * 1e6;
and:
      double symbolRate = (1 / 16.0) * 1e6;
for the 10 Mhz channel width and the 5 Mhz channel width, respectively.
Comment 1 sebastien.deronne 2016-07-26 02:37:21 UTC
This could be pushed
Comment 2 sebastien.deronne 2016-07-30 03:25:58 UTC
wave-mac-extension is failing with those changes, I'll check before pushing
Comment 3 sebastien.deronne 2016-07-30 03:39:22 UTC
Patch is actually NOK, data rates are half of expected!
Comment 4 sebastien.deronne 2016-07-30 04:04:53 UTC
Created attachment 2504 [details]
final patch

The patch has been corrected: 10 MHz uses double symbol duration than 20 MHz, with the same number of subcarriers (and thus half subcarrier spacing). We now retrieve the correct data rate and tests are all passing fine.
Comment 5 sebastien.deronne 2016-07-30 04:05:20 UTC
patch is now ready to be pushed!
Comment 6 sebastien.deronne 2016-07-30 04:08:28 UTC
fixed in changeset 12229:9e43ad888f78