Enhance transmit done callback by passing up the ACK frame (#1790)

* Add new otPlatRadioTxDone() callback which will pass up ACK frame

* The passed up ACK messages are also used for link quality evaluation

* The new feature are supported by the following platforms with this commit:
    - posix
    - cc2538
    - efr32
    - da15000

* The new feature are not supported by the following platforms at this moment,
  since their radio drivers do not pass up ACK frame:
    - cc2650
    - nrf52840
    - kw41z
    - emsk
This commit is contained in:
Shu Chen
2017-05-26 14:14:05 -07:00
committed by Jonathan Hui
parent 012015e351
commit 40ff2d8973
14 changed files with 214 additions and 30 deletions
+9 -1
View File
@@ -594,7 +594,15 @@ otLwfRadioTransmitFrameDone(
pFilter->otLastTransmitError = OT_ERROR_ABORT;
}
otPlatRadioTransmitDone(pFilter->otCtx, &pFilter->otTransmitFrame, pFilter->otLastTransmitFramePending, pFilter->otLastTransmitError);
if (((pFilter->otTransmitFrame.mPsdu[0] & IEEE802154_ACK_REQUEST) == 0) ||
pFilter->otLastTransmitError != OT_ERROR_NONE)
{
otPlatRadioTxDone(pFilter->otCtx, &pFilter->otTransmitFrame, NULL, pFilter->otLastTransmitError);
}
else
{
otPlatRadioTxDone(pFilter->otCtx, &pFilter->otTransmitFrame, &pFilter->otReceiveFrame, pFilter->otLastTransmitError);
}
}
LogFuncExit(DRIVER_DATA_PATH);