Bugzilla – Bug 1282
Sleep state and CCA
Last modified: 2012-02-23 11:17:52 UTC
Created attachment 1257 [details] Mods to the UanPhyGen::SetSleepMode method Hello, There is a problem with the UanPhyGen::SetSleepMode (bool) method, when called in the middle of a Tx. Suppose the following: - The Phy layer is in the middle of a Tx. - For some reason, the upper layer calls SetSleepMode with the bool parameter set to false. This will change the m_state variable from TX to IDLE. - When the transmission finishes, an error will be thrown at TxEndEvent line 558 since m_state has changed. I propose checking the m_state variable before changing the state. Another problem comes with the wakeup procedure. When the phy layer wakes up it starts at the IDLE state. Instead, I think the channel should be listened first and switch to the CCABUSY state if appropriate. I'm attaching a patch with the modifications.
Hi Salva, can you please give a test code to reproduce the bug? Thanks, Andrea
Created attachment 1325 [details] Test Code
You can find attached the test code.
Fixed changeset 7738 fe52cb6371f2 Thanks Salva