src/devices/wifi/mac-low.cc
changeset 4910 26ec4be336e7
parent 4264 9d2e96c4e6e4
child 4509 b2654e0f071d
child 4981 627b8e87e82f
equal deleted inserted replaced
4909:c5f36fcf52ad 4910:26ec4be336e7
   535            m_ctsTimeoutEvent.IsRunning () &&
   535            m_ctsTimeoutEvent.IsRunning () &&
   536            m_currentPacket != 0) 
   536            m_currentPacket != 0) 
   537     {
   537     {
   538       NS_LOG_DEBUG ("receive cts from="<<m_currentHdr.GetAddr1 ());
   538       NS_LOG_DEBUG ("receive cts from="<<m_currentHdr.GetAddr1 ());
   539       SnrTag tag;
   539       SnrTag tag;
   540       packet->FindFirstMatchingTag (tag);
   540       packet->RemovePacketTag (tag);
   541       WifiRemoteStation *station = GetStation (m_currentHdr.GetAddr1 ());
   541       WifiRemoteStation *station = GetStation (m_currentHdr.GetAddr1 ());
   542       station->ReportRxOk (rxSnr, txMode);
   542       station->ReportRxOk (rxSnr, txMode);
   543       station->ReportRtsOk (rxSnr, txMode, tag.Get ());
   543       station->ReportRtsOk (rxSnr, txMode, tag.Get ());
   544       
   544       
   545       m_ctsTimeoutEvent.Cancel ();
   545       m_ctsTimeoutEvent.Cancel ();
   558             m_superFastAckTimeoutEvent.IsRunning ()) &&
   558             m_superFastAckTimeoutEvent.IsRunning ()) &&
   559            m_txParams.MustWaitAck ()) 
   559            m_txParams.MustWaitAck ()) 
   560     {
   560     {
   561       NS_LOG_DEBUG ("receive ack from="<<m_currentHdr.GetAddr1 ());
   561       NS_LOG_DEBUG ("receive ack from="<<m_currentHdr.GetAddr1 ());
   562       SnrTag tag;
   562       SnrTag tag;
   563       packet->FindFirstMatchingTag (tag);
   563       packet->RemovePacketTag (tag);
   564       WifiRemoteStation *station = GetStation (m_currentHdr.GetAddr1 ());
   564       WifiRemoteStation *station = GetStation (m_currentHdr.GetAddr1 ());
   565       station->ReportRxOk (rxSnr, txMode);
   565       station->ReportRxOk (rxSnr, txMode);
   566       station->ReportDataOk (rxSnr, txMode, tag.Get ());
   566       station->ReportDataOk (rxSnr, txMode, tag.Get ());
   567       bool gotAck = false;
   567       bool gotAck = false;
   568       if (m_txParams.MustWaitNormalAck () &&
   568       if (m_txParams.MustWaitNormalAck () &&
  1078   WifiMacTrailer fcs;
  1078   WifiMacTrailer fcs;
  1079   packet->AddTrailer (fcs);
  1079   packet->AddTrailer (fcs);
  1080 
  1080 
  1081   struct SnrTag tag;
  1081   struct SnrTag tag;
  1082   tag.Set (rtsSnr);
  1082   tag.Set (rtsSnr);
  1083   packet->AddTag (tag);
  1083   packet->AddPacketTag (tag);
  1084 
  1084 
  1085   ForwardDown (packet, &cts, ctsTxMode);
  1085   ForwardDown (packet, &cts, ctsTxMode);
  1086 }
  1086 }
  1087 
  1087 
  1088 void
  1088 void
  1157   WifiMacTrailer fcs;
  1157   WifiMacTrailer fcs;
  1158   packet->AddTrailer (fcs);
  1158   packet->AddTrailer (fcs);
  1159 
  1159 
  1160   struct SnrTag tag;
  1160   struct SnrTag tag;
  1161   tag.Set (dataSnr);
  1161   tag.Set (dataSnr);
  1162   packet->AddTag (tag);
  1162   packet->AddPacketTag (tag);
  1163 
  1163 
  1164   ForwardDown (packet, &ack, ackTxMode);
  1164   ForwardDown (packet, &ack, ackTxMode);
  1165 }
  1165 }
  1166 
  1166 
  1167 } // namespace ns3
  1167 } // namespace ns3