Bug 706 - Backoff counting when starting NS.
: Backoff counting when starting NS.
Status: REOPENED
: ns-3
wifi
: pre-release
: All All
: P4 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-10-06 11:35 EDT by
Modified: 2010-01-13 07:49 EDT (History)


Attachments
Proposed fix. (652 bytes, patch)
2009-10-06 11:35 EDT, Kirill Andreev
Details | Diff
Fix with DoStart (7.28 KB, patch)
2009-12-02 08:01 EDT, Kirill Andreev
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-10-06 11:35:28 EDT
Created an attachment (id=621) [details]
Proposed fix.

When the packet is received, DcaTxop must start backoff immediately, but when
we initiate our simulation, the backoff is not counted. So, I suppose to add
starting backoff in constructor of DcaTxop and in SetMinCw method, because
inside constructor MinCw may be incorrect.
------- Comment #1 From 2009-11-16 10:18:27 EDT -------
The risk is that m_cw will not be initialized correctly when the constructor is
invoked. I suspect that the best way to do this would be to use the
Object::DoStart method I introduced a couple of days ago and move the code you
introduced here instead:

void
DcaTxop::DoStart (void)
{
  // XXX... start backoff
  // chainup
  Dcf::DoStart ();
}

And, then, you need to make sure that the MAC layer which creates the DcaTxop
class calls its Start method:

void
NqapWifiMac::DoStart (void)
{
  m_beaconDca->Start ();
  m_dca->Start ();
  // chainup
  WifiMac::DoStart ();
}

and the same modification in all other WifiMac subclasses.
------- Comment #2 From 2009-12-02 08:01:59 EDT -------
Created an attachment (id=684) [details]
Fix with DoStart
------- Comment #3 From 2009-12-31 05:46:44 EDT -------
If you have tested this and it works, please, commit.
------- Comment #4 From 2010-01-11 04:44:00 EDT -------
changeset 5903    395e17028faf