|
Lines 154-162
RegularWifiMac::GetHtCapabilities (void) const
|
Link Here
|
|---|
|
| 154 |
capabilities.SetShortGuardInterval20 (m_phy->GetShortGuardInterval ()); |
154 |
capabilities.SetShortGuardInterval20 (m_phy->GetShortGuardInterval ()); |
| 155 |
capabilities.SetShortGuardInterval40 (m_phy->GetChannelWidth () >= 40 && m_phy->GetShortGuardInterval ()); |
155 |
capabilities.SetShortGuardInterval40 (m_phy->GetChannelWidth () >= 40 && m_phy->GetShortGuardInterval ()); |
| 156 |
capabilities.SetGreenfield (m_phy->GetGreenfield ()); |
156 |
capabilities.SetGreenfield (m_phy->GetGreenfield ()); |
| 157 |
capabilities.SetMaxAmsduLength (1); //hardcoded for now (TBD) |
157 |
uint32_t maxAmsduLength = std::max (std::max (m_beMaxAmsduSize, m_bkMaxAmsduSize), std::max (m_voMaxAmsduSize, m_viMaxAmsduSize)); |
|
|
158 |
capabilities.SetMaxAmsduLength (maxAmsduLength > 3839); //0 if 3839 and 1 if 7935 |
| 158 |
capabilities.SetLSigProtectionSupport (!m_phy->GetGreenfield ()); |
159 |
capabilities.SetLSigProtectionSupport (!m_phy->GetGreenfield ()); |
| 159 |
capabilities.SetMaxAmpduLength (3); //hardcoded for now (TBD) |
160 |
uint32_t maxAmpduLength = std::max (std::max (m_beMaxAmpduSize, m_bkMaxAmpduSize), std::max (m_voMaxAmpduSize, m_viMaxAmpduSize)); |
|
|
161 |
capabilities.SetMaxAmpduLength (uint8_t (std::max (3.0, std::ceil (std::log (maxAmpduLength + 1.0) - 13.0)))); //0 to 3 for HT |
| 160 |
uint64_t maxSupportedRate = 0; //in bit/s |
162 |
uint64_t maxSupportedRate = 0; //in bit/s |
| 161 |
for (uint8_t i = 0; i < m_phy->GetNMcs (); i++) |
163 |
for (uint8_t i = 0; i < m_phy->GetNMcs (); i++) |
| 162 |
{ |
164 |
{ |
|
Lines 198-208
RegularWifiMac::GetVhtCapabilities (void) const
|
Link Here
|
|---|
|
| 198 |
{ |
200 |
{ |
| 199 |
capabilities.SetSupportedChannelWidthSet (0); |
201 |
capabilities.SetSupportedChannelWidthSet (0); |
| 200 |
} |
202 |
} |
| 201 |
capabilities.SetMaxMpduLength (2); //hardcoded for now (TBD) |
203 |
uint32_t maxMpduLength = std::max (std::max (m_beMaxAmsduSize, m_bkMaxAmsduSize), std::max (m_voMaxAmsduSize, m_viMaxAmsduSize)) + 56; //see section 9.11 of 11ac standard |
|
|
204 |
capabilities.SetMaxMpduLength (uint8_t (maxMpduLength > 3895) + uint8_t (maxMpduLength > 7991)); //0 if 3895, 1 if 7991, 2 for 11454 |
| 202 |
capabilities.SetRxLdpc (m_phy->GetLdpc ()); |
205 |
capabilities.SetRxLdpc (m_phy->GetLdpc ()); |
| 203 |
capabilities.SetShortGuardIntervalFor80Mhz ((m_phy->GetChannelWidth () == 80) && m_phy->GetShortGuardInterval ()); |
206 |
capabilities.SetShortGuardIntervalFor80Mhz ((m_phy->GetChannelWidth () == 80) && m_phy->GetShortGuardInterval ()); |
| 204 |
capabilities.SetShortGuardIntervalFor160Mhz ((m_phy->GetChannelWidth () == 160) && m_phy->GetShortGuardInterval ()); |
207 |
capabilities.SetShortGuardIntervalFor160Mhz ((m_phy->GetChannelWidth () == 160) && m_phy->GetShortGuardInterval ()); |
| 205 |
capabilities.SetMaxAmpduLengthExponent (7); //hardcoded for now (TBD) |
208 |
uint32_t maxAmpduLength = std::max (std::max (m_beMaxAmpduSize, m_bkMaxAmpduSize), std::max (m_voMaxAmpduSize, m_viMaxAmpduSize)); |
|
|
209 |
capabilities.SetMaxAmpduLengthExponent (uint8_t (std::max (7.0, std::ceil (std::log (maxAmpduLength + 1.0) - 13.0)))); //0 to 7 for VHT |
| 206 |
uint8_t maxMcs = 0; |
210 |
uint8_t maxMcs = 0; |
| 207 |
for (uint8_t i = 0; i < m_phy->GetNMcs (); i++) |
211 |
for (uint8_t i = 0; i < m_phy->GetNMcs (); i++) |
| 208 |
{ |
212 |
{ |
|
Lines 274-280
RegularWifiMac::GetHeCapabilities (void) const
|
Link Here
|
|---|
|
| 274 |
gi |= 0x02; |
278 |
gi |= 0x02; |
| 275 |
} |
279 |
} |
| 276 |
capabilities.SetHeLtfAndGiForHePpdus (gi); |
280 |
capabilities.SetHeLtfAndGiForHePpdus (gi); |
| 277 |
capabilities.SetMaxAmpduLengthExponent (7); //hardcoded for now (TBD) |
281 |
uint32_t maxAmpduLength = std::max (std::max (m_beMaxAmpduSize, m_bkMaxAmpduSize), std::max (m_voMaxAmpduSize, m_viMaxAmpduSize)); |
|
|
282 |
capabilities.SetMaxAmpduLengthExponent (uint8_t (std::max (7.0, std::ceil (std::log (maxAmpduLength + 1.0) - 13.0)))); //assume 0 to 7 for HE |
| 278 |
uint8_t maxMcs = 0; |
283 |
uint8_t maxMcs = 0; |
| 279 |
for (uint8_t i = 0; i < m_phy->GetNMcs (); i++) |
284 |
for (uint8_t i = 0; i < m_phy->GetNMcs (); i++) |
| 280 |
{ |
285 |
{ |