bug 396: try harder to send ASSOCIATION_RESPONSE frames.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 28 Nov 2008 08:55:24 +0100
changeset 3953 4ac29a986eef
parent 3931 ccc0b1372100
child 3954 f6bc20790cb6
bug 396: try harder to send ASSOCIATION_RESPONSE frames.
src/devices/wifi/dca-txop.cc
--- a/src/devices/wifi/dca-txop.cc	Wed Nov 26 13:13:24 2008 +0100
+++ b/src/devices/wifi/dca-txop.cc	Fri Nov 28 08:55:24 2008 +0100
@@ -475,6 +475,10 @@
       MY_DEBUG ("Cts Fail");
       WifiRemoteStation *station = GetStation (m_currentHdr.GetAddr1 ());
       station->ReportFinalRtsFailed ();
+      if (!m_txFailedCallback.IsNull ()) 
+        {
+          m_txFailedCallback (m_currentHdr);
+        }
       // to reset the dcf.
       m_currentPacket = 0;
       m_dcf->ResetCw ();
@@ -522,7 +526,11 @@
       MY_DEBUG ("Ack Fail");
       WifiRemoteStation *station = GetStation (m_currentHdr.GetAddr1 ());
       station->ReportFinalDataFailed ();
-      // to reset the dcf.    
+      if (!m_txFailedCallback.IsNull ()) 
+        {
+          m_txFailedCallback (m_currentHdr);
+        }
+      // to reset the dcf.
       m_currentPacket = 0;
       m_dcf->ResetCw ();
     } 
@@ -530,10 +538,6 @@
     {
       MY_DEBUG ("Retransmit");
       m_currentHdr.SetRetry ();
-      if (!m_txFailedCallback.IsNull ()) 
-        {
-          m_txFailedCallback (m_currentHdr);
-        }
       m_dcf->UpdateFailedCw ();
     }
   m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ()));