wifi: Fix use of YansErrorRateModel for PHY headers
This commit is contained in:
@@ -32,6 +32,11 @@ bool operator == (const WifiMode &a, const WifiMode &b)
|
||||
return a.GetUid () == b.GetUid ();
|
||||
}
|
||||
|
||||
bool operator != (const WifiMode &a, const WifiMode &b)
|
||||
{
|
||||
return a.GetUid () != b.GetUid ();
|
||||
}
|
||||
|
||||
bool operator < (const WifiMode &a, const WifiMode &b)
|
||||
{
|
||||
return a.GetUid () < b.GetUid ();
|
||||
|
||||
@@ -222,6 +222,18 @@ private:
|
||||
* false otherwise
|
||||
*/
|
||||
bool operator == (const WifiMode &a, const WifiMode &b);
|
||||
|
||||
/**
|
||||
* Check if the two WifiModes are different.
|
||||
*
|
||||
* \param a WifiMode
|
||||
* \param b WifiMode
|
||||
*
|
||||
* \return true if the two WifiModes are different,
|
||||
* false otherwise
|
||||
*/
|
||||
bool operator != (const WifiMode &a, const WifiMode &b);
|
||||
|
||||
/**
|
||||
* Compare two WifiModes
|
||||
*
|
||||
@@ -232,6 +244,7 @@ bool operator == (const WifiMode &a, const WifiMode &b);
|
||||
* false otherwise
|
||||
*/
|
||||
bool operator < (const WifiMode &a, const WifiMode &b);
|
||||
|
||||
/**
|
||||
* Serialize WifiMode to ostream (human-readable).
|
||||
*
|
||||
|
||||
@@ -189,9 +189,9 @@ YansErrorRateModel::DoGetChunkSuccessRate (WifiMode mode, const WifiTxVector& tx
|
||||
|| mode.GetModulationClass () == WIFI_MOD_CLASS_HE)
|
||||
{
|
||||
uint64_t phyRate;
|
||||
if (txVector.IsMu () && (staId == SU_STA_ID))
|
||||
if ((mode != txVector.GetMode ()) || (txVector.IsMu () && (staId == SU_STA_ID)))
|
||||
{
|
||||
phyRate = mode.GetPhyRate (20); //This is the PHY header: consider 20 MHz to calculate the PHY rate
|
||||
phyRate = mode.GetPhyRate (txVector.GetChannelWidth () >= 40 ? 20 : txVector.GetChannelWidth ()); //This is the PHY header
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user