mirror of
https://github.com/espressif/openthread.git
synced 2026-08-25 11:49:51 +00:00
Fix scanning behavior. Change logic around otPlatRadioGetTransmitBuffer. (#942)
* Fix scanning behavior with default channel. Change logic around otPlatRadioGetTransmitBuffer so that the buffer becomes the property of OT post call. The MAC will keep a pointer to the tx buffer and pass it into otPlatRadioTransmit. This change should make the notion of retrying the transmit operation with the same buffer more intuitive.
This commit is contained in:
@@ -354,16 +354,18 @@ RadioPacket *otPlatRadioGetTransmitBuffer(otInstance *aInstance);
|
||||
* 2. Transmits the psdu on the given channel and at the given transmit power.
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance structure.
|
||||
* @param[in] aPacket A pointer to the packet that will be transmitted.
|
||||
*
|
||||
* @retval ::kThreadError_None Successfully transitioned to Transmit.
|
||||
* @retval ::kThreadError_InvalidState The radio was not in the Receive state.
|
||||
*/
|
||||
ThreadError otPlatRadioTransmit(otInstance *aInstance);
|
||||
ThreadError otPlatRadioTransmit(otInstance *aInstance, RadioPacket *aPacket);
|
||||
|
||||
/**
|
||||
* The radio driver calls this method to notify OpenThread that the transmission has completed.
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance structure.
|
||||
* @param[in] aPacket A pointer to the packet that was transmitted.
|
||||
* @param[in] aFramePending TRUE if an ACK frame was received and the Frame Pending bit was set.
|
||||
* @param[in] aError ::kThreadError_None when the frame was transmitted, ::kThreadError_NoAck when the frame was
|
||||
* transmitted but no ACK was received, ::kThreadError_ChannelAccessFailure when the transmission
|
||||
@@ -371,7 +373,8 @@ ThreadError otPlatRadioTransmit(otInstance *aInstance);
|
||||
* aborted for other reasons.
|
||||
*
|
||||
*/
|
||||
extern void otPlatRadioTransmitDone(otInstance *aInstance, bool aFramePending, ThreadError aError);
|
||||
extern void otPlatRadioTransmitDone(otInstance *aInstance, RadioPacket *aPacket, bool aFramePending,
|
||||
ThreadError aError);
|
||||
|
||||
/**
|
||||
* Get the most recent RSSI measurement.
|
||||
@@ -413,6 +416,7 @@ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable);
|
||||
* The radio driver calls this method to notify OpenThread diagnostics module that the transmission has completed.
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance structure.
|
||||
* @param[in] aPacket A pointer to the packet that was transmitted.
|
||||
* @param[in] aFramePending TRUE if an ACK frame was received and the Frame Pending bit was set.
|
||||
* @param[in] aError ::kThreadError_None when the frame was transmitted, ::kThreadError_NoAck when the frame was
|
||||
* transmitted but no ACK was received, ::kThreadError_ChannelAccessFailure when the transmission
|
||||
@@ -420,7 +424,8 @@ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable);
|
||||
* aborted for other reasons.
|
||||
*
|
||||
*/
|
||||
extern void otPlatDiagRadioTransmitDone(otInstance *aInstance, bool aFramePending, ThreadError aError);
|
||||
extern void otPlatDiagRadioTransmitDone(otInstance *aInstance, RadioPacket *aPacket, bool aFramePending,
|
||||
ThreadError aError);
|
||||
|
||||
/**
|
||||
* The radio driver calls this method to notify OpenThread diagnostics module of a received packet.
|
||||
|
||||
Reference in New Issue
Block a user