--- orig/ns-3.14.1/src/wifi/model/wifi-remote-station-manager.h 2012-06-07 01:09:45.000000000 -0400 +++ mod/ns-3.14.1/src/wifi/model/wifi-remote-station-manager.h 2012-06-22 10:22:54.666363010 -0400 @@ -96,7 +96,8 @@ void SetMaxSlrc (uint32_t maxSlrc); void SetRtsCtsThreshold (uint32_t threshold); void SetFragmentationThreshold (uint32_t threshold); - + void UpdateFragmentationThreshold(void); + // Invoked in a STA upon dis-association // or in an AP upon reboot void Reset (void); @@ -426,6 +427,7 @@ uint32_t m_maxSlrc; uint32_t m_rtsCtsThreshold; uint32_t m_fragmentationThreshold; + uint32_t m_nextFragmentationThreshold; WifiMode m_nonUnicastMode; double m_avgSlrcCoefficient; /** --- orig/ns-3.14.1/src/wifi/model/wifi-remote-station-manager.cc 2012-06-07 01:09:45.000000000 -0400 +++ mod/ns-3.14.1/src/wifi/model/wifi-remote-station-manager.cc 2012-06-22 10:28:01.186368765 -0400 @@ -165,7 +165,8 @@ "than this value, as per IEEE Std. 802.11-2007, Section 9.4. " "This value will not have any effect on some rate control algorithms.", UintegerValue (2346), - MakeUintegerAccessor (&WifiRemoteStationManager::m_fragmentationThreshold), + MakeUintegerAccessor (&WifiRemoteStationManager::SetFragmentationThreshold, + &WifiRemoteStationManager::GetFragmentationThreshold), MakeUintegerChecker ()) .AddAttribute ("NonUnicastMode", "Wifi mode used for non-unicast transmissions.", WifiModeValue (), @@ -259,7 +260,13 @@ void WifiRemoteStationManager::SetFragmentationThreshold (uint32_t threshold) { - m_fragmentationThreshold = threshold; + m_nextFragmentationThreshold = threshold; +} + +void +WifiRemoteStationManager::UpdateFragmentationThreshold (void) +{ + m_fragmentationThreshold = m_nextFragmentationThreshold; } void --- orig/ns-3.14.1/src/wifi/model/dca-txop.cc 2012-06-07 01:09:45.000000000 -0400 +++ mod/ns-3.14.1/src/wifi/model/dca-txop.cc 2012-06-22 10:32:19.914373622 -0400 @@ -380,6 +380,7 @@ NS_ASSERT (m_currentPacket != 0); uint16_t sequence = m_txMiddle->GetNextSequenceNumberfor (&m_currentHdr); m_currentHdr.SetSequenceNumber (sequence); + m_stationManager->UpdateFragmentationThreshold(); m_currentHdr.SetFragmentNumber (0); m_currentHdr.SetNoMoreFragments (); m_currentHdr.SetNoRetry ();