Skip to content

Commit cd6e071

Browse files
committed
wifi: Fix aPSDUMaxLength for 802.11be
Issue reported by Sharan Naribole
1 parent 1c2ba4f commit cd6e071

File tree

10 files changed

+31
-6
lines changed

10 files changed

+31
-6
lines changed

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ been tested on Linux. As of this release, the latest known version to work with
3838

3939
### Bugs fixed
4040

41+
- (wifi) Fix incorrect aPSDUMaxLength value for 802.11be.
42+
4143
## Release 3.46.1
4244

4345
ns-3.46.1 is a small update to ns-3.46 to fix build issues discovered after release.

src/wifi/model/eht/eht-phy.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,12 @@ EhtPhy::CalculateNonHtReferenceRate(WifiCodeRate codeRate, uint16_t constellatio
428428
return dataRate;
429429
}
430430

431+
uint32_t
432+
EhtPhy::GetMaxPsduSize() const
433+
{
434+
return WIFI_PSDU_MAX_LENGTH_EHT;
435+
}
436+
431437
dBm_u
432438
EhtPhy::Per20MHzCcaThreshold(const Ptr<const WifiPpdu> ppdu) const
433439
{

src/wifi/model/eht/eht-phy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ class EhtPhy : public HePhy
252252
WifiPpduField field) override;
253253
WifiPhyRxfailureReason GetFailureReason(WifiPpduField field) const override;
254254
uint32_t GetSigBSize(const WifiTxVector& txVector) const override;
255+
uint32_t GetMaxPsduSize() const override;
255256
dBm_u GetCcaThreshold(const Ptr<const WifiPpdu> ppdu,
256257
WifiChannelListType channelType) const override;
257258
const std::map<MHz_u, WifiChannelListType>& GetCcaSecondaryChannels() const override;

src/wifi/model/he/he-phy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ HePhy::GetWifiConstPsduMap(Ptr<const WifiPsdu> psdu, const WifiTxVector& txVecto
17791779
uint32_t
17801780
HePhy::GetMaxPsduSize() const
17811781
{
1782-
return 6500631;
1782+
return WIFI_PSDU_MAX_LENGTH_HE;
17831783
}
17841784

17851785
bool

src/wifi/model/ht/ht-phy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ HtPhy::IsAllowed(const WifiTxVector& /*txVector*/)
816816
uint32_t
817817
HtPhy::GetMaxPsduSize() const
818818
{
819-
return 65535;
819+
return WIFI_PSDU_MAX_LENGTH_HT;
820820
}
821821

822822
const std::map<MHz_u, WifiChannelListType>&

src/wifi/model/non-ht/dsss-phy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ DsssPhy::IsAllowed(const WifiTxVector& /*txVector*/)
387387
uint32_t
388388
DsssPhy::GetMaxPsduSize() const
389389
{
390-
return 4095;
390+
return WIFI_PSDU_MAX_LENGTH;
391391
}
392392

393393
} // namespace ns3

src/wifi/model/non-ht/erp-ofdm-phy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ ErpOfdmPhy::IsAllowed(const WifiTxVector& /*txVector*/)
234234
uint32_t
235235
ErpOfdmPhy::GetMaxPsduSize() const
236236
{
237-
return 4095;
237+
return WIFI_PSDU_MAX_LENGTH;
238238
}
239239

240240
} // namespace ns3

src/wifi/model/non-ht/ofdm-phy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ OfdmPhy::IsAllowed(const WifiTxVector& /*txVector*/)
650650
uint32_t
651651
OfdmPhy::GetMaxPsduSize() const
652652
{
653-
return 4095;
653+
return WIFI_PSDU_MAX_LENGTH;
654654
}
655655

656656
MHz_u

src/wifi/model/vht/vht-phy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ VhtPhy::IsCombinationAllowed(uint8_t mcsValue, MHz_u channelWidth, uint8_t nss)
520520
uint32_t
521521
VhtPhy::GetMaxPsduSize() const
522522
{
523-
return 4692480;
523+
return WIFI_PSDU_MAX_LENGTH_VHT;
524524
}
525525

526526
dBm_u

src/wifi/model/wifi-standard-constants.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,22 @@ static constexpr uint16_t MAX_MSDU_SIZE{2304};
8787
/// The length in octets of the IEEE 802.11 MAC FCS field
8888
static constexpr uint16_t WIFI_MAC_FCS_LENGTH{4};
8989

90+
/// The value for aPSDUMaxLength in Table 15-5 (DSSS PHY characteristics), Table 17-21 (OFDM PHY
91+
/// characteristics) and Table 18-5 (ERP characteristics) of 802.11-2020
92+
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH{4095};
93+
94+
/// The value for aPSDUMaxLength in Table 19-25 (HT PHY characteristics) of 802.11-2020
95+
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_HT{65'535};
96+
97+
/// The value for aPSDUMaxLength in Table 21-28 (VHT PHY characteristics) of 802.11-2020
98+
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_VHT{4'692'480};
99+
100+
/// The value for aPSDUMaxLength in Table 27-54 (HE PHY characteristics) of 802.11ax-2021
101+
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_HE{6'500'631};
102+
103+
/// The value for aPSDUMaxLength in Table 36-70 (EHT PHY characteristics) of 802.11be D7.0
104+
static constexpr uint32_t WIFI_PSDU_MAX_LENGTH_EHT{15'523'200};
105+
90106
/// The minimum value for dot11RTSThreshold (C.3 MIB detail in IEEE Std 802.11-2020)
91107
static constexpr uint32_t WIFI_MIN_RTS_THRESHOLD{0};
92108

0 commit comments

Comments
 (0)