wifi: Align behavior of WifiMac::GetTxopQueue to that of WifiMac::GetQosTxop

This commit is contained in:
Stefano Avallone
2022-03-04 13:37:55 +01:00
parent bd5a7b4ff1
commit e6709c8bee
2 changed files with 6 additions and 9 deletions

View File

@@ -492,13 +492,8 @@ WifiMac::GetBKQueue () const
Ptr<WifiMacQueue>
WifiMac::GetTxopQueue (AcIndex ac) const
{
if (ac == AC_BE_NQOS)
{
NS_ASSERT (m_txop != nullptr);
return m_txop->GetWifiMacQueue ();
}
NS_ASSERT (ac == AC_BE || ac == AC_BK || ac == AC_VI || ac == AC_VO);
return m_edca.find (ac)->second->GetWifiMacQueue ();
Ptr<Txop> txop = (ac == AC_BE_NQOS ? m_txop : StaticCast<Txop> (GetQosTxop (ac)));
return (txop != nullptr ? txop->GetWifiMacQueue () : nullptr);
}
void

View File

@@ -134,10 +134,12 @@ public:
*/
Ptr<QosTxop> GetQosTxop (uint8_t tid) const;
/**
* Get the wifi MAC queue of the (Qos)Txop associated with the given AC.
* Get the wifi MAC queue of the (Qos)Txop associated with the given AC,
* if such (Qos)Txop is installed, or a null pointer, otherwise.
*
* \param ac the given Access Category
* \return the wifi MAC queue of the (Qos)Txop associated with the given AC
* \return the wifi MAC queue of the (Qos)Txop associated with the given AC,
* if such (Qos)Txop is installed, or a null pointer, otherwise
*/
virtual Ptr<WifiMacQueue> GetTxopQueue (AcIndex ac) const;