|
|
| 231 |
WifiModeList htMcsList = GetHtDeviceMcsList (); |
231 |
WifiModeList htMcsList = GetHtDeviceMcsList (); |
| 232 |
for (uint8_t i = 0; i < MAX_HT_GROUP_RATES; i++) |
232 |
for (uint8_t i = 0; i < MAX_HT_GROUP_RATES; i++) |
| 233 |
{ |
233 |
{ |
| 234 |
uint8_t deviceIndex = i + (m_minstrelGroups[groupId].streams - 1) * 8; |
234 |
uint16_t deviceIndex = i + (m_minstrelGroups[groupId].streams - 1) * 8; |
| 235 |
WifiMode mode = htMcsList[deviceIndex]; |
235 |
WifiMode mode = htMcsList[deviceIndex]; |
| 236 |
AddFirstMpduTxTime (groupId, mode, CalculateFirstMpduTxDuration (GetPhy (), streams, sgi, chWidth, mode)); |
236 |
AddFirstMpduTxTime (groupId, mode, CalculateFirstMpduTxDuration (GetPhy (), streams, sgi, chWidth, mode)); |
| 237 |
AddMpduTxTime (groupId, mode, CalculateMpduTxDuration (GetPhy (), streams, sgi, chWidth, mode)); |
237 |
AddMpduTxTime (groupId, mode, CalculateMpduTxDuration (GetPhy (), streams, sgi, chWidth, mode)); |
|
|
| 470 |
MinstrelHtWifiManager::DoReportRxOk (WifiRemoteStation *st, double rxSnr, WifiMode txMode) |
470 |
MinstrelHtWifiManager::DoReportRxOk (WifiRemoteStation *st, double rxSnr, WifiMode txMode) |
| 471 |
{ |
471 |
{ |
| 472 |
NS_LOG_FUNCTION (this << st); |
472 |
NS_LOG_FUNCTION (this << st); |
| 473 |
NS_LOG_DEBUG ("DoReportRxOk m_txrate = " << +((MinstrelHtWifiRemoteStation *)st)->m_txrate); |
473 |
NS_LOG_DEBUG ("DoReportRxOk m_txrate=" << ((MinstrelHtWifiRemoteStation *)st)->m_txrate); |
| 474 |
} |
474 |
} |
| 475 |
|
475 |
|
| 476 |
void |
476 |
void |
|
|
| 483 |
{ |
483 |
{ |
| 484 |
return; |
484 |
return; |
| 485 |
} |
485 |
} |
| 486 |
NS_LOG_DEBUG ("DoReportRtsFailed m_txrate = " << +station->m_txrate); |
486 |
NS_LOG_DEBUG ("DoReportRtsFailed m_txrate = " << station->m_txrate); |
| 487 |
station->m_shortRetry++; |
487 |
station->m_shortRetry++; |
| 488 |
} |
488 |
} |
| 489 |
|
489 |
|
|
|
| 519 |
return; |
519 |
return; |
| 520 |
} |
520 |
} |
| 521 |
|
521 |
|
| 522 |
NS_LOG_DEBUG ("DoReportDataFailed " << station << "\t rate " << +station->m_txrate << "\tlongRetry \t" << station->m_longRetry); |
522 |
NS_LOG_DEBUG ("DoReportDataFailed " << station << "\t rate " << station->m_txrate << "\tlongRetry \t" << station->m_longRetry); |
| 523 |
|
523 |
|
| 524 |
if (!station->m_isHt) |
524 |
if (!station->m_isHt) |
| 525 |
{ |
525 |
{ |
|
|
| 546 |
return; |
546 |
return; |
| 547 |
} |
547 |
} |
| 548 |
|
548 |
|
| 549 |
NS_LOG_DEBUG ("DoReportDataOk m_txrate = " << +station->m_txrate << ", attempt = " << station->m_minstrelTable[station->m_txrate].numRateAttempt << ", success = " << station->m_minstrelTable[station->m_txrate].numRateSuccess << " (before update)."); |
549 |
NS_LOG_DEBUG ("DoReportDataOk m_txrate = " << station->m_txrate << ", attempt = " << station->m_minstrelTable[station->m_txrate].numRateAttempt << ", success = " << station->m_minstrelTable[station->m_txrate].numRateSuccess << " (before update)."); |
| 550 |
|
550 |
|
| 551 |
if (!station->m_isHt) |
551 |
if (!station->m_isHt) |
| 552 |
{ |
552 |
{ |
|
|
| 555 |
|
555 |
|
| 556 |
m_legacyManager->UpdatePacketCounters (station); |
556 |
m_legacyManager->UpdatePacketCounters (station); |
| 557 |
|
557 |
|
| 558 |
NS_LOG_DEBUG ("DoReportDataOk m_txrate = " << +station->m_txrate << ", attempt = " << station->m_minstrelTable[station->m_txrate].numRateAttempt << ", success = " << station->m_minstrelTable[station->m_txrate].numRateSuccess << " (after update)."); |
558 |
NS_LOG_DEBUG ("DoReportDataOk m_txrate = " << station->m_txrate << ", attempt = " << station->m_minstrelTable[station->m_txrate].numRateAttempt << ", success = " << station->m_minstrelTable[station->m_txrate].numRateSuccess << " (after update)."); |
| 559 |
|
559 |
|
| 560 |
UpdateRetry (station); |
560 |
UpdateRetry (station); |
| 561 |
m_legacyManager->UpdateStats (station); |
561 |
m_legacyManager->UpdateStats (station); |
|
|
| 574 |
|
574 |
|
| 575 |
UpdatePacketCounters (station, 1, 0); |
575 |
UpdatePacketCounters (station, 1, 0); |
| 576 |
|
576 |
|
| 577 |
NS_LOG_DEBUG ("DoReportDataOk m_txrate = " << +station->m_txrate << ", attempt = " << station->m_minstrelTable[station->m_txrate].numRateAttempt << ", success = " << station->m_minstrelTable[station->m_txrate].numRateSuccess << " (after update)."); |
577 |
NS_LOG_DEBUG ("DoReportDataOk m_txrate = " << station->m_txrate << ", attempt = " << station->m_minstrelTable[station->m_txrate].numRateAttempt << ", success = " << station->m_minstrelTable[station->m_txrate].numRateSuccess << " (after update)."); |
| 578 |
|
578 |
|
| 579 |
station->m_isSampling = false; |
579 |
station->m_isSampling = false; |
| 580 |
station->m_sampleDeferred = false; |
580 |
station->m_sampleDeferred = false; |
|
|
| 591 |
} |
591 |
} |
| 592 |
} |
592 |
} |
| 593 |
|
593 |
|
| 594 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << +station->m_txrate); |
594 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << station->m_txrate ); |
| 595 |
} |
595 |
} |
| 596 |
|
596 |
|
| 597 |
void |
597 |
void |
|
|
| 606 |
return; |
606 |
return; |
| 607 |
} |
607 |
} |
| 608 |
|
608 |
|
| 609 |
NS_LOG_DEBUG ("DoReportFinalDataFailed - TxRate=" << +station->m_txrate); |
609 |
NS_LOG_DEBUG ("DoReportFinalDataFailed - TxRate=" << station->m_txrate); |
| 610 |
|
610 |
|
| 611 |
if (!station->m_isHt) |
611 |
if (!station->m_isHt) |
| 612 |
{ |
612 |
{ |
|
|
| 638 |
station->m_txrate = FindRate (station); |
638 |
station->m_txrate = FindRate (station); |
| 639 |
} |
639 |
} |
| 640 |
} |
640 |
} |
| 641 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << +station->m_txrate); |
641 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << station->m_txrate); |
| 642 |
} |
642 |
} |
| 643 |
|
643 |
|
| 644 |
void |
644 |
void |
|
|
| 658 |
NS_ASSERT_MSG (false,"A-MPDU Tx Status called but no HT or VHT supported."); |
658 |
NS_ASSERT_MSG (false,"A-MPDU Tx Status called but no HT or VHT supported."); |
| 659 |
} |
659 |
} |
| 660 |
|
660 |
|
| 661 |
NS_LOG_DEBUG ("DoReportAmpduTxStatus. TxRate=" << +station->m_txrate << " SuccMpdus= " << |
661 |
NS_LOG_DEBUG ("DoReportAmpduTxStatus. TxRate=" << station->m_txrate << " SuccMpdus= " << |
| 662 |
+nSuccessfulMpdus << " FailedMpdus= " << +nFailedMpdus); |
662 |
+nSuccessfulMpdus << " FailedMpdus= " << +nFailedMpdus); |
| 663 |
|
663 |
|
| 664 |
station->m_ampduPacketCount++; |
664 |
station->m_ampduPacketCount++; |
|
|
| 691 |
{ |
691 |
{ |
| 692 |
station->m_txrate = FindRate (station); |
692 |
station->m_txrate = FindRate (station); |
| 693 |
} |
693 |
} |
| 694 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << +station->m_txrate); |
694 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << station->m_txrate); |
| 695 |
} |
695 |
} |
| 696 |
} |
696 |
} |
| 697 |
|
697 |
|
|
|
| 793 |
NS_ASSERT_MSG (false,"Max retries reached and m_longRetry not cleared properly. longRetry= " << station->m_longRetry); |
793 |
NS_ASSERT_MSG (false,"Max retries reached and m_longRetry not cleared properly. longRetry= " << station->m_longRetry); |
| 794 |
} |
794 |
} |
| 795 |
} |
795 |
} |
| 796 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << +station->m_txrate); |
796 |
NS_LOG_DEBUG ("Next rate to use TxRate = " << station->m_txrate); |
| 797 |
} |
797 |
} |
| 798 |
|
798 |
|
| 799 |
void |
799 |
void |
|
|
| 852 |
} |
852 |
} |
| 853 |
else |
853 |
else |
| 854 |
{ |
854 |
{ |
| 855 |
NS_LOG_DEBUG ("DoGetDataMode m_txrate = " << +station->m_txrate); |
855 |
NS_LOG_DEBUG ("DoGetDataMode m_txrate= " << station->m_txrate); |
| 856 |
|
856 |
|
| 857 |
uint8_t rateId = GetRateId (station->m_txrate); |
857 |
uint8_t rateId = GetRateId (station->m_txrate); |
| 858 |
uint8_t groupId = GetGroupId (station->m_txrate); |
858 |
uint8_t groupId = GetGroupId (station->m_txrate); |
|
|
| 898 |
} |
898 |
} |
| 899 |
else |
899 |
else |
| 900 |
{ |
900 |
{ |
| 901 |
NS_LOG_DEBUG ("DoGetRtsMode m_txrate = " << +station->m_txrate); |
901 |
NS_LOG_DEBUG ("DoGetRtsMode m_txrate=" << station->m_txrate); |
| 902 |
|
902 |
|
| 903 |
/* RTS is sent in a non-HT frame. RTS with HT is not supported yet in NS3. |
903 |
/* RTS is sent in a non-HT frame. RTS with HT is not supported yet in NS3. |
| 904 |
* When supported, decision of using HT has to follow rules in Section 9.7.6 from 802.11-2012. |
904 |
* When supported, decision of using HT has to follow rules in Section 9.7.6 from 802.11-2012. |
|
|
| 1022 |
return true; |
1022 |
return true; |
| 1023 |
} |
1023 |
} |
| 1024 |
|
1024 |
|
| 1025 |
uint8_t |
1025 |
uint16_t |
| 1026 |
MinstrelHtWifiManager::GetNextSample (MinstrelHtWifiRemoteStation *station) |
1026 |
MinstrelHtWifiManager::GetNextSample (MinstrelHtWifiRemoteStation *station) |
| 1027 |
{ |
1027 |
{ |
| 1028 |
NS_LOG_FUNCTION (this << station); |
1028 |
NS_LOG_FUNCTION (this << station); |
|
|
| 1030 |
uint8_t index = station->m_groupsTable[sampleGroup].m_index; |
1030 |
uint8_t index = station->m_groupsTable[sampleGroup].m_index; |
| 1031 |
uint8_t col = station->m_groupsTable[sampleGroup].m_col; |
1031 |
uint8_t col = station->m_groupsTable[sampleGroup].m_col; |
| 1032 |
uint8_t sampleIndex = station->m_sampleTable[index][col]; |
1032 |
uint8_t sampleIndex = station->m_sampleTable[index][col]; |
| 1033 |
uint8_t rateIndex = GetIndex (sampleGroup, sampleIndex); |
1033 |
uint16_t rateIndex = GetIndex (sampleGroup, sampleIndex); |
| 1034 |
NS_LOG_DEBUG ("Next Sample is " << +rateIndex); |
1034 |
NS_LOG_DEBUG ("Next Sample is " << rateIndex); |
| 1035 |
SetNextSample (station); //Calculate the next sample rate. |
1035 |
SetNextSample (station); //Calculate the next sample rate. |
| 1036 |
return rateIndex; |
1036 |
return rateIndex; |
| 1037 |
} |
1037 |
} |
|
|
| 1067 |
NS_LOG_DEBUG ("New sample set: group= " << +sampleGroup << " index= " << +station->m_sampleTable[index][col]); |
1067 |
NS_LOG_DEBUG ("New sample set: group= " << +sampleGroup << " index= " << +station->m_sampleTable[index][col]); |
| 1068 |
} |
1068 |
} |
| 1069 |
|
1069 |
|
| 1070 |
uint8_t |
1070 |
uint16_t |
| 1071 |
MinstrelHtWifiManager::FindRate (MinstrelHtWifiRemoteStation *station) |
1071 |
MinstrelHtWifiManager::FindRate (MinstrelHtWifiRemoteStation *station) |
| 1072 |
{ |
1072 |
{ |
| 1073 |
NS_LOG_FUNCTION (this << station); |
1073 |
NS_LOG_FUNCTION (this << station); |
|
|
| 1084 |
//SAMPLING |
1084 |
//SAMPLING |
| 1085 |
NS_LOG_DEBUG ("Obtaining a sampling rate"); |
1085 |
NS_LOG_DEBUG ("Obtaining a sampling rate"); |
| 1086 |
/// Now go through the table and find an index rate. |
1086 |
/// Now go through the table and find an index rate. |
| 1087 |
uint8_t sampleIdx = GetNextSample (station); |
1087 |
uint16_t sampleIdx = GetNextSample (station); |
| 1088 |
NS_LOG_DEBUG ("Sampling rate = " << +sampleIdx); |
1088 |
NS_LOG_DEBUG ("Sampling rate = " << sampleIdx); |
| 1089 |
|
1089 |
|
| 1090 |
//Evaluate if the sampling rate selected should be used. |
1090 |
//Evaluate if the sampling rate selected should be used. |
| 1091 |
uint8_t sampleGroupId = GetGroupId (sampleIdx); |
1091 |
uint8_t sampleGroupId = GetGroupId (sampleIdx); |
|
|
| 1103 |
*/ |
1103 |
*/ |
| 1104 |
HtRateInfo sampleRateInfo = station->m_groupsTable[sampleGroupId].m_ratesTable[sampleRateId]; |
1104 |
HtRateInfo sampleRateInfo = station->m_groupsTable[sampleGroupId].m_ratesTable[sampleRateId]; |
| 1105 |
|
1105 |
|
| 1106 |
NS_LOG_DEBUG ("Use sample rate? MaxTpRate= " << +station->m_maxTpRate << " CurrentRate= " << +station->m_txrate << |
1106 |
NS_LOG_DEBUG ("Use sample rate? MaxTpRate= " << station->m_maxTpRate << " CurrentRate= " << station->m_txrate << |
| 1107 |
" SampleRate= " << +sampleIdx << " SampleProb= " << sampleRateInfo.ewmaProb); |
1107 |
" SampleRate= " << sampleIdx << " SampleProb= " << sampleRateInfo.ewmaProb); |
| 1108 |
|
1108 |
|
| 1109 |
if (sampleIdx != station->m_maxTpRate && sampleIdx != station->m_maxTpRate2 |
1109 |
if (sampleIdx != station->m_maxTpRate && sampleIdx != station->m_maxTpRate2 |
| 1110 |
&& sampleIdx != station->m_maxProbRate && sampleRateInfo.ewmaProb <= 95) |
1110 |
&& sampleIdx != station->m_maxProbRate && sampleRateInfo.ewmaProb <= 95) |
|
|
| 1139 |
/// set the rate that we're currently sampling |
1139 |
/// set the rate that we're currently sampling |
| 1140 |
station->m_sampleRate = sampleIdx; |
1140 |
station->m_sampleRate = sampleIdx; |
| 1141 |
|
1141 |
|
| 1142 |
NS_LOG_DEBUG ("FindRate " << "sampleRate=" << +sampleIdx); |
1142 |
NS_LOG_DEBUG ("FindRate " << "sampleRate=" << sampleIdx); |
| 1143 |
station->m_sampleTries--; |
1143 |
station->m_sampleTries--; |
| 1144 |
return sampleIdx; |
1144 |
return sampleIdx; |
| 1145 |
} |
1145 |
} |
|
|
| 1154 |
/// set the rate that we're currently sampling |
1154 |
/// set the rate that we're currently sampling |
| 1155 |
station->m_sampleRate = sampleIdx; |
1155 |
station->m_sampleRate = sampleIdx; |
| 1156 |
|
1156 |
|
| 1157 |
NS_LOG_DEBUG ("FindRate " << "sampleRate=" << +sampleIdx); |
1157 |
NS_LOG_DEBUG ("FindRate " << "sampleRate=" << sampleIdx); |
| 1158 |
station->m_sampleTries--; |
1158 |
station->m_sampleTries--; |
| 1159 |
return sampleIdx; |
1159 |
return sampleIdx; |
| 1160 |
} |
1160 |
} |
|
|
| 1169 |
|
1169 |
|
| 1170 |
/// Continue using the best rate. |
1170 |
/// Continue using the best rate. |
| 1171 |
|
1171 |
|
| 1172 |
NS_LOG_DEBUG ("FindRate " << "maxTpRrate=" << +station->m_maxTpRate); |
1172 |
NS_LOG_DEBUG ("FindRate " << "maxTpRrate=" << station->m_maxTpRate); |
| 1173 |
return station->m_maxTpRate; |
1173 |
return station->m_maxTpRate; |
| 1174 |
} |
1174 |
} |
| 1175 |
void |
1175 |
void |
|
|
| 1281 |
CalculateRetransmits (station, station->m_maxTpRate2); |
1281 |
CalculateRetransmits (station, station->m_maxTpRate2); |
| 1282 |
CalculateRetransmits (station, station->m_maxProbRate); |
1282 |
CalculateRetransmits (station, station->m_maxProbRate); |
| 1283 |
|
1283 |
|
| 1284 |
NS_LOG_DEBUG ("max tp=" << +station->m_maxTpRate << "\nmax tp2=" << +station->m_maxTpRate2 << "\nmax prob=" << +station->m_maxProbRate); |
1284 |
NS_LOG_DEBUG ("max tp=" << station->m_maxTpRate << "\nmax tp2=" << station->m_maxTpRate2 << "\nmax prob=" << station->m_maxProbRate); |
| 1285 |
if (m_printStats) |
1285 |
if (m_printStats) |
| 1286 |
{ |
1286 |
{ |
| 1287 |
PrintTable (station); |
1287 |
PrintTable (station); |
|
|
| 1319 |
} |
1319 |
} |
| 1320 |
|
1320 |
|
| 1321 |
void |
1321 |
void |
| 1322 |
MinstrelHtWifiManager::SetBestProbabilityRate (MinstrelHtWifiRemoteStation *station, uint8_t index) |
1322 |
MinstrelHtWifiManager::SetBestProbabilityRate (MinstrelHtWifiRemoteStation *station, uint16_t index) |
| 1323 |
{ |
1323 |
{ |
| 1324 |
GroupInfo *group; |
1324 |
GroupInfo *group; |
| 1325 |
HtRateInfo rate; |
1325 |
HtRateInfo rate; |
|
|
| 1380 |
* MCS groups. |
1380 |
* MCS groups. |
| 1381 |
*/ |
1381 |
*/ |
| 1382 |
void |
1382 |
void |
| 1383 |
MinstrelHtWifiManager::SetBestStationThRates (MinstrelHtWifiRemoteStation *station, uint8_t index) |
1383 |
MinstrelHtWifiManager::SetBestStationThRates (MinstrelHtWifiRemoteStation *station, uint16_t index) |
| 1384 |
{ |
1384 |
{ |
| 1385 |
uint8_t groupId, rateId; |
1385 |
uint8_t groupId, rateId; |
| 1386 |
double th, prob; |
1386 |
double th, prob; |
|
|
| 1521 |
} |
1521 |
} |
| 1522 |
|
1522 |
|
| 1523 |
void |
1523 |
void |
| 1524 |
MinstrelHtWifiManager::CalculateRetransmits (MinstrelHtWifiRemoteStation *station, uint8_t index) |
1524 |
MinstrelHtWifiManager::CalculateRetransmits (MinstrelHtWifiRemoteStation *station, uint16_t index) |
| 1525 |
{ |
1525 |
{ |
| 1526 |
NS_LOG_FUNCTION (this << station << +index); |
1526 |
NS_LOG_FUNCTION (this << station << index); |
| 1527 |
uint8_t groupId = GetGroupId (index); |
1527 |
uint8_t groupId = GetGroupId (index); |
| 1528 |
uint8_t rateId = GetRateId (index); |
1528 |
uint8_t rateId = GetRateId (index); |
| 1529 |
if (!station->m_groupsTable[groupId].m_ratesTable[rateId].retryUpdated) |
1529 |
if (!station->m_groupsTable[groupId].m_ratesTable[rateId].retryUpdated) |
|
|
| 1603 |
//for off-setting to make rates fall between 0 and nModes |
1603 |
//for off-setting to make rates fall between 0 and nModes |
| 1604 |
uint8_t numSampleRates = m_numRates; |
1604 |
uint8_t numSampleRates = m_numRates; |
| 1605 |
|
1605 |
|
| 1606 |
uint8_t newIndex; |
1606 |
uint16_t newIndex; |
| 1607 |
for (uint8_t col = 0; col < m_nSampleCol; col++) |
1607 |
for (uint8_t col = 0; col < m_nSampleCol; col++) |
| 1608 |
{ |
1608 |
{ |
| 1609 |
for (uint8_t i = 0; i < numSampleRates; i++ ) |
1609 |
for (uint8_t i = 0; i < numSampleRates; i++ ) |
|
|
| 1670 |
of << "VHT" << group.chWidth << " " << giMode << "GI " << (int)group.streams << " "; |
1670 |
of << "VHT" << group.chWidth << " " << giMode << "GI " << (int)group.streams << " "; |
| 1671 |
} |
1671 |
} |
| 1672 |
|
1672 |
|
| 1673 |
uint8_t maxTpRate = station->m_maxTpRate; |
1673 |
uint16_t maxTpRate = station->m_maxTpRate; |
| 1674 |
uint8_t maxTpRate2 = station->m_maxTpRate2; |
1674 |
uint16_t maxTpRate2 = station->m_maxTpRate2; |
| 1675 |
uint8_t maxProbRate = station->m_maxProbRate; |
1675 |
uint16_t maxProbRate = station->m_maxProbRate; |
| 1676 |
|
1676 |
|
| 1677 |
uint8_t idx = GetIndex (groupId, i); |
1677 |
uint16_t idx = GetIndex (groupId, i); |
| 1678 |
if (idx == maxTpRate) |
1678 |
if (idx == maxTpRate) |
| 1679 |
{ |
1679 |
{ |
| 1680 |
of << 'A'; |
1680 |
of << 'A'; |
|
|
| 1728 |
} |
1728 |
} |
| 1729 |
} |
1729 |
} |
| 1730 |
} |
1730 |
} |
| 1731 |
uint8_t |
1731 |
uint16_t |
| 1732 |
MinstrelHtWifiManager::GetIndex (uint8_t groupId, uint8_t rateId) |
1732 |
MinstrelHtWifiManager::GetIndex (uint8_t groupId, uint8_t rateId) |
| 1733 |
{ |
1733 |
{ |
| 1734 |
NS_LOG_FUNCTION (this << +groupId << +rateId); |
1734 |
NS_LOG_FUNCTION (this << +groupId << +rateId); |
| 1735 |
uint8_t index; |
1735 |
uint16_t index; |
| 1736 |
index = groupId * m_numRates + rateId; |
1736 |
index = groupId * m_numRates + rateId; |
| 1737 |
return index; |
1737 |
return index; |
| 1738 |
} |
1738 |
} |
| 1739 |
|
1739 |
|
| 1740 |
uint8_t |
1740 |
uint8_t |
| 1741 |
MinstrelHtWifiManager::GetRateId (uint8_t index) |
1741 |
MinstrelHtWifiManager::GetRateId (uint16_t index) |
| 1742 |
{ |
1742 |
{ |
| 1743 |
NS_LOG_FUNCTION (this << +index); |
1743 |
NS_LOG_FUNCTION (this << index); |
| 1744 |
uint8_t id; |
1744 |
uint8_t id; |
| 1745 |
id = index % m_numRates; |
1745 |
id = index % m_numRates; |
| 1746 |
return id; |
1746 |
return id; |
| 1747 |
} |
1747 |
} |
| 1748 |
|
1748 |
|
| 1749 |
uint8_t |
1749 |
uint8_t |
| 1750 |
MinstrelHtWifiManager::GetGroupId (uint8_t index) |
1750 |
MinstrelHtWifiManager::GetGroupId (uint16_t index) |
| 1751 |
{ |
1751 |
{ |
| 1752 |
NS_LOG_FUNCTION (this << +index); |
1752 |
NS_LOG_FUNCTION (this << index); |
| 1753 |
return index / m_numRates; |
1753 |
return index / m_numRates; |
| 1754 |
} |
1754 |
} |
| 1755 |
|
1755 |
|
|
|
| 1767 |
return MAX_HT_STREAM_GROUPS * MAX_SUPPORTED_STREAMS + MAX_SUPPORTED_STREAMS * 2 * (chWidth == 160 ? 3 : chWidth == 80 ? 2 : chWidth == 40 ? 1 : 0) + MAX_SUPPORTED_STREAMS * sgi + txstreams - 1; |
1767 |
return MAX_HT_STREAM_GROUPS * MAX_SUPPORTED_STREAMS + MAX_SUPPORTED_STREAMS * 2 * (chWidth == 160 ? 3 : chWidth == 80 ? 2 : chWidth == 40 ? 1 : 0) + MAX_SUPPORTED_STREAMS * sgi + txstreams - 1; |
| 1768 |
} |
1768 |
} |
| 1769 |
|
1769 |
|
| 1770 |
uint8_t |
1770 |
uint16_t |
| 1771 |
MinstrelHtWifiManager::GetLowestIndex (MinstrelHtWifiRemoteStation *station) |
1771 |
MinstrelHtWifiManager::GetLowestIndex (MinstrelHtWifiRemoteStation *station) |
| 1772 |
{ |
1772 |
{ |
| 1773 |
NS_LOG_FUNCTION (this << station); |
1773 |
NS_LOG_FUNCTION (this << station); |
|
|
| 1786 |
return GetIndex (groupId, rateId); |
1786 |
return GetIndex (groupId, rateId); |
| 1787 |
} |
1787 |
} |
| 1788 |
|
1788 |
|
| 1789 |
uint8_t |
1789 |
uint16_t |
| 1790 |
MinstrelHtWifiManager::GetLowestIndex (MinstrelHtWifiRemoteStation *station, uint8_t groupId) |
1790 |
MinstrelHtWifiManager::GetLowestIndex (MinstrelHtWifiRemoteStation *station, uint8_t groupId) |
| 1791 |
{ |
1791 |
{ |
| 1792 |
NS_LOG_FUNCTION (this << station); |
1792 |
NS_LOG_FUNCTION (this << station << +groupId); |
| 1793 |
|
1793 |
|
| 1794 |
uint8_t rateId = 0; |
1794 |
uint8_t rateId = 0; |
| 1795 |
while (rateId < m_numRates && !station->m_groupsTable[groupId].m_ratesTable[rateId].supported) |
1795 |
while (rateId < m_numRates && !station->m_groupsTable[groupId].m_ratesTable[rateId].supported) |