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

(-)a/src/wifi/model/dca-txop.cc (+1 lines)
 Lines 445-450    Link Here 
445
      NS_ASSERT (m_currentPacket != 0);
445
      NS_ASSERT (m_currentPacket != 0);
446
      uint16_t sequence = m_txMiddle->GetNextSequenceNumberfor (&m_currentHdr);
446
      uint16_t sequence = m_txMiddle->GetNextSequenceNumberfor (&m_currentHdr);
447
      m_currentHdr.SetSequenceNumber (sequence);
447
      m_currentHdr.SetSequenceNumber (sequence);
448
      m_stationManager->UpdateFragmentationThreshold ();
448
      m_currentHdr.SetFragmentNumber (0);
449
      m_currentHdr.SetFragmentNumber (0);
449
      m_currentHdr.SetNoMoreFragments ();
450
      m_currentHdr.SetNoMoreFragments ();
450
      m_currentHdr.SetNoRetry ();
451
      m_currentHdr.SetNoRetry ();
(-)a/src/wifi/model/edca-txop-n.cc (+1 lines)
 Lines 506-511    Link Here 
506
506
507
          uint16_t sequence = m_txMiddle->GetNextSequenceNumberfor (&m_currentHdr);
507
          uint16_t sequence = m_txMiddle->GetNextSequenceNumberfor (&m_currentHdr);
508
          m_currentHdr.SetSequenceNumber (sequence);
508
          m_currentHdr.SetSequenceNumber (sequence);
509
          m_stationManager->UpdateFragmentationThreshold ();
509
          m_currentHdr.SetFragmentNumber (0);
510
          m_currentHdr.SetFragmentNumber (0);
510
          m_currentHdr.SetNoMoreFragments ();
511
          m_currentHdr.SetNoMoreFragments ();
511
          m_currentHdr.SetNoRetry ();
512
          m_currentHdr.SetNoRetry ();
(-)a/src/wifi/model/wifi-remote-station-manager.cc (-3 / +9 lines)
 Lines 861-867    Link Here 
861
       * ASN.1 encoding of the MAC and PHY MIB (256 ... 8000)
861
       * ASN.1 encoding of the MAC and PHY MIB (256 ... 8000)
862
       */
862
       */
863
      NS_LOG_WARN ("Fragmentation threshold should be larger than 256. Setting to 256.");
863
      NS_LOG_WARN ("Fragmentation threshold should be larger than 256. Setting to 256.");
864
      m_fragmentationThreshold = 256;
864
      m_nextFragmentationThreshold = 256;
865
    }
865
    }
866
  else
866
  else
867
    {
867
    {
 Lines 872-886    Link Here 
872
      if (threshold % 2 != 0)
872
      if (threshold % 2 != 0)
873
        {
873
        {
874
          NS_LOG_WARN ("Fragmentation threshold should be an even number. Setting to " << threshold - 1);
874
          NS_LOG_WARN ("Fragmentation threshold should be an even number. Setting to " << threshold - 1);
875
          m_fragmentationThreshold = threshold - 1;
875
          m_nextFragmentationThreshold = threshold - 1;
876
        }
876
        }
877
      else
877
      else
878
        {
878
        {
879
          m_fragmentationThreshold = threshold;
879
          m_nextFragmentationThreshold = threshold;
880
        }
880
        }
881
    }
881
    }
882
}
882
}
883
883
884
void
885
WifiRemoteStationManager::UpdateFragmentationThreshold (void)
886
{
887
  m_fragmentationThreshold = m_nextFragmentationThreshold;
888
}
889
884
uint32_t
890
uint32_t
885
WifiRemoteStationManager::DoGetFragmentationThreshold (void) const
891
WifiRemoteStationManager::DoGetFragmentationThreshold (void) const
886
{
892
{
(-)a/src/wifi/model/wifi-remote-station-manager.h (-1 / +7 lines)
 Lines 157-162    Link Here 
157
   */
157
   */
158
  void SetFragmentationThreshold (uint32_t threshold);
158
  void SetFragmentationThreshold (uint32_t threshold);
159
  /**
159
  /**
160
   * Typically called to update the fragmentation threshold at the start of a new transmission.
161
   * This avoid that the fragmentation threshold gets changed during a transmission (see bug 730).
162
   */
163
  void UpdateFragmentationThreshold (void);
164
  /**
160
   * Records HT capabilities of the remote station.
165
   * Records HT capabilities of the remote station.
161
   *
166
   *
162
   * \param from the address of the station being recorded
167
   * \param from the address of the station being recorded
 Lines 990-996    Link Here 
990
  uint32_t m_maxSsrc;  //!< Maximum STA short retry count (SSRC)
995
  uint32_t m_maxSsrc;  //!< Maximum STA short retry count (SSRC)
991
  uint32_t m_maxSlrc;  //!< Maximum STA long retry count (SLRC)
996
  uint32_t m_maxSlrc;  //!< Maximum STA long retry count (SLRC)
992
  uint32_t m_rtsCtsThreshold;  //!< Threshold for RTS/CTS
997
  uint32_t m_rtsCtsThreshold;  //!< Threshold for RTS/CTS
993
  uint32_t m_fragmentationThreshold;  //!< Threshold for fragmentation
998
  uint32_t m_fragmentationThreshold;  //!< Current threshold for fragmentation
999
  uint32_t m_nextFragmentationThreshold;  //!< Threshold for fragmentation that will be used for the next transmission
994
  uint8_t m_defaultTxPowerLevel;  //!< Default tranmission power level
1000
  uint8_t m_defaultTxPowerLevel;  //!< Default tranmission power level
995
  WifiMode m_nonUnicastMode;  //!< Transmission mode for non-unicast DATA frames
1001
  WifiMode m_nonUnicastMode;  //!< Transmission mode for non-unicast DATA frames
996
1002

Return to bug 730