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

(-)a/src/wifi/model/wifi-remote-station-manager.cc (-3 / +3 lines)
 Lines 516-527    Link Here 
516
    }
516
    }
517
  if (fragmentNumber == nFragment - 1)
517
  if (fragmentNumber == nFragment - 1)
518
    {
518
    {
519
      uint32_t lastFragmentSize = packet->GetSize () % GetFragmentationThreshold ();
519
      uint32_t lastFragmentSize = packet->GetSize () % (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH);
520
      return lastFragmentSize;
520
      return lastFragmentSize;
521
    }
521
    }
522
  else
522
  else
523
    {
523
    {
524
      return GetFragmentationThreshold ();
524
      return GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH;
525
    }
525
    }
526
}
526
}
527
uint32_t
527
uint32_t
 Lines 530-536    Link Here 
530
{
530
{
531
  NS_ASSERT (!address.IsGroup ());
531
  NS_ASSERT (!address.IsGroup ());
532
  NS_ASSERT (fragmentNumber < GetNFragments (packet));
532
  NS_ASSERT (fragmentNumber < GetNFragments (packet));
533
  uint32_t fragmentOffset = fragmentNumber * GetFragmentationThreshold ();
533
  uint32_t fragmentOffset = fragmentNumber * (GetFragmentationThreshold () - header->GetSize () - WIFI_MAC_FCS_LENGTH);
534
  return fragmentOffset;
534
  return fragmentOffset;
535
}
535
}
536
bool
536
bool

Return to bug 1524