mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 23:57:46 +00:00
[data-poll-sender] return kErrorNone when Data Request is already enqueued (#7725)
There are no use cases where `kErrorAlready` is useful.
This commit is contained in:
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (209)
|
||||
#define OPENTHREAD_API_VERSION (210)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -486,7 +486,6 @@ bool otLinkIsEnergyScanInProgress(otInstance *aInstance);
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @retval OT_ERROR_NONE Successfully enqueued an IEEE 802.15.4 Data Request message.
|
||||
* @retval OT_ERROR_ALREADY An IEEE 802.15.4 Data Request message is already enqueued.
|
||||
* @retval OT_ERROR_INVALID_STATE Device is not in rx-off-when-idle mode.
|
||||
* @retval OT_ERROR_NO_BUFS Insufficient message buffers available.
|
||||
*
|
||||
|
||||
@@ -123,11 +123,6 @@ exit:
|
||||
StopPolling();
|
||||
break;
|
||||
|
||||
case kErrorAlready:
|
||||
LogDebg("Data poll tx requested when a previous data request still in send queue.");
|
||||
ScheduleNextPoll(kUsePreviousPollPeriod);
|
||||
break;
|
||||
|
||||
default:
|
||||
LogWarn("Unexpected error %s requesting data poll", ErrorToString(error));
|
||||
ScheduleNextPoll(kRecalculatePollPeriod);
|
||||
|
||||
@@ -482,7 +482,7 @@ Error Mac::RequestDataPollTransmission(void)
|
||||
Error error = kErrorNone;
|
||||
|
||||
VerifyOrExit(IsEnabled(), error = kErrorInvalidState);
|
||||
VerifyOrExit(!IsActiveOrPending(kOperationTransmitPoll), error = kErrorAlready);
|
||||
VerifyOrExit(!IsActiveOrPending(kOperationTransmitPoll));
|
||||
|
||||
// We ensure data frame and data poll tx requests are handled in the
|
||||
// order they are requested. So if we have a pending direct data frame
|
||||
|
||||
@@ -228,7 +228,6 @@ public:
|
||||
* This method requests transmission of a data poll (MAC Data Request) frame.
|
||||
*
|
||||
* @retval kErrorNone Data poll transmission request is scheduled successfully.
|
||||
* @retval kErrorAlready MAC is busy sending earlier poll transmission request.
|
||||
* @retval kErrorInvalidState The MAC layer is not enabled.
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user