Bugzilla – Bug 2030
default values for WifiTxVector
Last modified: 2014-12-19 21:30:02 EST
The WifiTxVector class encapsulate various transmission parameters passed to the PHY. The patch to bug 2026 exposed a valgrind warning for using an uninitialized value in the mesh code. Basically, the problem is that some values should not be used before being initialized, but the mesh code (airtime-metric.cc) is creating some objects with the constructor that provides no arguments: WifiTxVector txVector; txVector.SetMode (mode) but not setting the other values before later using txVector. One solution is to provide default member initializers, but a couple of the variables (mode and txPowerLevel) don't seem to have reasonable defaults. So, the code should enforce that they are not used before being set either by the constructor that accepts arguments, or by explicitly using the Set() methods. a brief off-list discussion with Ghada and Sebastien resulted in some consensus to provide non-MIMO defults for m_retries (0), m_shortGuardInterval (false), m_nss (1), m_ness (0), and m_stbc (false), but to require explicit setting of m_mode and m_txPowerLevel before those getters could be used. suggested patch to fix is forthcoming...
Created attachment 1934 [details] patch to fix
fixed in changeset: 11115:ee55cea92a18