View | Details | Raw Unified | Return to bug 2926
Collapse All | Expand All

(-)a/src/wifi/model/minstrel-ht-wifi-manager.cc (-1 / +1 lines)
 Lines 958-964    Link Here 
958
}
958
}
959
959
960
bool
960
bool
961
MinstrelHtWifiManager::DoNeedDataRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
961
MinstrelHtWifiManager::DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
962
{
962
{
963
  NS_LOG_FUNCTION (this << st << packet << normally);
963
  NS_LOG_FUNCTION (this << st << packet << normally);
964
964
(-)a/src/wifi/model/minstrel-ht-wifi-manager.h (-1 / +1 lines)
 Lines 241-247    Link Here 
241
                              uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
241
                              uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
242
                              double rxSnr, double dataSnr);
242
                              double rxSnr, double dataSnr);
243
  bool IsLowLatency (void) const;
243
  bool IsLowLatency (void) const;
244
  bool DoNeedDataRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally);
244
  bool DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally);
245
245
246
  /**
246
  /**
247
   * Check the validity of a combination of number of streams, chWidth and mode.
247
   * Check the validity of a combination of number of streams, chWidth and mode.
(-)a/src/wifi/model/minstrel-wifi-manager.cc (-1 / +1 lines)
 Lines 855-861    Link Here 
855
}
855
}
856
856
857
bool
857
bool
858
MinstrelWifiManager::DoNeedDataRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
858
MinstrelWifiManager::DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
859
{
859
{
860
  NS_LOG_FUNCTION (this << st << packet << normally);
860
  NS_LOG_FUNCTION (this << st << packet << normally);
861
  MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *)st;
861
  MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *)st;
(-)a/src/wifi/model/minstrel-wifi-manager.h (-1 / +1 lines)
 Lines 273-279    Link Here 
273
  WifiTxVector DoGetDataTxVector (WifiRemoteStation *station);
273
  WifiTxVector DoGetDataTxVector (WifiRemoteStation *station);
274
  WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station);
274
  WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station);
275
275
276
  bool DoNeedDataRetransmission (WifiRemoteStation *st,
276
  bool DoNeedRetransmission (WifiRemoteStation *st,
277
                                 Ptr<const Packet> packet, bool normally);
277
                                 Ptr<const Packet> packet, bool normally);
278
278
279
  bool IsLowLatency (void) const;
279
  bool IsLowLatency (void) const;
(-)a/src/wifi/model/txop.cc (-2 / +2 lines)
 Lines 353-366    Link Here 
353
Txop::NeedRtsRetransmission (Ptr<const Packet> packet, const WifiMacHeader &hdr)
353
Txop::NeedRtsRetransmission (Ptr<const Packet> packet, const WifiMacHeader &hdr)
354
{
354
{
355
  NS_LOG_FUNCTION (this);
355
  NS_LOG_FUNCTION (this);
356
  return m_stationManager->NeedRtsRetransmission (hdr.GetAddr1 (), &hdr, packet);
356
  return m_stationManager->NeedRetransmission (hdr.GetAddr1 (), &hdr, packet);
357
}
357
}
358
358
359
bool
359
bool
360
Txop::NeedDataRetransmission (Ptr<const Packet> packet, const WifiMacHeader &hdr)
360
Txop::NeedDataRetransmission (Ptr<const Packet> packet, const WifiMacHeader &hdr)
361
{
361
{
362
  NS_LOG_FUNCTION (this);
362
  NS_LOG_FUNCTION (this);
363
  return m_stationManager->NeedDataRetransmission (hdr.GetAddr1 (), &hdr, packet);
363
  return m_stationManager->NeedRetransmission (hdr.GetAddr1 (), &hdr, packet);
364
}
364
}
365
365
366
bool
366
bool
(-)a/src/wifi/model/wifi-remote-station-manager.cc (-28 / +21 lines)
 Lines 334-346    Link Here 
334
                   MakeBooleanAccessor (&WifiRemoteStationManager::IsLowLatency),
334
                   MakeBooleanAccessor (&WifiRemoteStationManager::IsLowLatency),
335
                   MakeBooleanChecker ())
335
                   MakeBooleanChecker ())
336
    .AddAttribute ("MaxSsrc",
336
    .AddAttribute ("MaxSsrc",
337
                   "The maximum number of retransmission attempts for an RTS. "
337
                   "The maximum number of retransmission attempts for any packet with size <= RtsCtsThreshold. "
338
                   " This value will not have any effect on some rate control algorithms.",
338
                   "This value will not have any effect on some rate control algorithms.",
339
                   UintegerValue (7),
339
                   UintegerValue (7),
340
                   MakeUintegerAccessor (&WifiRemoteStationManager::SetMaxSsrc),
340
                   MakeUintegerAccessor (&WifiRemoteStationManager::SetMaxSsrc),
341
                   MakeUintegerChecker<uint32_t> ())
341
                   MakeUintegerChecker<uint32_t> ())
342
    .AddAttribute ("MaxSlrc",
342
    .AddAttribute ("MaxSlrc",
343
                   "The maximum number of retransmission attempts for a DATA packet. "
343
                   "The maximum number of retransmission attempts for any packet with size > RtsCtsThreshold. "
344
                   "This value will not have any effect on some rate control algorithms.",
344
                   "This value will not have any effect on some rate control algorithms.",
345
                   UintegerValue (4),
345
                   UintegerValue (4),
346
                   MakeUintegerAccessor (&WifiRemoteStationManager::SetMaxSlrc),
346
                   MakeUintegerAccessor (&WifiRemoteStationManager::SetMaxSlrc),
 Lines 1144-1170    Link Here 
1144
}
1144
}
1145
1145
1146
bool
1146
bool
1147
WifiRemoteStationManager::NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header,
1147
WifiRemoteStationManager::NeedRetransmission (Mac48Address address, const WifiMacHeader *header,
1148
                                                 Ptr<const Packet> packet)
1148
                                                 Ptr<const Packet> packet)
1149
{
1149
{
1150
  NS_LOG_FUNCTION (this << address << packet << *header);
1150
  NS_LOG_FUNCTION (this << address << packet << *header);
1151
  NS_ASSERT (!address.IsGroup ());
1151
  NS_ASSERT (!address.IsGroup ());
1152
  WifiRemoteStation *station = Lookup (address, header);
1152
  WifiRemoteStation *station = Lookup (address, header);
1153
  bool normally = station->m_ssrc < m_maxSsrc;
1153
  bool longMpdu = (packet->GetSize () + header->GetSize () + WIFI_MAC_FCS_LENGTH) > m_rtsCtsThreshold;
1154
  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedDataRetransmission count: " << station->m_ssrc << " result: " << std::boolalpha << normally);
1154
  uint32_t retryCount, maxRetryCount;
1155
  return DoNeedRtsRetransmission (station, packet, normally);
1155
  if (longMpdu)
1156
}
1156
    {
1157
1157
      retryCount = station->m_slrc;
1158
bool
1158
      maxRetryCount = m_maxSlrc;
1159
WifiRemoteStationManager::NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header,
1159
    }
1160
                                                  Ptr<const Packet> packet)
1160
  else
1161
{
1161
    {
1162
  NS_LOG_FUNCTION (this << address << packet << *header);
1162
      retryCount = station->m_ssrc;
1163
  NS_ASSERT (!address.IsGroup ());
1163
      maxRetryCount = m_maxSsrc;
1164
  WifiRemoteStation *station = Lookup (address, header);
1164
    }
1165
  bool normally = station->m_slrc < m_maxSlrc;
1165
  bool normally = retryCount < maxRetryCount;
1166
  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedDataRetransmission count: " << station->m_slrc << " result: " << std::boolalpha << normally);
1166
  NS_LOG_DEBUG ("WifiRemoteStationManager::NeedRetransmission count: " << retryCount << " result: " << std::boolalpha << normally);
1167
  return DoNeedDataRetransmission (station, packet, normally);
1167
  return DoNeedRetransmission (station, packet, normally);
1168
}
1168
}
1169
1169
1170
bool
1170
bool
 Lines 1979-1993    Link Here 
1979
}
1979
}
1980
1980
1981
bool
1981
bool
1982
WifiRemoteStationManager::DoNeedRtsRetransmission (WifiRemoteStation *station,
1982
WifiRemoteStationManager::DoNeedRetransmission (WifiRemoteStation *station,
1983
                                                   Ptr<const Packet> packet, bool normally)
1983
                                                Ptr<const Packet> packet, bool normally)
1984
{
1985
  return normally;
1986
}
1987
1988
bool
1989
WifiRemoteStationManager::DoNeedDataRetransmission (WifiRemoteStation *station,
1990
                                                    Ptr<const Packet> packet, bool normally)
1991
{
1984
{
1992
  return normally;
1985
  return normally;
1993
}
1986
}
(-)a/src/wifi/model/wifi-remote-station-manager.h (-31 / +7 lines)
 Lines 688-694    Link Here 
688
                     double ackSnr, WifiMode ackMode, double dataSnr);
688
                     double ackSnr, WifiMode ackMode, double dataSnr);
689
  /**
689
  /**
690
   * Should be invoked after calling ReportRtsFailed if
690
   * Should be invoked after calling ReportRtsFailed if
691
   * NeedRtsRetransmission returns false
691
   * NeedRetransmission returns false
692
   *
692
   *
693
   * \param address the address of the receiver
693
   * \param address the address of the receiver
694
   * \param header MAC header of the DATA packet
694
   * \param header MAC header of the DATA packet
 Lines 696-702    Link Here 
696
  void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header);
696
  void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header);
697
  /**
697
  /**
698
   * Should be invoked after calling ReportDataFailed if
698
   * Should be invoked after calling ReportDataFailed if
699
   * NeedDataRetransmission returns false
699
   * NeedRetransmission returns false
700
   *
700
   *
701
   * \param address the address of the receiver
701
   * \param address the address of the receiver
702
   * \param header MAC header of the DATA packet
702
   * \param header MAC header of the DATA packet
 Lines 753-773    Link Here 
753
   * \param header MAC header
753
   * \param header MAC header
754
   * \param packet the packet to send
754
   * \param packet the packet to send
755
   *
755
   *
756
   * \return true if we want to restart a failed RTS/CTS handshake,
757
   *         false otherwise.
758
   */
759
  bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header,
760
                              Ptr<const Packet> packet);
761
  /**
762
   * \param address remote address
763
   * \param header MAC header
764
   * \param packet the packet to send
765
   *
766
   * \return true if we want to resend a packet after a failed transmission attempt,
756
   * \return true if we want to resend a packet after a failed transmission attempt,
767
   *         false otherwise.
757
   *         false otherwise.
768
   */
758
   */
769
  bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header,
759
  bool NeedRetransmission (Mac48Address address, const WifiMacHeader *header,
770
                               Ptr<const Packet> packet);
760
                           Ptr<const Packet> packet);
771
  /**
761
  /**
772
   * \param address remote address
762
   * \param address remote address
773
   * \param header MAC header
763
   * \param header MAC header
 Lines 1083-1111    Link Here 
1083
  /**
1073
  /**
1084
   * \param station the station that we need to communicate
1074
   * \param station the station that we need to communicate
1085
   * \param packet the packet to send
1075
   * \param packet the packet to send
1086
   * \param normally indicates whether the normal 802.11 rts enable mechanism would
1087
   *        request that the rts is retransmitted or not.
1088
   *
1089
   * \return true if we want to restart a failed RTS/CTS handshake,
1090
   *         false otherwise.
1091
   *
1092
   * Note: This method is called after an rts/cts handshake has been attempted
1093
   *       and has failed.
1094
   */
1095
  virtual bool DoNeedRtsRetransmission (WifiRemoteStation *station,
1096
                                        Ptr<const Packet> packet, bool normally);
1097
  /**
1098
   * \param station the station that we need to communicate
1099
   * \param packet the packet to send
1100
   * \param normally indicates whether the normal 802.11 data retransmission mechanism
1076
   * \param normally indicates whether the normal 802.11 data retransmission mechanism
1101
   *        would request that the data is retransmitted or not.
1077
   *        would request that the data is retransmitted or not.
1102
   * \return true if we want to resend a packet after a failed transmission attempt,
1078
   * \return true if we want to resend a packet after a failed transmission attempt,
1103
   *         false otherwise.
1079
   *         false otherwise.
1104
   *
1080
   *
1105
   * Note: This method is called after a unicast packet transmission has been attempted
1081
   * Note: This method is called after any unicast packet transmission (control, management,
1106
   *       and has failed.
1082
   *       or data) has been attempted and has failed.
1107
   */
1083
   */
1108
  virtual bool DoNeedDataRetransmission (WifiRemoteStation *station,
1084
  virtual bool DoNeedRetransmission (WifiRemoteStation *station,
1109
                                         Ptr<const Packet> packet, bool normally);
1085
                                         Ptr<const Packet> packet, bool normally);
1110
  /**
1086
  /**
1111
   * \param station the station that we need to communicate
1087
   * \param station the station that we need to communicate

Return to bug 2926