@@ -645,6 +645,7 @@ mt76_txq_schedule_pending_wcid(struct mt76_phy *phy, struct mt76_wcid *wcid,
645645static void mt76_txq_schedule_pending (struct mt76_phy * phy )
646646{
647647 LIST_HEAD (tx_list );
648+ int ret = 0 ;
648649
649650 if (list_empty (& phy -> tx_list ))
650651 return ;
@@ -656,13 +657,13 @@ static void mt76_txq_schedule_pending(struct mt76_phy *phy)
656657 list_splice_init (& phy -> tx_list , & tx_list );
657658 while (!list_empty (& tx_list )) {
658659 struct mt76_wcid * wcid ;
659- int ret ;
660660
661661 wcid = list_first_entry (& tx_list , struct mt76_wcid , tx_list );
662662 list_del_init (& wcid -> tx_list );
663663
664664 spin_unlock (& phy -> tx_lock );
665- ret = mt76_txq_schedule_pending_wcid (phy , wcid , & wcid -> tx_offchannel );
665+ if (ret >= 0 )
666+ ret = mt76_txq_schedule_pending_wcid (phy , wcid , & wcid -> tx_offchannel );
666667 if (ret >= 0 && !phy -> offchannel )
667668 ret = mt76_txq_schedule_pending_wcid (phy , wcid , & wcid -> tx_pending );
668669 spin_lock (& phy -> tx_lock );
@@ -671,9 +672,6 @@ static void mt76_txq_schedule_pending(struct mt76_phy *phy)
671672 !skb_queue_empty (& wcid -> tx_offchannel ) &&
672673 list_empty (& wcid -> tx_list ))
673674 list_add_tail (& wcid -> tx_list , & phy -> tx_list );
674-
675- if (ret < 0 )
676- break ;
677675 }
678676 spin_unlock (& phy -> tx_lock );
679677
0 commit comments