at86rf2xx: cancel receiving when preparing for TX#3993
at86rf2xx: cancel receiving when preparing for TX#3993jnohlgard merged 1 commit intoRIOT-OS:masterfrom
Conversation
|
Good catch! I won't have time to test this tonight. Anyone with an at86rf2xx at the Hack'n'ACK, feel free to test on hardware and see if it still works. I guess the proper handling of the actual case described in the PR is kinda hard to verify in real life since it requires somewhat synchronized timing between the two nodes. (The CSMA hardware logic should make sure that the transceiver does not start to transmit before the remote node has finished sending its packet) |
|
So, I didn't write a test for that scenario but I can confirm that basic sending/receiving is still working with this PR (I used |
|
Green lights @gebart :-) ! |
|
ACK & go |
at86rf2xx: cancel receiving when preparing for TX
|
Isn't that a bug fix that should also go into the release? |
|
It's not really a bug. The outside behaviour is the same, except for slightly faster execution in a rare case (and no ACK reply). But there's no reason to not include it I'd say. You choose ;) |
When preparing the device for TX, i.e. switching to the right state, the driver busy waits until an RX operation is finished. According to the usage of this internal function, the frame buffer will be overwritten with the frame to send anyway, so waiting only wastes time.
Additionally when canceling an ongoing RX operation, sending an ACK is also prevented so that the sender won't assume a successful transmission.