[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:
Jonathan Hui
2022-05-20 13:02:37 -07:00
committed by GitHub
parent bffbebc646
commit 0f4531b22f
5 changed files with 2 additions and 9 deletions
+1 -1
View File
@@ -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
-1
View File
@@ -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.
*
-5
View File
@@ -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);
+1 -1
View File
@@ -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
-1
View File
@@ -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.
*
*/