When ops->xmit() fails, immediately retry. Previously the packet was sent to the back of the workqueue.
Signed-off-by: Alan Ott <a...@signal11.us> --- net/mac802154/tx.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index 4e09d07..fbf937c 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c @@ -59,19 +59,18 @@ static void mac802154_xmit_worker(struct work_struct *work) } } - res = xw->priv->ops->xmit(&xw->priv->hw, xw->skb); + do { + res = xw->priv->ops->xmit(&xw->priv->hw, xw->skb); + if (res && ++xw->xmit_attempts >= MAC802154_MAX_XMIT_ATTEMPTS) { + pr_debug("transmission failed for %d times", + MAC802154_MAX_XMIT_ATTEMPTS); + break; + } + } while (res); out: mutex_unlock(&xw->priv->phy->pib_lock); - if (res) { - if (xw->xmit_attempts++ < MAC802154_MAX_XMIT_ATTEMPTS) { - queue_work(xw->priv->dev_workqueue, &xw->work); - return; - } else - pr_debug("transmission failed for %d times", - MAC802154_MAX_XMIT_ATTEMPTS); - } dev_kfree_skb(xw->skb); -- 1.7.11.2 ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel