Bug 706

Summary: Backoff counting when starting NS.
Product: ns-3 Reporter: Kirill Andreev <andreev>
Component: wifiAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: faker.moatamri, jpelkey, mathieu.lacage, ns-bugs
Priority: P4    
Version: pre-release   
Hardware: All   
OS: All   
Attachments: Proposed fix.
Fix with DoStart

Description Kirill Andreev 2009-10-06 11:35:28 UTC
Created attachment 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 Mathieu Lacage 2009-11-16 10:18:27 UTC
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 Kirill Andreev 2009-12-02 08:01:59 UTC
Created attachment 684 [details]
Fix with DoStart
Comment 3 Mathieu Lacage 2009-12-31 05:46:44 UTC
If you have tested this and it works, please, commit.
Comment 4 Kirill Andreev 2010-01-11 04:44:00 UTC
changeset 5903	395e17028faf
Comment 5 Josh Pelkey 2010-02-20 13:10:05 UTC
Why has this been reopened? Will close within a week without a response.
Comment 6 Faker Moatamri 2010-02-22 03:52:37 UTC
The changeset have been reverted because it was breaking the builds just few weeks from 3.7 release.
Comment 7 Kirill Andreev 2010-02-26 04:18:07 UTC
Changeset 41ee42654550