@@ -646,6 +646,7 @@ mt76_txq_schedule_pending_wcid(struct mt76_phy *phy, struct mt76_wcid *wcid,
646646static void mt76_txq_schedule_pending (struct mt76_phy * phy )
647647{
648648 LIST_HEAD (tx_list );
649+ int ret = 0 ;
649650
650651 if (list_empty (& phy -> tx_list ))
651652 return ;
@@ -657,13 +658,13 @@ static void mt76_txq_schedule_pending(struct mt76_phy *phy)
657658 list_splice_init (& phy -> tx_list , & tx_list );
658659 while (!list_empty (& tx_list )) {
659660 struct mt76_wcid * wcid ;
660- int ret ;
661661
662662 wcid = list_first_entry (& tx_list , struct mt76_wcid , tx_list );
663663 list_del_init (& wcid -> tx_list );
664664
665665 spin_unlock (& phy -> tx_lock );
666- ret = mt76_txq_schedule_pending_wcid (phy , wcid , & wcid -> tx_offchannel );
666+ if (ret >= 0 )
667+ ret = mt76_txq_schedule_pending_wcid (phy , wcid , & wcid -> tx_offchannel );
667668 if (ret >= 0 && !phy -> offchannel )
668669 ret = mt76_txq_schedule_pending_wcid (phy , wcid , & wcid -> tx_pending );
669670 spin_lock (& phy -> tx_lock );
@@ -672,9 +673,6 @@ static void mt76_txq_schedule_pending(struct mt76_phy *phy)
672673 !skb_queue_empty (& wcid -> tx_offchannel ) &&
673674 list_empty (& wcid -> tx_list ))
674675 list_add_tail (& wcid -> tx_list , & phy -> tx_list );
675-
676- if (ret < 0 )
677- break ;
678676 }
679677 spin_unlock (& phy -> tx_lock );
680678
0 commit comments