[mac] remove mDidTx from otRadioFrame (#3520)

mDidTx indicates whether a frame is received or transmitted, which is
only useful for capturing packets. This commit removes this field, and makes
this flag an argument to the pcap callback.
This commit is contained in:
Yakun Xu
2019-01-28 12:31:15 -08:00
committed by Jonathan Hui
parent 7789b90f23
commit 504331eadd
9 changed files with 21 additions and 34 deletions
+2 -1
View File
@@ -722,10 +722,11 @@ OTAPI const otMacCounters *OTCALL otLinkGetCounters(otInstance *aInstance);
* @note This callback is called before IEEE 802.15.4 security processing.
*
* @param[in] aFrame A pointer to the received IEEE 802.15.4 frame.
* @param[in] aIsTx Whether this frame is transmitted, not received.
* @param[in] aContext A pointer to application-specific context.
*
*/
typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, void *aContext);
typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void *aContext);
/**
* This function registers a callback to provide received raw IEEE 802.15.4 frames.
+4 -5
View File
@@ -153,11 +153,10 @@ typedef struct otRadioIeInfo
*/
typedef struct otRadioFrame
{
uint8_t * mPsdu; ///< The PSDU.
uint8_t mLength; ///< Length of the PSDU.
uint8_t mChannel; ///< Channel used to transmit/receive the frame.
bool mDidTx : 1; ///< Set to true if this frame sent from the radio. Ignored by radio driver.
otRadioIeInfo *mIeInfo; ///< The pointer to the Header IE(s) related information.
uint8_t * mPsdu; ///< The PSDU.
uint8_t mLength; ///< Length of the PSDU.
uint8_t mChannel; ///< Channel used to transmit/receive the frame.
otRadioIeInfo *mIeInfo; ///< The pointer to the Header IE(s) related information.
/**
* The union of transmit and receive information for a radio frame.