net: openthread: propagate security and header updated flags
When transmitting a frame, inform the radio driver whether security processing and/or header updates are needed or not. When a frame was transmitted, inform back to OpenThread whether the security procedure and/or header updates were completed for the frame or not. Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
This commit is contained in:
parent
6c699239f9
commit
4b4e298914
@ -272,6 +272,10 @@ void transmit_message(struct k_work *tx_job)
|
||||
radio_api->set_channel(radio_dev, sTransmitFrame.mChannel);
|
||||
radio_api->set_txpower(radio_dev, tx_power);
|
||||
|
||||
net_pkt_set_ieee802154_frame_secured(tx_pkt,
|
||||
sTransmitFrame.mInfo.mTxInfo.mIsSecurityProcessed);
|
||||
net_pkt_set_ieee802154_mac_hdr_rdy(tx_pkt, sTransmitFrame.mInfo.mTxInfo.mIsHeaderUpdated);
|
||||
|
||||
if ((radio_api->get_capabilities(radio_dev) & IEEE802154_HW_TXTIME) &&
|
||||
(sTransmitFrame.mInfo.mTxInfo.mTxDelay != 0)) {
|
||||
uint64_t tx_at = sTransmitFrame.mInfo.mTxInfo.mTxDelayBaseTime +
|
||||
@ -325,6 +329,10 @@ void transmit_message(struct k_work *tx_job)
|
||||
|
||||
static inline void handle_tx_done(otInstance *aInstance)
|
||||
{
|
||||
sTransmitFrame.mInfo.mTxInfo.mIsSecurityProcessed =
|
||||
net_pkt_ieee802154_frame_secured(tx_pkt);
|
||||
sTransmitFrame.mInfo.mTxInfo.mIsHeaderUpdated = net_pkt_ieee802154_mac_hdr_rdy(tx_pkt);
|
||||
|
||||
if (IS_ENABLED(CONFIG_OPENTHREAD_DIAG) && otPlatDiagModeGet()) {
|
||||
otPlatDiagRadioTransmitDone(aInstance, &sTransmitFrame, tx_result);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user