|
|
| 535 |
} |
535 |
} |
| 536 |
if (m_qosSupported) |
536 |
if (m_qosSupported) |
| 537 |
{ |
537 |
{ |
|
|
538 |
bool qosSupported = false; |
| 538 |
EdcaParameterSet edcaParameters = beacon.GetEdcaParameterSet (); |
539 |
EdcaParameterSet edcaParameters = beacon.GetEdcaParameterSet (); |
| 539 |
//The value of the TXOP Limit field is specified as an unsigned integer, with the least significant octet transmitted first, in units of 32 μs. |
540 |
if (edcaParameters.IsQosSupported ()) |
| 540 |
SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit())); |
541 |
{ |
| 541 |
SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit())); |
542 |
qosSupported = true; |
| 542 |
SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit())); |
543 |
//The value of the TXOP Limit field is specified as an unsigned integer, with the least significant octet transmitted first, in units of 32 μs. |
| 543 |
SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit())); |
544 |
SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit())); |
|
|
545 |
SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit())); |
| 546 |
SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit())); |
| 547 |
SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit())); |
| 548 |
} |
| 549 |
m_stationManager->SetQosSupport (hdr->GetAddr2 (), qosSupported); |
| 544 |
} |
550 |
} |
| 545 |
if (m_htSupported) |
551 |
if (m_htSupported) |
| 546 |
{ |
552 |
{ |
| 547 |
HtCapabilities htcapabilities = beacon.GetHtCapabilities (); |
553 |
HtCapabilities htCapabilities = beacon.GetHtCapabilities (); |
| 548 |
m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htcapabilities); |
554 |
if (!htCapabilities.IsSupportedMcs (0)) |
|
|
555 |
{ |
| 556 |
m_stationManager->RemoveAllSupportedMcs (hdr->GetAddr2 ()); |
| 557 |
} |
| 558 |
else |
| 559 |
{ |
| 560 |
m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htCapabilities); |
| 561 |
} |
| 549 |
} |
562 |
} |
| 550 |
if (m_vhtSupported) |
563 |
if (m_vhtSupported) |
| 551 |
{ |
564 |
{ |
| 552 |
VhtCapabilities vhtcapabilities = beacon.GetVhtCapabilities (); |
565 |
VhtCapabilities vhtCapabilities = beacon.GetVhtCapabilities (); |
| 553 |
m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtcapabilities); |
566 |
//we will always fill in RxHighestSupportedLgiDataRate field at TX, so this can be used to check whether it supports VHT |
|
|
567 |
if (vhtCapabilities.GetRxHighestSupportedLgiDataRate () > 0) |
| 568 |
{ |
| 569 |
m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtCapabilities); |
| 570 |
} |
| 554 |
} |
571 |
} |
| 555 |
m_stationManager->SetShortPreambleEnabled (isShortPreambleEnabled); |
572 |
m_stationManager->SetShortPreambleEnabled (isShortPreambleEnabled); |
| 556 |
m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ()); |
573 |
m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ()); |
|
|
| 702 |
m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ()); |
719 |
m_stationManager->SetShortSlotTimeEnabled (capabilities.IsShortSlotTime ()); |
| 703 |
if (m_qosSupported) |
720 |
if (m_qosSupported) |
| 704 |
{ |
721 |
{ |
|
|
722 |
bool qosSupported = false; |
| 705 |
EdcaParameterSet edcaParameters = assocResp.GetEdcaParameterSet (); |
723 |
EdcaParameterSet edcaParameters = assocResp.GetEdcaParameterSet (); |
| 706 |
//The value of the TXOP Limit field is specified as an unsigned integer, with the least significant octet transmitted first, in units of 32 μs. |
724 |
if (edcaParameters.IsQosSupported ()) |
| 707 |
SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit())); |
725 |
{ |
| 708 |
SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit())); |
726 |
qosSupported = true; |
| 709 |
SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit())); |
727 |
//The value of the TXOP Limit field is specified as an unsigned integer, with the least significant octet transmitted first, in units of 32 μs. |
| 710 |
SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit())); |
728 |
SetEdcaParameters (AC_BE, edcaParameters.GetBeCWmin(), edcaParameters.GetBeCWmax(), edcaParameters.GetBeAifsn(), 32 * MicroSeconds (edcaParameters.GetBeTXOPLimit())); |
|
|
729 |
SetEdcaParameters (AC_BK, edcaParameters.GetBkCWmin(), edcaParameters.GetBkCWmax(), edcaParameters.GetBkAifsn(), 32 * MicroSeconds (edcaParameters.GetBkTXOPLimit())); |
| 730 |
SetEdcaParameters (AC_VI, edcaParameters.GetViCWmin(), edcaParameters.GetViCWmax(), edcaParameters.GetViAifsn(), 32 * MicroSeconds (edcaParameters.GetViTXOPLimit())); |
| 731 |
SetEdcaParameters (AC_VO, edcaParameters.GetVoCWmin(), edcaParameters.GetVoCWmax(), edcaParameters.GetVoAifsn(), 32 * MicroSeconds (edcaParameters.GetVoTXOPLimit())); |
| 732 |
} |
| 733 |
m_stationManager->SetQosSupport (hdr->GetAddr2 (), qosSupported); |
| 711 |
} |
734 |
} |
| 712 |
if (m_htSupported) |
735 |
if (m_htSupported) |
| 713 |
{ |
736 |
{ |
| 714 |
HtCapabilities htcapabilities = assocResp.GetHtCapabilities (); |
737 |
HtCapabilities htCapabilities = assocResp.GetHtCapabilities (); |
| 715 |
HtOperation htOperation = assocResp.GetHtOperation (); |
738 |
if (!htCapabilities.IsSupportedMcs (0)) |
| 716 |
m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htcapabilities); |
739 |
{ |
|
|
740 |
m_stationManager->RemoveAllSupportedMcs (hdr->GetAddr2 ()); |
| 741 |
} |
| 742 |
else |
| 743 |
{ |
| 744 |
m_stationManager->AddStationHtCapabilities (hdr->GetAddr2 (), htCapabilities); |
| 745 |
HtOperation htOperation = assocResp.GetHtOperation (); |
| 746 |
} |
| 717 |
} |
747 |
} |
| 718 |
if (m_vhtSupported) |
748 |
if (m_vhtSupported) |
| 719 |
{ |
749 |
{ |
| 720 |
VhtCapabilities vhtcapabilities = assocResp.GetVhtCapabilities (); |
750 |
VhtCapabilities vhtCapabilities = assocResp.GetVhtCapabilities (); |
| 721 |
VhtOperation vhtOperation = assocResp.GetVhtOperation (); |
751 |
//we will always fill in RxHighestSupportedLgiDataRate field at TX, so this can be used to check whether it supports VHT |
| 722 |
m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtcapabilities); |
752 |
if (vhtCapabilities.GetRxHighestSupportedLgiDataRate () > 0) |
|
|
753 |
{ |
| 754 |
m_stationManager->AddStationVhtCapabilities (hdr->GetAddr2 (), vhtCapabilities); |
| 755 |
VhtOperation vhtOperation = assocResp.GetVhtOperation (); |
| 756 |
} |
| 723 |
} |
757 |
} |
| 724 |
|
758 |
|
| 725 |
for (uint32_t i = 0; i < m_phy->GetNModes (); i++) |
759 |
for (uint32_t i = 0; i < m_phy->GetNModes (); i++) |