Bug 2601 - HT stations should use 40 MHz channel width if the configured channel width is set to 80 or 160 MHz
HT stations should use 40 MHz channel width if the configured channel width i...
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3.26
All All
: P3 normal
Assigned To: sebastien.deronne
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-29 04:53 UTC by sebastien.deronne
Modified: 2017-01-13 14:11 UTC (History)
2 users (show)

See Also:


Attachments
patch to fix (2.36 KB, patch)
2017-01-01 11:41 UTC, sebastien.deronne
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sebastien.deronne 2016-12-29 04:53:09 UTC
When running ht-wifi-network example with a configured channel width of 80 MHz or 160 MHz, the selected channel width drop to the legacy 20 MHz, whereas I would expect to get an operational channel width of 40 MHz since configuration tells the device is capable to go up to 80 or 160 MHz. As a scenario, we can imagine a VHT device configured to use HT rates.
Comment 1 Tom Henderson 2016-12-29 09:32:57 UTC
(In reply to sebastien.deronne from comment #0)
> When running ht-wifi-network example with a configured channel width of 80
> MHz or 160 MHz, the selected channel width drop to the legacy 20 MHz,
> whereas I would expect to get an operational channel width of 40 MHz since
> configuration tells the device is capable to go up to 80 or 160 MHz. As a
> scenario, we can imagine a VHT device configured to use HT rates.

Should the program instead error exit if such a configuration is attempted?
Comment 2 sebastien.deronne 2016-12-29 16:29:00 UTC
(In reply to Tom Henderson from comment #1)
> (In reply to sebastien.deronne from comment #0)
> > When running ht-wifi-network example with a configured channel width of 80
> > MHz or 160 MHz, the selected channel width drop to the legacy 20 MHz,
> > whereas I would expect to get an operational channel width of 40 MHz since
> > configuration tells the device is capable to go up to 80 or 160 MHz. As a
> > scenario, we can imagine a VHT device configured to use HT rates.
> 
> Should the program instead error exit if such a configuration is attempted?

This is another alternative, but I think we should select the highest allowed channel width in that case.
Comment 3 Tom Henderson 2016-12-30 12:48:05 UTC
Can you clarify how this is arising?  I am not seeing it as a possibility in the ht-wifi-network.cc (for loop variable 'j', now 'channelWidth', to exceed the value 40).
Comment 4 sebastien.deronne 2016-12-31 09:49:25 UTC
(In reply to Tom Henderson from comment #3)
> Can you clarify how this is arising?  I am not seeing it as a possibility in
> the ht-wifi-network.cc (for loop variable 'j', now 'channelWidth', to exceed
> the value 40).

I changed manually the test to give a try with a 80 MHz channel width.
Comment 5 Tom Henderson 2016-12-31 14:06:23 UTC
(In reply to sebastien.deronne from comment #4)
> (In reply to Tom Henderson from comment #3)
> > Can you clarify how this is arising?  I am not seeing it as a possibility in
> > the ht-wifi-network.cc (for loop variable 'j', now 'channelWidth', to exceed
> > the value 40).
> 
> I changed manually the test to give a try with a 80 MHz channel width.

I did the same and it seems to me that channel width of 80 is being used (by inserting some logging statements into WifiTxVector code).  How are you observing it dropping to 20 MHz?

Regarding what the behavior should be in this case, the policy that is implemented is that if the user does not explicitly configure a standard channel number, then the user should be able to set explicitly the values of frequency and width to non-standard values, so in this example (wiht no channel number set), I would expect the model to use 80 MHz.
Comment 6 sebastien.deronne 2016-12-31 14:51:22 UTC
(In reply to Tom Henderson from comment #5)
> (In reply to sebastien.deronne from comment #4)
> > (In reply to Tom Henderson from comment #3)
> > > Can you clarify how this is arising?  I am not seeing it as a possibility in
> > > the ht-wifi-network.cc (for loop variable 'j', now 'channelWidth', to exceed
> > > the value 40).
> > 
> > I changed manually the test to give a try with a 80 MHz channel width.
> 
> I did the same and it seems to me that channel width of 80 is being used (by
> inserting some logging statements into WifiTxVector code).  How are you
> observing it dropping to 20 MHz?
> 
> Regarding what the behavior should be in this case, the policy that is
> implemented is that if the user does not explicitly configure a standard
> channel number, then the user should be able to set explicitly the values of
> frequency and width to non-standard values, so in this example (wiht no
> channel number set), I would expect the model to use 80 MHz.

I am checking existing traces, I will add some more checks. 
What do you get as throughput compared to 20 MHz and 40 MHz channel widths?
Comment 7 sebastien.deronne 2017-01-01 11:03:49 UTC
MCS value		Channel width		short GI		Throughput
0			20 MHz			0			5.41696 Mbit/s
0			20 MHz			1			6.12352 Mbit/s
0			40 MHz			0			11.8938 Mbit/s
0			40 MHz			1			12.9536 Mbit/s
0			80 MHz			0			5.77024 Mbit/s

From results, either it uses 20 MHz channel width, or it uses 80 MHz but behave wrongly somewhere: it should use 40 MHz width and throughput should be the same as for 40 MHz. I saw some pieces in the code where it is wrong, but still issue is not fixed. I will investigate further.
Comment 8 sebastien.deronne 2017-01-01 11:41:27 UTC
Created attachment 2721 [details]
patch to fix

Issue was in the capabilities, using >= 40 iso == 40 fixed the issue. Also, I added some protection in the rate calculation done in wifimode.
Comment 9 sebastien.deronne 2017-01-02 02:48:19 UTC
Fix is quite obvious, if agreed then I'll push to the mainstream.
Comment 10 sebastien.deronne 2017-01-13 14:11:49 UTC
Fixed in changeset 12528:04cbba9cd170