Bug 2025 - (lr-wpan) Changing the channel doesn't affect the Tx params
authorTommaso Pecorella <tommaso.pecorella@unifi.it>
Sun, 15 Mar 2015 09:14:50 +0100
changeset 11232 865dcb3bf5a0
parent 11231 62ce11a18acd
child 11233 27a4e883d58f
Bug 2025 - (lr-wpan) Changing the channel doesn't affect the Tx params
RELEASE_NOTES
src/lr-wpan/model/lr-wpan-phy.cc
--- a/RELEASE_NOTES	Sun Mar 15 08:41:59 2015 +0100
+++ b/RELEASE_NOTES	Sun Mar 15 09:14:50 2015 +0100
@@ -28,9 +28,10 @@
 Bugs fixed
 ----------
 - Bug 1974 - CalculateTxTime should return a Time, not a double
+- Bug 2025 - (lr-wpan) Changing the channel doesn't affect the Tx params
 - Bug 2070 - Wrong report of Packets and Bytes stored in CoDeL
 - Bug 2073 - NDisc cache entries update timer might be stuck in a loop
-- Bug 2076 - MinRTO Attribute is not actually used
+- Bug 2076 - TCP MinRTO Attribute is not actually used
 - Bug 2077 - Icmpv6L4Protocol::HandleDestinationUnreachable must check the packet size, not its serialized size
 
 Known issues
--- a/src/lr-wpan/model/lr-wpan-phy.cc	Sun Mar 15 08:41:59 2015 +0100
+++ b/src/lr-wpan/model/lr-wpan-phy.cc	Sun Mar 15 09:14:50 2015 +0100
@@ -898,7 +898,7 @@
           }
         if (m_phyPIBAttributes.phyCurrentChannel != attribute->phyCurrentChannel)
           {
-            // Cancel a pending tranceiver state change.
+            // Cancel a pending transceiver state change.
             // Switch off the transceiver.
             // TODO: Is switching off the transceiver the right choice?
             m_trxState = IEEE_802_15_4_PHY_TRX_OFF;
@@ -928,6 +928,8 @@
                   }
               }
             m_phyPIBAttributes.phyCurrentChannel = attribute->phyCurrentChannel;
+            LrWpanSpectrumValueHelper psdHelper;
+            m_txPsd = psdHelper.CreateTxPowerSpectralDensity (m_phyPIBAttributes.phyTransmitPower, m_phyPIBAttributes.phyCurrentChannel);
           }
         break;
       }