diff -r f8f2a9d65576 src/devices/wifi/yans-wifi-phy.cc --- a/src/devices/wifi/yans-wifi-phy.cc Wed Mar 10 11:11:38 2010 +0100 +++ b/src/devices/wifi/yans-wifi-phy.cc Mon Mar 15 13:19:52 2010 +1100 @@ -726,7 +726,7 @@ { NS_ASSERT (m_txPowerBaseDbm <= m_txPowerEndDbm); NS_ASSERT (m_nTxPower > 0); - double dbm = m_txPowerBaseDbm + power * (m_txPowerEndDbm - m_txPowerBaseDbm) / m_nTxPower; + double dbm = m_txPowerBaseDbm + power * (m_txPowerEndDbm - m_txPowerBaseDbm) / (m_nTxPower == 1 ? 1 : m_nTxPower - 1); return dbm; }