From f29a2f1257975535f210be767ceb5f8b78d07f54 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Fri, 27 Sep 2019 10:19:43 -0700 Subject: [PATCH] [mac] prioritize a pending poll tx after handling of frame tx (#4211) This commit ensures to prioritize a pending poll tx request after handling a (direct) frame tx request. This addresses the situation where back-to-back frame tx requests could have delayed a data poll tx request. --- src/core/mac/mac.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index feafc03ba..010476f60 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -738,6 +738,13 @@ void Mac::PerformNextOperation(void) { mPendingTransmitDataDirect = false; mOperation = kOperationTransmitDataDirect; + + if (mPendingTransmitPoll) + { + // Ensure that a pending "transmit poll" operation request + // is prioritized over any future "transmit data" requests. + mShouldTxPollBeforeData = true; + } } if (mOperation != kOperationIdle)