A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
he-ppdu.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Orange Labs
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Rediet <getachew.redieteab@orange.com>
7 * Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
8 * Sébastien Deronne <sebastien.deronne@gmail.com> (HeSigHeader)
9 */
10
11#include "he-ppdu.h"
12
13#include "he-phy.h"
14
15#include "ns3/log.h"
16#include "ns3/wifi-phy-operating-channel.h"
17#include "ns3/wifi-phy.h"
18#include "ns3/wifi-psdu.h"
19#include "ns3/wifi-utils.h"
20
21#include <algorithm>
22#include <numeric>
23
24namespace ns3
25{
26
28
29std::ostream&
30operator<<(std::ostream& os, const HePpdu::TxPsdFlag& flag)
31{
32 switch (flag)
33 {
35 return (os << "PSD_NON_HE_PORTION");
37 return (os << "PSD_HE_PORTION");
38 default:
39 NS_FATAL_ERROR("Invalid PSD flag");
40 return (os << "INVALID");
41 }
42}
43
45 const WifiTxVector& txVector,
46 const WifiPhyOperatingChannel& channel,
47 Time ppduDuration,
48 uint64_t uid,
49 TxPsdFlag flag)
50 : OfdmPpdu(psdus.begin()->second,
51 txVector,
52 channel,
53 uid,
54 false), // don't instantiate LSigHeader of OfdmPpdu
55 m_txPsdFlag(flag)
56{
57 NS_LOG_FUNCTION(this << psdus << txVector << channel << ppduDuration << uid << flag);
58
59 // overwrite with map (since only first element used by OfdmPpdu)
60 m_psdus.begin()->second = nullptr;
61 m_psdus.clear();
62 m_psdus = psdus;
63 SetPhyHeaders(txVector, ppduDuration);
64}
65
67 const WifiTxVector& txVector,
68 const WifiPhyOperatingChannel& channel,
69 Time ppduDuration,
70 uint64_t uid)
71 : OfdmPpdu(psdu,
72 txVector,
73 channel,
74 uid,
75 false), // don't instantiate LSigHeader of OfdmPpdu
76 m_txPsdFlag(PSD_NON_HE_PORTION)
77{
78 NS_LOG_FUNCTION(this << psdu << txVector << channel << ppduDuration << uid);
79 NS_ASSERT(!IsMu());
80 SetPhyHeaders(txVector, ppduDuration);
81}
82
83void
84HePpdu::SetPhyHeaders(const WifiTxVector& txVector, Time ppduDuration)
85{
86 NS_LOG_FUNCTION(this << txVector << ppduDuration);
87 SetLSigHeader(ppduDuration);
88 SetHeSigHeader(txVector);
89}
90
91void
93{
94 uint8_t sigExtension = 0;
97 {
98 sigExtension = 6;
99 }
100 uint8_t m = IsDlMu() ? 1 : 2;
101 uint16_t length = ((ceil((static_cast<double>(ppduDuration.GetNanoSeconds() - (20 * 1000) -
102 (sigExtension * 1000)) /
103 1000) /
104 4.0) *
105 3) -
106 3 - m);
107 m_lSig.SetLength(length);
108}
109
110void
112{
113 const auto bssColor = txVector.GetBssColor();
114 NS_ASSERT(bssColor < 64);
116 {
118 .m_bssColor = bssColor,
119 .m_bandwidth = GetChannelWidthEncodingFromMhz(txVector.GetChannelWidth())});
120 }
121 else if (ns3::IsDlMu(m_preamble))
122 {
123 const auto p20Index = m_operatingChannel.GetPrimaryChannelIndex(MHz_u{20});
124 const uint8_t noMuMimoUsers{0};
126 .m_bssColor = bssColor,
127 .m_bandwidth = GetChannelWidthEncodingFromMhz(txVector.GetChannelWidth()),
128 .m_sigBMcs = txVector.GetSigBMode().GetMcsValue(),
129 .m_muMimoUsers = (txVector.IsSigBCompression()
130 ? GetMuMimoUsersEncoding(txVector.GetHeMuUserInfoMap().size())
131 : noMuMimoUsers),
132 .m_sigBCompression = txVector.IsSigBCompression(),
133 .m_giLtfSize = GetGuardIntervalAndNltfEncoding(txVector.GetGuardInterval(),
134 2 /*NLTF currently unused*/),
135 .m_ruAllocation = txVector.GetRuAllocation(p20Index),
136 .m_contentChannels = GetHeSigBContentChannels(txVector, p20Index),
137 .m_center26ToneRuIndication =
138 (txVector.GetChannelWidth() >= MHz_u{80})
139 ? std::optional{txVector.GetCenter26ToneRuIndication()}
140 : std::nullopt});
141 }
142 else
143 {
144 const auto mcs = txVector.GetMode().GetMcsValue();
145 NS_ASSERT(mcs <= 11);
147 .m_bssColor = bssColor,
148 .m_mcs = mcs,
149 .m_bandwidth = GetChannelWidthEncodingFromMhz(txVector.GetChannelWidth()),
150 .m_giLtfSize = GetGuardIntervalAndNltfEncoding(txVector.GetGuardInterval(),
151 2 /*NLTF currently unused*/),
152 .m_nsts = GetNstsEncodingFromNss(txVector.GetNss())});
153 }
154}
155
158{
159 WifiTxVector txVector;
160 txVector.SetPreambleType(m_preamble);
162 return txVector;
163}
164
165void
167{
168 txVector.SetLength(m_lSig.GetLength());
169 txVector.SetAggregation(m_psdus.size() > 1 || m_psdus.begin()->second->IsAggregate());
170 if (!IsMu())
171 {
172 auto heSigHeader = std::get_if<HeSuSigHeader>(&m_heSig);
173 NS_ASSERT(heSigHeader && (heSigHeader->m_format == 1));
174 txVector.SetMode(HePhy::GetHeMcs(heSigHeader->m_mcs));
175 txVector.SetNss(GetNssFromNstsEncoding(heSigHeader->m_nsts));
176 txVector.SetChannelWidth(GetChannelWidthMhzFromEncoding(heSigHeader->m_bandwidth));
177 txVector.SetGuardInterval(GetGuardIntervalFromEncoding(heSigHeader->m_giLtfSize));
178 txVector.SetBssColor(heSigHeader->m_bssColor);
179 }
180 else if (IsUlMu())
181 {
182 auto heSigHeader = std::get_if<HeTbSigHeader>(&m_heSig);
183 NS_ASSERT(heSigHeader && (heSigHeader->m_format == 0));
184 txVector.SetChannelWidth(GetChannelWidthMhzFromEncoding(heSigHeader->m_bandwidth));
185 txVector.SetBssColor(heSigHeader->m_bssColor);
186 }
187 else if (IsDlMu())
188 {
189 auto heSigHeader = std::get_if<HeMuSigHeader>(&m_heSig);
190 NS_ASSERT(heSigHeader);
191 txVector.SetChannelWidth(GetChannelWidthMhzFromEncoding(heSigHeader->m_bandwidth));
192 txVector.SetGuardInterval(GetGuardIntervalFromEncoding(heSigHeader->m_giLtfSize));
193 txVector.SetBssColor(heSigHeader->m_bssColor);
194 SetHeMuUserInfos(txVector,
195 heSigHeader->m_ruAllocation,
196 heSigHeader->m_center26ToneRuIndication,
197 heSigHeader->m_contentChannels,
198 heSigHeader->m_sigBCompression,
199 GetMuMimoUsersFromEncoding(heSigHeader->m_muMimoUsers));
200 txVector.SetSigBMode(HePhy::GetVhtMcs(heSigHeader->m_sigBMcs));
201 const auto p20Index = m_operatingChannel.GetPrimaryChannelIndex(MHz_u{20});
202 txVector.SetRuAllocation(heSigHeader->m_ruAllocation, p20Index);
203 if (heSigHeader->m_center26ToneRuIndication.has_value())
204 {
205 txVector.SetCenter26ToneRuIndication(heSigHeader->m_center26ToneRuIndication.value());
206 }
207 if (heSigHeader->m_sigBCompression)
208 {
209 NS_ASSERT(GetMuMimoUsersFromEncoding(heSigHeader->m_muMimoUsers) ==
210 txVector.GetHeMuUserInfoMap().size());
211 }
212 }
213}
214
216HePpdu::GetRuSpec(std::size_t ruAllocIndex,
217 const std::vector<WifiRu::RuSpec>& ruSpecs,
218 RuType ruType,
219 std::size_t ruIndex,
220 MHz_u bw) const
221{
222 const auto ruBw = WifiRu::GetBandwidth(ruType);
223 const uint8_t num20MhzSubchannelsInRu = (ruBw < MHz_u{20}) ? 1 : Count20MHzSubchannels(ruBw);
224 const std::size_t numRus = (ruBw > MHz_u{20}) ? 1 : HeRu::GetNRus(MHz_u{20}, ruType);
225 const std::size_t ruIndexOffset =
226 (ruBw < MHz_u{20}) ? (numRus * ruAllocIndex) : (ruAllocIndex / num20MhzSubchannelsInRu);
227 std::size_t index = WifiRu::GetIndex(ruSpecs.at(ruIndex)) + ruIndexOffset;
228 auto isPrimary80 = true;
229 if (bw > MHz_u{80})
230 {
231 const auto isLow80 = ruAllocIndex < 4;
232 const auto p20Index = m_operatingChannel.GetPrimaryChannelIndex(MHz_u{20});
233 const auto primary80IsLower80 = (p20Index < bw / MHz_u{40});
234 if (!isLow80)
235 {
236 const auto numRusP80 = HeRu::GetRusOfType(MHz_u{80}, ruType).size();
237 index -= (ruType == RuType::RU_26_TONE) ? (numRusP80 - 1) : numRusP80;
238 }
239 isPrimary80 = ((primary80IsLower80 && isLow80) || (!primary80IsLower80 && !isLow80));
240 }
241 if ((ruType == RuType::RU_26_TONE) && (ruAllocIndex >= 2) && (index >= 19))
242 {
243 index++;
244 }
245 return HeRu::RuSpec{ruType, index, isPrimary80};
246}
247
248void
250 const RuAllocation& ruAllocation,
251 std::optional<Center26ToneRuIndication> center26ToneRuIndication,
252 const HeSigBContentChannels& contentChannels,
253 bool sigBcompression,
254 uint8_t numMuMimoUsers) const
255{
256 NS_ASSERT(ruAllocation.size() == Count20MHzSubchannels(txVector.GetChannelWidth()));
257 std::vector<uint8_t> remainingRuAllocIndices(ruAllocation.size());
258 std::iota(remainingRuAllocIndices.begin(), remainingRuAllocIndices.end(), 0);
259 std::size_t contentChannelIndex = 0;
260 std::size_t ruAllocIndex = 0;
261 for (const auto& contentChannel : contentChannels)
262 {
263 std::size_t numRusLeft = 0;
264 std::size_t numUsersLeft = 0;
265 ruAllocIndex = remainingRuAllocIndices.front();
266 std::size_t numUsersLeftInCc = contentChannel.size();
267 if (contentChannel.empty())
268 {
269 const auto pos = std::find(remainingRuAllocIndices.cbegin(),
270 remainingRuAllocIndices.cend(),
271 ruAllocIndex);
272 remainingRuAllocIndices.erase(pos);
273 ++contentChannelIndex;
274 continue;
275 }
276 for (const auto& userInfo : contentChannel)
277 {
278 if (center26ToneRuIndication && (numUsersLeftInCc == 1))
279 {
280 // handle central 26 tones
281 if ((contentChannelIndex == 0) &&
282 ((*center26ToneRuIndication ==
284 (*center26ToneRuIndication ==
286 {
287 txVector.SetHeMuUserInfo(
288 userInfo.staId,
289 {HeRu::RuSpec{RuType::RU_26_TONE, 19, true}, userInfo.mcs, userInfo.nss});
290 continue;
291 }
292 else if ((contentChannelIndex == 1) &&
293 ((*center26ToneRuIndication ==
295 (*center26ToneRuIndication ==
298 {
299 txVector.SetHeMuUserInfo(
300 userInfo.staId,
301 {HeRu::RuSpec{RuType::RU_26_TONE, 19, false}, userInfo.mcs, userInfo.nss});
302 continue;
303 }
304 }
305 NS_ASSERT(ruAllocIndex < ruAllocation.size());
306 const auto mc{WIFI_MOD_CLASS_HE};
307 auto ruSpecs = WifiRu::GetRuSpecs(ruAllocation.at(ruAllocIndex), mc);
308 while (ruSpecs.empty() && (ruAllocIndex < ruAllocation.size()))
309 {
310 const auto pos = std::find(remainingRuAllocIndices.cbegin(),
311 remainingRuAllocIndices.cend(),
312 ruAllocIndex);
313 remainingRuAllocIndices.erase(pos);
314 ruAllocIndex += 2;
315 NS_ASSERT(ruAllocIndex < ruAllocation.size());
316 ruSpecs = WifiRu::GetRuSpecs(ruAllocation.at(ruAllocIndex), mc);
317 }
318 if (numRusLeft == 0)
319 {
320 numRusLeft = ruSpecs.size();
321 }
322 if (numUsersLeft == 0)
323 {
324 if (sigBcompression)
325 {
326 numUsersLeft = numMuMimoUsers;
327 }
328 else
329 {
330 // not MU-MIMO
331 numUsersLeft = 1;
332 }
333 }
334 auto ruIndex = (ruSpecs.size() - numRusLeft);
335 const auto ruSpec = ruSpecs.at(ruIndex);
336 auto ruType = WifiRu::GetRuType(ruSpec);
337 if (sigBcompression)
338 {
339 ruType = WifiRu::GetRuType(ruAllocation.size() * MHz_u{20});
340 }
341 if (userInfo.staId != NO_USER_STA_ID)
342 {
343 const auto ru{
344 GetRuSpec(ruAllocIndex, ruSpecs, ruType, ruIndex, txVector.GetChannelWidth())};
345 txVector.SetHeMuUserInfo(userInfo.staId, {ru, userInfo.mcs, userInfo.nss});
346 }
347 numRusLeft--;
348 numUsersLeft--;
349 numUsersLeftInCc--;
350 if (numRusLeft == 0 && numUsersLeft == 0)
351 {
352 const auto ruBw = WifiRu::GetBandwidth(ruType);
353 const uint8_t num20MhzSubchannelsInRu =
354 (ruBw < MHz_u{20}) ? 1 : Count20MHzSubchannels(ruBw);
355 const auto pos = std::find(remainingRuAllocIndices.cbegin(),
356 remainingRuAllocIndices.cend(),
357 ruAllocIndex);
358 remainingRuAllocIndices.erase(pos);
359 ruAllocIndex += num20MhzSubchannelsInRu;
360 if (ruAllocIndex % 2 != contentChannelIndex)
361 {
362 ++ruAllocIndex;
363 }
364 }
365 }
366 contentChannelIndex++;
367 }
368}
369
370Time
371HePpdu::GetTxDuration() const
372{
373 Time ppduDuration;
374 const auto& txVector = GetTxVector();
375 const auto length = m_lSig.GetLength();
376 const auto tSymbol = HePhy::GetSymbolDuration(txVector.GetGuardInterval());
377 const auto preambleDuration = WifiPhy::CalculatePhyPreambleAndHeaderDuration(txVector);
378 NS_ASSERT(m_operatingChannel.IsSet());
379 uint8_t sigExtension = (m_operatingChannel.GetPhyBand() == WIFI_PHY_BAND_2_4GHZ) ? 6 : 0;
380 uint8_t m = IsDlMu() ? 1 : 2;
381 // Equation 27-11 of IEEE P802.11ax/D4.0
382 const auto calculatedDuration =
383 MicroSeconds(((ceil(static_cast<double>(length + 3 + m) / 3)) * 4) + 20 + sigExtension);
384 NS_ASSERT(calculatedDuration > preambleDuration);
385 uint32_t nSymbols =
386 floor(static_cast<double>((calculatedDuration - preambleDuration).GetNanoSeconds() -
387 (sigExtension * 1000)) /
388 tSymbol.GetNanoSeconds());
389 return (preambleDuration + (nSymbols * tSymbol) + MicroSeconds(sigExtension));
390}
391
393HePpdu::Copy() const
394{
395 return Ptr<WifiPpdu>(new HePpdu(*this), false);
396}
397
399HePpdu::GetType() const
400{
401 switch (m_preamble)
402 {
407 default:
408 return WIFI_PPDU_TYPE_SU;
409 }
410}
411
412bool
413HePpdu::IsMu() const
414{
415 return (IsDlMu() || IsUlMu());
416}
417
418bool
419HePpdu::IsDlMu() const
420{
421 return (m_preamble == WIFI_PREAMBLE_HE_MU);
422}
423
424bool
425HePpdu::IsUlMu() const
426{
427 return (m_preamble == WIFI_PREAMBLE_HE_TB);
428}
429
431HePpdu::GetPsdu(uint8_t bssColor, uint16_t staId /* = SU_STA_ID */) const
432{
433 if (!IsMu())
434 {
435 NS_ASSERT(m_psdus.size() == 1);
436 return m_psdus.at(SU_STA_ID);
437 }
438
439 if (IsUlMu())
440 {
441 auto heSigHeader = std::get_if<HeTbSigHeader>(&m_heSig);
442 NS_ASSERT(heSigHeader);
443 NS_ASSERT(m_psdus.size() == 1);
444 if ((bssColor == 0) || (heSigHeader->m_bssColor == 0) ||
445 (bssColor == heSigHeader->m_bssColor))
446 {
447 return m_psdus.cbegin()->second;
448 }
449 }
450 else
451 {
452 auto heSigHeader = std::get_if<HeMuSigHeader>(&m_heSig);
453 NS_ASSERT(heSigHeader);
454 if ((bssColor == 0) || (heSigHeader->m_bssColor == 0) ||
455 (bssColor == heSigHeader->m_bssColor))
456 {
457 const auto it = m_psdus.find(staId);
458 if (it != m_psdus.cend())
459 {
460 return it->second;
461 }
462 }
463 }
464 return nullptr;
465}
466
467uint16_t
468HePpdu::GetStaId() const
469{
470 NS_ASSERT(IsUlMu());
471 return m_psdus.begin()->first;
472}
473
474MHz_u
475HePpdu::GetTxChannelWidth() const
476{
477 if (const auto& txVector = GetTxVector();
478 txVector.IsValid() && txVector.IsUlMu() && GetStaId() != SU_STA_ID)
479 {
480 TxPsdFlag flag = GetTxPsdFlag();
481 const auto ruWidth = WifiRu::GetBandwidth(WifiRu::GetRuType(txVector.GetRu(GetStaId())));
482 MHz_u channelWidth =
483 (flag == PSD_NON_HE_PORTION && ruWidth < MHz_u{20}) ? MHz_u{20} : ruWidth;
484 NS_LOG_INFO("Use " << channelWidth << " MHz for TB PPDU from " << GetStaId() << " for "
485 << flag);
486 return channelWidth;
487 }
488 else
489 {
490 return OfdmPpdu::GetTxChannelWidth();
491 }
492}
493
495HePpdu::GetTxPsdFlag() const
496{
497 return m_txPsdFlag;
498}
499
500void
501HePpdu::SetTxPsdFlag(TxPsdFlag flag) const
502{
503 NS_LOG_FUNCTION(this << flag);
504 m_txPsdFlag = flag;
505}
506
507void
508HePpdu::UpdateTxVectorForUlMu(const std::optional<WifiTxVector>& trigVector) const
509{
510 if (trigVector.has_value())
511 {
512 NS_LOG_FUNCTION(this << trigVector.value());
513 }
514 else
515 {
516 NS_LOG_FUNCTION(this);
517 }
518 if (!m_txVector.has_value())
519 {
520 m_txVector = GetTxVector();
521 }
522 NS_ASSERT(GetModulation() >= WIFI_MOD_CLASS_HE);
523 NS_ASSERT(GetType() == WIFI_PPDU_TYPE_UL_MU);
524 // HE TB PPDU reception needs information from the TRIGVECTOR to be able to receive the PPDU
525 const auto staId = GetStaId();
526 if (trigVector.has_value() && trigVector->IsUlMu() &&
527 (trigVector->GetHeMuUserInfoMap().contains(staId)))
528 {
529 // These information are not carried in HE-SIG-A for a HE TB PPDU,
530 // but they are carried in the Trigger frame soliciting the HE TB PPDU
531 m_txVector->SetGuardInterval(trigVector->GetGuardInterval());
532 m_txVector->SetHeMuUserInfo(staId, trigVector->GetHeMuUserInfo(staId));
533 }
534 else
535 {
536 // Set dummy user info, PPDU will be dropped later after decoding PHY headers.
537 m_txVector->SetHeMuUserInfo(
538 staId,
539 {HeRu::RuSpec{(WifiRu::GetRuType(m_txVector->GetChannelWidth())), 1, true}, 0, 1});
540 }
541}
542
543std::pair<std::size_t, std::size_t>
544HePpdu::GetNumRusPerHeSigBContentChannel(
545 MHz_u channelWidth,
546 const RuAllocation& ruAllocation,
547 std::optional<Center26ToneRuIndication> center26ToneRuIndication,
548 bool sigBCompression,
549 uint8_t numMuMimoUsers)
550{
551 std::pair<std::size_t /* number of RUs in content channel 1 */,
552 std::size_t /* number of RUs in content channel 2 */>
553 chSize{0, 0};
554
555 if (sigBCompression)
556 {
557 // If the HE-SIG-B Compression field in the HE-SIG-A field of an HE MU PPDU is 1,
558 // for bandwidths larger than 20 MHz, the AP performs an equitable split of
559 // the User fields between two HE-SIG-B content channels
560 if (channelWidth == MHz_u{20})
561 {
562 return {numMuMimoUsers, 0};
563 }
564 chSize.first = numMuMimoUsers / 2;
565 chSize.second = numMuMimoUsers / 2;
566 if (numMuMimoUsers != (chSize.first + chSize.second))
567 {
568 chSize.first++;
569 }
570 return chSize;
571 }
572
573 NS_ASSERT_MSG(!ruAllocation.empty(), "RU allocation is not set");
574 NS_ASSERT_MSG(ruAllocation.size() == Count20MHzSubchannels(channelWidth),
575 "RU allocation is not consistent with packet bandwidth");
576
577 const auto mc{WIFI_MOD_CLASS_HE};
578 switch (static_cast<uint16_t>(channelWidth))
579 {
580 case 40:
581 chSize.second += WifiRu::GetRuSpecs(ruAllocation[1], mc).size();
582 [[fallthrough]];
583 case 20:
584 chSize.first += WifiRu::GetRuSpecs(ruAllocation[0], mc).size();
585 break;
586 default:
587 for (std::size_t n = 0; n < Count20MHzSubchannels(channelWidth);)
588 {
589 std::size_t ccIndex;
590 const auto ruAlloc = ruAllocation.at(n);
591 std::size_t num20MHz{1};
592 const auto ruSpecs = WifiRu::GetRuSpecs(ruAlloc, mc);
593 const auto nRuSpecs = ruSpecs.size();
594 if (nRuSpecs == 1)
595 {
596 const auto ruBw = WifiRu::GetBandwidth(WifiRu::GetRuType(ruSpecs.front()));
597 num20MHz = Count20MHzSubchannels(ruBw);
598 }
599 if (nRuSpecs == 0)
600 {
601 ++n;
602 continue;
603 }
604 if (num20MHz > 1)
605 {
606 ccIndex = (chSize.first <= chSize.second) ? 0 : 1;
607 }
608 else
609 {
610 ccIndex = (n % 2 == 0) ? 0 : 1;
611 }
612 if (ccIndex == 0)
613 {
614 chSize.first += nRuSpecs;
615 }
616 else
617 {
618 chSize.second += nRuSpecs;
619 }
620 if (num20MHz > 1)
621 {
622 const auto skipNumIndices = (ccIndex == 0) ? num20MHz : num20MHz - 1;
623 n += skipNumIndices;
624 }
625 else
626 {
627 ++n;
628 }
629 }
630 break;
631 }
632 if (center26ToneRuIndication)
633 {
634 switch (*center26ToneRuIndication)
635 {
636 case Center26ToneRuIndication::CENTER_26_TONE_RU_LOW_80_MHZ_ALLOCATED:
637 chSize.first++;
638 break;
639 case Center26ToneRuIndication::CENTER_26_TONE_RU_HIGH_80_MHZ_ALLOCATED:
640 chSize.second++;
641 break;
642 case Center26ToneRuIndication::CENTER_26_TONE_RU_LOW_AND_HIGH_80_MHZ_ALLOCATED:
643 chSize.first++;
644 chSize.second++;
645 break;
646 case Center26ToneRuIndication::CENTER_26_TONE_RU_UNALLOCATED:
647 default:
648 break;
649 }
650 }
651 return chSize;
652}
653
655HePpdu::GetHeSigBContentChannels(const WifiTxVector& txVector, uint8_t p20Index)
656{
657 HeSigBContentChannels contentChannels{{}};
658
659 const auto channelWidth = txVector.GetChannelWidth();
660 if (channelWidth > MHz_u{20})
661 {
662 contentChannels.emplace_back();
663 }
664
665 std::optional<HeSigBUserSpecificField> cc1Central26ToneRu;
666 std::optional<HeSigBUserSpecificField> cc2Central26ToneRu;
667
668 const auto& orderedMap = txVector.GetUserInfoMapOrderedByRus(p20Index);
669 RuType prevRuType{RuType::RU_TYPE_MAX};
670 std::size_t prevRuIndex{0};
671 std::size_t prevCcIndex{0};
672 for (const auto& [ru, staIds] : orderedMap)
673 {
674 const auto ruType = WifiRu::GetRuType(ru);
675 auto ruIdx = WifiRu::GetIndex(ru);
676 if ((ruType == RuType::RU_26_TONE) && (ruIdx == 19))
677 {
678 NS_ASSERT(WifiRu::IsHe(ru));
679 const auto staId = *staIds.cbegin();
680 const auto& userInfo = txVector.GetHeMuUserInfo(staId);
681 if (std::get<HeRu::RuSpec>(ru).GetPrimary80MHz())
682 {
683 NS_ASSERT(!cc1Central26ToneRu);
684 cc1Central26ToneRu = HeSigBUserSpecificField{staId, userInfo.nss, userInfo.mcs};
685 }
686 else
687 {
688 NS_ASSERT(!cc2Central26ToneRu);
689 cc2Central26ToneRu = HeSigBUserSpecificField{staId, userInfo.nss, userInfo.mcs};
690 }
691 continue;
692 }
693
694 const auto ruIndex = WifiRu::GetPhyIndex(ru, channelWidth, p20Index);
695 if ((prevRuType < RuType::RU_TYPE_MAX) && (prevRuType != ruType))
696 {
697 prevRuIndex *= WifiRu::GetBandwidth(prevRuType) / WifiRu::GetBandwidth(ruType);
698 }
699 if (ruType >= RuType::RU_484_TONE)
700 {
701 for (auto staId : staIds)
702 {
703 // equal split
704 const auto ccIndex =
705 (contentChannels.at(0).size() <= contentChannels.at(1).size()) ? 0 : 1;
706 const auto& userInfo = txVector.GetHeMuUserInfo(staId);
707 NS_ASSERT(ru == userInfo.ru);
708 contentChannels[ccIndex].push_back({staId, userInfo.nss, userInfo.mcs});
709 }
710 continue;
711 }
712
713 const auto mc{WIFI_MOD_CLASS_HE};
714 const auto numRus = WifiRu::GetNRus(MHz_u{20}, ruType, mc);
715 while (prevRuIndex < ruIndex - 1)
716 {
717 std::size_t ccIndex{0};
718 if (channelWidth < MHz_u{40})
719 {
720 // only one content channel
721 ccIndex = 0;
722 }
723 else if (txVector.IsSigBCompression())
724 {
725 // equal split
726 ccIndex = (contentChannels.at(0).size() <= contentChannels.at(1).size()) ? 0 : 1;
727 }
728 else
729 {
730 ccIndex = ((prevRuIndex / numRus) % 2 == 0) ? 0 : 1;
731 }
732 const auto central26TonesRus =
733 WifiRu::GetCentral26TonesRus(channelWidth, prevRuType, mc);
734 const auto isCentral26ToneRu = std::none_of(
735 central26TonesRus.cbegin(),
736 central26TonesRus.cend(),
737 [ruIndex, channelWidth, p20Index](const auto& ruSpec) {
738 return WifiRu::GetPhyIndex(ruSpec, channelWidth, p20Index) == ruIndex;
739 });
740 if (ruType < RuType::RU_242_TONE && prevCcIndex == ccIndex &&
741 (ruType != RuType::RU_26_TONE || isCentral26ToneRu))
742 {
743 contentChannels[ccIndex].push_back({NO_USER_STA_ID, 0, 0});
744 }
745 ++prevRuIndex;
746 prevCcIndex = ccIndex;
747 }
748 prevRuIndex = ruIndex;
749 prevRuType = ruType;
750 for (auto staId : staIds)
751 {
752 const auto& userInfo = txVector.GetHeMuUserInfo(staId);
753 NS_ASSERT(ru == userInfo.ru);
754 std::size_t ccIndex{0};
755 if (channelWidth < MHz_u{40})
756 {
757 // only one content channel
758 ccIndex = 0;
759 }
760 else if (txVector.IsSigBCompression())
761 {
762 // MU-MIMO: equal split
763 ccIndex = (contentChannels.at(0).size() <= contentChannels.at(1).size()) ? 0 : 1;
764 }
765 else
766 {
767 if (ruType == RuType::RU_26_TONE && ruIdx > 19)
768 {
769 // "ignore" the center 26-tone RUs in 80 MHz channels
770 ruIdx--;
771 }
772 ccIndex = (((ruIdx - 1) / numRus) % 2 == 0) ? 0 : 1;
773 }
774 contentChannels.at(ccIndex).push_back({staId, userInfo.nss, userInfo.mcs});
775 prevCcIndex = ccIndex;
776 }
777 }
778
779 if (cc1Central26ToneRu)
780 {
781 contentChannels.at(0).push_back(*cc1Central26ToneRu);
782 }
783 if (cc2Central26ToneRu)
784 {
785 contentChannels.at(1).push_back(*cc2Central26ToneRu);
786 }
787
788 const auto isSigBCompression = txVector.IsSigBCompression();
789 if (!isSigBCompression)
790 {
791 // Add unassigned RUs
792 auto numNumRusPerHeSigBContentChannel = GetNumRusPerHeSigBContentChannel(
793 channelWidth,
794 txVector.GetRuAllocation(p20Index),
796 isSigBCompression,
797 isSigBCompression ? txVector.GetHeMuUserInfoMap().size() : 0);
798 std::size_t contentChannelIndex = 1;
799 for (auto& contentChannel : contentChannels)
800 {
801 const auto totalUsersInContentChannel = (contentChannelIndex == 1)
802 ? numNumRusPerHeSigBContentChannel.first
803 : numNumRusPerHeSigBContentChannel.second;
804 NS_ASSERT(contentChannel.size() <= totalUsersInContentChannel);
805 std::size_t unallocatedRus = totalUsersInContentChannel - contentChannel.size();
806 for (std::size_t i = 0; i < unallocatedRus; i++)
807 {
808 contentChannel.push_back({NO_USER_STA_ID, 0, 0});
809 }
810 contentChannelIndex++;
811 }
812 }
813
814 return contentChannels;
815}
816
818HePpdu::GetSigBFieldSize(MHz_u channelWidth,
819 const RuAllocation& ruAllocation,
820 std::optional<Center26ToneRuIndication> center26ToneRuIndication,
821 bool sigBCompression,
822 std::size_t numMuMimoUsers)
823{
824 // Compute the number of bits used by common field.
825 uint32_t commonFieldSize = 0;
826 if (!sigBCompression)
827 {
828 commonFieldSize = 4 /* CRC */ + 6 /* tail */;
829 if (channelWidth <= MHz_u{40})
830 {
831 commonFieldSize += 8; // only one allocation subfield
832 }
833 else
834 {
835 commonFieldSize +=
836 8 * (channelWidth / MHz_u{40}) /* one allocation field per 40 MHz */ +
837 1 /* center RU */;
838 }
839 }
840
841 auto numRusPerContentChannel = GetNumRusPerHeSigBContentChannel(channelWidth,
842 ruAllocation,
843 center26ToneRuIndication,
844 sigBCompression,
845 numMuMimoUsers);
846 auto maxNumRusPerContentChannel =
847 std::max(numRusPerContentChannel.first, numRusPerContentChannel.second);
848 auto maxNumUserBlockFields = maxNumRusPerContentChannel /
849 2; // handle last user block with single user, if any, further down
850 std::size_t userSpecificFieldSize =
851 maxNumUserBlockFields * (2 * 21 /* user fields (2 users) */ + 4 /* tail */ + 6 /* CRC */);
852 if (maxNumRusPerContentChannel % 2 != 0)
853 {
854 userSpecificFieldSize += 21 /* last user field */ + 4 /* CRC */ + 6 /* tail */;
855 }
856
857 return commonFieldSize + userSpecificFieldSize;
858}
859
860std::string
861HePpdu::PrintPayload() const
862{
863 std::ostringstream ss;
864 if (IsMu())
865 {
866 ss << m_psdus;
867 ss << ", " << m_txPsdFlag;
868 }
869 else
870 {
871 ss << "PSDU=" << m_psdus.at(SU_STA_ID) << " ";
872 }
873 return ss.str();
874}
875
876uint8_t
877HePpdu::GetChannelWidthEncodingFromMhz(MHz_u channelWidth)
878{
879 if (channelWidth == MHz_u{160})
880 {
881 return 3;
882 }
883 else if (channelWidth == MHz_u{80})
884 {
885 return 2;
886 }
887 else if (channelWidth == MHz_u{40})
888 {
889 return 1;
890 }
891 else
892 {
893 return 0;
894 }
895}
896
897MHz_u
898HePpdu::GetChannelWidthMhzFromEncoding(uint8_t bandwidth)
899{
900 if (bandwidth == 3)
901 {
902 return MHz_u{160};
903 }
904 else if (bandwidth == 2)
905 {
906 return MHz_u{80};
907 }
908 else if (bandwidth == 1)
909 {
910 return MHz_u{40};
911 }
912 else
913 {
914 return MHz_u{20};
915 }
916}
917
918uint8_t
919HePpdu::GetGuardIntervalAndNltfEncoding(Time guardInterval, uint8_t nltf)
920{
921 const auto gi = guardInterval.GetNanoSeconds();
922 if ((gi == 800) && (nltf == 1))
923 {
924 return 0;
925 }
926 else if ((gi == 800) && (nltf == 2))
927 {
928 return 1;
929 }
930 else if ((gi == 1600) && (nltf == 2))
931 {
932 return 2;
933 }
934 else
935 {
936 return 3;
937 }
938}
939
940Time
941HePpdu::GetGuardIntervalFromEncoding(uint8_t giAndNltfSize)
942{
943 if (giAndNltfSize == 3)
944 {
945 // we currently do not consider DCM nor STBC fields
946 return NanoSeconds(3200);
947 }
948 else if (giAndNltfSize == 2)
949 {
950 return NanoSeconds(1600);
951 }
952 else
953 {
954 return NanoSeconds(800);
955 }
956}
957
958uint8_t
959HePpdu::GetNstsEncodingFromNss(uint8_t nss)
960{
961 NS_ASSERT(nss <= 8);
962 return nss - 1;
963}
964
965uint8_t
966HePpdu::GetNssFromNstsEncoding(uint8_t nsts)
967{
968 return nsts + 1;
969}
970
971uint8_t
972HePpdu::GetMuMimoUsersEncoding(uint8_t nUsers)
973{
974 NS_ASSERT(nUsers <= 8);
975 return (nUsers - 1);
976}
977
978uint8_t
979HePpdu::GetMuMimoUsersFromEncoding(uint8_t encoding)
980{
981 return (encoding + 1);
982}
983
984} // namespace ns3
static WifiMode GetHeMcs(uint8_t index)
Return the HE MCS corresponding to the provided index.
Definition he-phy.cc:1550
HE PPDU (11ax)
Definition he-ppdu.h:39
HeSigHeader m_heSig
the HE-SIG PHY header
Definition he-ppdu.h:378
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition he-ppdu.cc:157
virtual void SetTxVectorFromPhyHeaders(WifiTxVector &txVector) const
Fill in the TXVECTOR from PHY headers.
Definition he-ppdu.cc:166
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE porti...
Definition he-ppdu.h:104
@ PSD_HE_PORTION
HE portion of an HE PPDU.
Definition he-ppdu.h:106
@ PSD_NON_HE_PORTION
Non-HE portion of an HE PPDU.
Definition he-ppdu.h:105
virtual bool IsDlMu() const
Return true if the PPDU is a DL MU PPDU.
Definition he-ppdu.cc:419
void SetHeMuUserInfos(WifiTxVector &txVector, const RuAllocation &ruAllocation, std::optional< Center26ToneRuIndication > center26ToneRuIndication, const HeSigBContentChannels &contentChannels, bool sigBCompression, uint8_t numMuMimoUsers) const
Reconstruct HeMuUserInfoMap from HE-SIG-B header.
Definition he-ppdu.cc:249
virtual bool IsUlMu() const
Return true if the PPDU is an UL MU PPDU.
Definition he-ppdu.cc:425
static uint8_t GetNstsEncodingFromNss(uint8_t nss)
Convert number of spatial streams to NSTS field encoding in HE-SIG-A.
Definition he-ppdu.cc:959
virtual WifiRu::RuSpec GetRuSpec(std::size_t ruAllocIndex, const std::vector< WifiRu::RuSpec > &ruSpecs, RuType ruType, std::size_t ruIndex, MHz_u bw) const
Get the RU specification that has been assigned a given user.
Definition he-ppdu.cc:216
void SetHeSigHeader(const WifiTxVector &txVector)
Fill in the HE-SIG header.
Definition he-ppdu.cc:111
static uint8_t GetNssFromNstsEncoding(uint8_t nsts)
Convert number of spatial streams from NSTS field encoding in HE-SIG-A.
Definition he-ppdu.cc:966
static Time GetGuardIntervalFromEncoding(uint8_t giAndNltfSize)
Convert guard interval from its encoding in HE-SIG-A.
Definition he-ppdu.cc:941
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the PHY headers.
Definition he-ppdu.cc:84
static HeSigBContentChannels GetHeSigBContentChannels(const WifiTxVector &txVector, uint8_t p20Index)
Get the HE SIG-B content channels for a given PPDU IEEE 802.11ax-2021 27.3.11.8.2 HE-SIG-B content ch...
Definition he-ppdu.cc:655
std::vector< std::vector< HeSigBUserSpecificField > > HeSigBContentChannels
HE SIG-B Content Channels.
Definition he-ppdu.h:50
static uint8_t GetMuMimoUsersEncoding(uint8_t nUsers)
Convert number of MU-MIMO users to its encoding in HE-SIG-A.
Definition he-ppdu.cc:972
static MHz_u GetChannelWidthMhzFromEncoding(uint8_t bandwidth)
Convert channel width expressed in MHz from bandwidth field encoding in HE-SIG-A.
Definition he-ppdu.cc:898
virtual bool IsMu() const
Return true if the PPDU is a MU PPDU.
Definition he-ppdu.cc:413
static uint8_t GetChannelWidthEncodingFromMhz(MHz_u channelWidth)
Convert channel width expressed in MHz to bandwidth field encoding in HE-SIG-A.
Definition he-ppdu.cc:877
void SetLSigHeader(Time ppduDuration)
Fill in the L-SIG header.
Definition he-ppdu.cc:92
HePpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, Time ppduDuration, uint64_t uid)
Create an SU HE PPDU, storing a PSDU.
Definition he-ppdu.cc:66
static uint8_t GetGuardIntervalAndNltfEncoding(Time guardInterval, uint8_t nltf)
Convert guard interval and NLTF to its encoding in HE-SIG-A.
Definition he-ppdu.cc:919
static uint8_t GetMuMimoUsersFromEncoding(uint8_t encoding)
Convert number of MU-MIMO users from its encoding in HE-SIG-A.
Definition he-ppdu.cc:979
RU Specification.
Definition he-ru.h:37
static std::vector< RuSpec > GetRusOfType(MHz_u bw, RuType ruType)
Get the set of distinct RUs of the given type (number of tones) available in a HE PPDU of the given b...
Definition he-ru.cc:511
static std::size_t GetNRus(MHz_u bw, RuType ruType)
Get the number of distinct RUs of the given type (number of tones) available in a HE PPDU of the give...
Definition he-ru.cc:491
uint16_t GetLength() const
Return the LENGTH field of L-SIG (in bytes).
Definition ofdm-ppdu.cc:199
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition ofdm-ppdu.cc:192
OFDM PPDU (11a)
Definition ofdm-ppdu.h:36
LSigHeader m_lSig
the L-SIG PHY header
Definition ofdm-ppdu.h:101
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
int64_t GetNanoSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition nstime.h:407
static WifiMode GetVhtMcs(uint8_t index)
Return the VHT MCS corresponding to the provided index.
Definition vht-phy.cc:334
uint8_t GetMcsValue() const
Definition wifi-mode.cc:151
Class that keeps track of all information about the current PHY operating channel.
bool IsSet() const
Return true if a valid channel has been set, false otherwise.
uint8_t GetPrimaryChannelIndex(MHz_u primaryChannelWidth) const
If the operating channel width is a multiple of 20 MHz, return the index of the primary channel of th...
WifiPhyBand GetPhyBand() const
Return the PHY band of the operating channel.
const WifiPhyOperatingChannel & m_operatingChannel
the operating channel of the PHY
Definition wifi-ppdu.h:201
WifiPreamble m_preamble
the PHY preamble
Definition wifi-ppdu.h:192
WifiConstPsduMap m_psdus
the PSDUs contained in this PPDU
Definition wifi-ppdu.h:194
std::variant< HeRu::RuSpec, EhtRu::RuSpec > RuSpec
variant of the RU specification
Definition wifi-ru.h:27
static MHz_u GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
Definition wifi-ru.cc:78
static std::size_t GetIndex(RuSpec ru)
Get the index of a given RU.
Definition wifi-ru.cc:51
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetCenter26ToneRuIndication(Center26ToneRuIndication center26ToneRuIndication)
Set CENTER_26_TONE_RU field.
void SetRuAllocation(const RuAllocation &ruAlloc, uint8_t p20Index)
Set RU_ALLOCATION field.
UserInfoMapOrderedByRus GetUserInfoMapOrderedByRus(uint8_t p20Index) const
Get the map of specific user info parameters ordered per increasing frequency RUs.
bool IsSigBCompression() const
Indicate whether the Common field is present in the HE-SIG-B field.
uint8_t GetBssColor() const
Get the BSS color.
const RuAllocation & GetRuAllocation(uint8_t p20Index) const
Get RU_ALLOCATION field.
void SetGuardInterval(Time guardInterval)
Sets the guard interval duration (in nanoseconds)
std::optional< Center26ToneRuIndication > GetCenter26ToneRuIndication() const
Get CENTER_26_TONE_RU field This field is present if format is HE_MU and when channel width is set to...
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode.
RuAllocation m_ruAllocation
RU allocations that are going to be carried in SIG-B common field per Table 27-1 IEEE.
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const
Get the HE MU user-specific transmission information for the given STA-ID.
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
void SetChannelWidth(MHz_u channelWidth)
Sets the selected channelWidth.
const HeMuUserInfoMap & GetHeMuUserInfoMap() const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
uint8_t GetNss(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the number of spatial streams.
void SetLength(uint16_t length)
Set the LENGTH field of the L-SIG.
MHz_u GetChannelWidth() const
void SetSigBMode(const WifiMode &mode)
Set the MCS used for SIG-B.
void SetBssColor(uint8_t color)
Set the BSS color.
Time GetGuardInterval() const
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
WifiMode GetSigBMode() const
Get MCS used for SIG-B.
void SetNss(uint8_t nss)
Sets the number of Nss.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition assert.h:75
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition log.h:264
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1369
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1381
Center26ToneRuIndication
Enum for the different values for CENTER_26_TONE_RU.
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
@ WIFI_PREAMBLE_HE_TB
@ WIFI_PREAMBLE_HE_MU
@ CENTER_26_TONE_RU_LOW_AND_HIGH_80_MHZ_ALLOCATED
@ CENTER_26_TONE_RU_HIGH_80_MHZ_ALLOCATED
@ CENTER_26_TONE_RU_LOW_80_MHZ_ALLOCATED
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
@ WIFI_PPDU_TYPE_DL_MU
@ WIFI_PPDU_TYPE_UL_MU
@ WIFI_PPDU_TYPE_SU
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
Declaration of ns3::HePhy class and ns3::HeSigAParameters struct.
Declaration of ns3::HePpdu class.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:865
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition angles.cc:148
RuType
The different Resource Unit (RU) types.
Definition wifi-types.h:98
bool IsMu(WifiPreamble preamble)
Return true if a preamble corresponds to a multi-user transmission.
double MHz_u
MHz weak type.
Definition wifi-units.h:31
std::size_t Count20MHzSubchannels(MHz_u channelWidth)
Return the number of 20 MHz subchannels covering the channel width.
Definition wifi-utils.h:135
bool IsDlMu(WifiPreamble preamble)
Return true if a preamble corresponds to a downlink multi-user transmission.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Definition wifi-ppdu.h:38
bool IsUlMu(WifiPreamble preamble)
Return true if a preamble corresponds to a uplink multi-user transmission.
std::vector< uint16_t > RuAllocation
9 bits RU_ALLOCATION per 20 MHz
HE-SIG PHY header for HE MU PPDUs (HE-SIG-A1/A2/B)
Definition he-ppdu.h:79
uint8_t m_bssColor
BSS color field.
Definition he-ppdu.h:81
User Specific Fields in HE-SIG-Bs.
Definition he-ppdu.h:43
uint8_t nss
number of spatial streams
Definition he-ppdu.h:45
HE-SIG PHY header for HE SU PPDUs (HE-SIG-A1/A2)
Definition he-ppdu.h:56
uint8_t m_bssColor
BSS color field.
Definition he-ppdu.h:58
HE-SIG PHY header for HE TB PPDUs (HE-SIG-A1/A2)
Definition he-ppdu.h:69
uint8_t m_bssColor
BSS color field.
Definition he-ppdu.h:71