mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
[mac] remove duplicated method for getting the MAC frame length (#9254)
This commit is contained in:
@@ -1214,7 +1214,7 @@ void TxFrame::CopyFrom(const TxFrame &aFromFrame)
|
||||
// different FCS size. We adjust the PSDU length after the
|
||||
// copy to account for this.
|
||||
|
||||
SetLength(aFromFrame.GetPsduLength() - aFromFrame.GetFcsSize() + GetFcsSize());
|
||||
SetLength(aFromFrame.GetLength() - aFromFrame.GetFcsSize() + GetFcsSize());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -784,7 +784,7 @@ public:
|
||||
bool IsDataRequestCommand(void) const;
|
||||
|
||||
/**
|
||||
* Returns the MAC Frame Length.
|
||||
* Returns the MAC Frame Length, namely the IEEE 802.15.4 PSDU length.
|
||||
*
|
||||
* @returns The MAC Frame Length.
|
||||
*
|
||||
@@ -845,14 +845,6 @@ public:
|
||||
*/
|
||||
uint8_t GetChannel(void) const { return mChannel; }
|
||||
|
||||
/**
|
||||
* Returns the IEEE 802.15.4 PSDU length.
|
||||
*
|
||||
* @returns The IEEE 802.15.4 PSDU length.
|
||||
*
|
||||
*/
|
||||
uint16_t GetPsduLength(void) const { return mLength; }
|
||||
|
||||
/**
|
||||
* Returns a pointer to the PSDU.
|
||||
*
|
||||
|
||||
@@ -51,7 +51,7 @@ void Radio::Callbacks::HandleTransmitStarted(Mac::TxFrame &aFrame) { Get<Mac::Su
|
||||
void Radio::Callbacks::HandleTransmitDone(Mac::TxFrame &aFrame, Mac::RxFrame *aAckFrame, Error aError)
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_RADIO_STATS_ENABLE && (OPENTHREAD_FTD || OPENTHREAD_MTD)
|
||||
Get<RadioStatistics>().RecordTxDone(aError, aFrame.GetPsduLength());
|
||||
Get<RadioStatistics>().RecordTxDone(aError, aFrame.GetLength());
|
||||
#endif
|
||||
Get<Mac::SubMac>().HandleTransmitDone(aFrame, aAckFrame, aError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user