src/devices/wifi/onoe-mac-stations.cc
changeset 2277 51c66e7993c0
parent 2272 ae2bbdbfc161
child 2544 2e6e1a6e0d94
--- a/src/devices/wifi/onoe-mac-stations.cc	Thu Dec 13 15:07:08 2007 +0100
+++ b/src/devices/wifi/onoe-mac-stations.cc	Fri Dec 14 15:18:14 2007 +0100
@@ -61,7 +61,8 @@
     m_tx_ok (0),
     m_tx_err (0),
     m_tx_retr (0),
-    m_tx_upper (0)
+    m_tx_upper (0),
+    m_txrate (0)
 {}
 OnoeMacStation::~OnoeMacStation ()
 {}
@@ -114,6 +115,7 @@
     {
       return;
     }
+  m_nextModeUpdate = Simulator::Now () + m_stations->m_updatePeriod;
   /**
    * The following 20 lines of code were copied from the Onoe
    * rate control kernel module used in the madwifi driver.
@@ -163,6 +165,7 @@
   }
 
   if (nrate != m_txrate) {
+    NS_ASSERT (nrate < GetNSupportedModes ());
     m_txrate = nrate;
     m_tx_ok = m_tx_err = m_tx_retr = m_tx_upper = 0;
   } else if (enough)