|
Bugzilla – Full Text Bug Listing |
| Summary: | Backoff counting when starting NS. | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Kirill Andreev <andreev> |
| Component: | wifi | Assignee: | 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 |
||
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.
Created attachment 684 [details]
Fix with DoStart
If you have tested this and it works, please, commit. changeset 5903 395e17028faf Why has this been reopened? Will close within a week without a response. The changeset have been reverted because it was breaking the builds just few weeks from 3.7 release. Changeset 41ee42654550 |
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.