[mac] remove duplicated method for getting the MAC frame length (#9254)

This commit is contained in:
Eduardo Montoya
2023-07-05 19:02:11 +02:00
committed by GitHub
parent 4eace79c98
commit cc6fa77b42
3 changed files with 3 additions and 11 deletions
+1 -1
View File
@@ -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
}
+1 -9
View File
@@ -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.
*
+1 -1
View File
@@ -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);
}