diff --git a/src/devices/wifi/dcf-manager-test.cc b/src/devices/wifi/dcf-manager-test.cc index 968bbea5f..b94f0ed3f 100644 --- a/src/devices/wifi/dcf-manager-test.cc +++ b/src/devices/wifi/dcf-manager-test.cc @@ -379,6 +379,21 @@ DcfManagerTest::RunTests (void) AddAccessRequest (30, 2, 70, 0); ExpectCollision (30, 0, 0); // backoff: 0 slots EndTest (); + // Test shows when two frames are received without interval between + // them: + // 20 60 100 106 110 112 + // | rx | rx |sifs | aifsn | tx | + // | + // 30 request access. backoff slots: 0 + + StartTest (4, 6 , 10); + AddDcfState (1); + AddRxOkEvt (20, 40); + AddRxOkEvt (60, 40); + AddAccessRequest (30, 2, 110, 0); + ExpectCollision (30, 0, 0); // backoff: 0 slots + EndTest (); + // The test below is subject to some discussion because I am // not sure I understand the intent of the spec here. diff --git a/src/devices/wifi/dcf-manager.cc b/src/devices/wifi/dcf-manager.cc index ec2b0e1fc..320bf0621 100644 --- a/src/devices/wifi/dcf-manager.cc +++ b/src/devices/wifi/dcf-manager.cc @@ -433,7 +433,7 @@ Time DcfManager::GetAccessGrantStart (void) const { Time rxAccessStart; - if (m_lastRxEnd >= m_lastRxStart) + if (!m_rxing) { rxAccessStart = m_lastRxEnd; if (!m_lastRxReceivedOk)