View | Details | Raw Unified | Return to bug 2320
Collapse All | Expand All

(-)a/src/wifi/model/wifi-phy.cc (+36 lines)
 Lines 1559-1564    Link Here 
1559
  return mcs;
1559
  return mcs;
1560
}
1560
}
1561
1561
1562
bool
1563
WifiPhy::IsValidTxVector (WifiTxVector txVector)
1564
{
1565
  uint32_t chWidth = txVector.GetChannelWidth();
1566
  uint8_t nss = txVector.GetNss();
1567
  std::string modeName = txVector.GetMode().GetUniqueName();
1568
1569
  if (chWidth == 20)
1570
    {
1571
      if (nss != 3 && nss != 6)
1572
        {
1573
          return (modeName != "VhtMcs9");
1574
        }
1575
    }
1576
  else if (chWidth == 80)
1577
    {
1578
      if (nss == 3 || nss == 7)
1579
        {
1580
          return (modeName != "VhtMcs6");
1581
        }
1582
      else if (nss == 6)
1583
        {
1584
          return (modeName != "VhtMcs9");
1585
        }
1586
    }
1587
  else if (chWidth == 160)
1588
    {
1589
      if (nss == 3)
1590
        {
1591
          return (modeName != "VhtMcs9");
1592
        }
1593
    }
1594
1595
  return true;
1596
}
1597
1562
std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state)
1598
std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state)
1563
{
1599
{
1564
  switch (state)
1600
  switch (state)
(-)a/src/wifi/model/wifi-phy.h (+9 lines)
 Lines 1056-1061    Link Here 
1056
   * \return MCS 9 from VHT MCS values
1056
   * \return MCS 9 from VHT MCS values
1057
   */
1057
   */
1058
  static WifiMode GetVhtMcs9 ();
1058
  static WifiMode GetVhtMcs9 ();
1059
  /**
1060
   * The standard disallows certain combinations of WifiMode, number of
1061
   * spatial streams, and channel widths.  This method can be used to
1062
   * check whether this WifiTxVector contains an invalid combination.
1063
   *
1064
   * \param txVector the WifiTxVector to inspect
1065
   * \return true if the WifiTxVector parameters are allowed by the standard
1066
   */
1067
  static bool IsValidTxVector (WifiTxVector txVector);
1059
1068
1060
  /**
1069
  /**
1061
   * Public method used to fire a PhyTxBegin trace.
1070
   * Public method used to fire a PhyTxBegin trace.

Return to bug 2320