@@ -646,6 +646,7 @@ mt76_txq_schedule_pending_wcid(struct mt76_phy *phy, struct mt76_wcid *wcid,
646
646
static void mt76_txq_schedule_pending (struct mt76_phy * phy )
647
647
{
648
648
LIST_HEAD (tx_list );
649
+ int ret = 0 ;
649
650
650
651
if (list_empty (& phy -> tx_list ))
651
652
return ;
@@ -657,13 +658,13 @@ static void mt76_txq_schedule_pending(struct mt76_phy *phy)
657
658
list_splice_init (& phy -> tx_list , & tx_list );
658
659
while (!list_empty (& tx_list )) {
659
660
struct mt76_wcid * wcid ;
660
- int ret ;
661
661
662
662
wcid = list_first_entry (& tx_list , struct mt76_wcid , tx_list );
663
663
list_del_init (& wcid -> tx_list );
664
664
665
665
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 );
667
668
if (ret >= 0 && !phy -> offchannel )
668
669
ret = mt76_txq_schedule_pending_wcid (phy , wcid , & wcid -> tx_pending );
669
670
spin_lock (& phy -> tx_lock );
@@ -672,9 +673,6 @@ static void mt76_txq_schedule_pending(struct mt76_phy *phy)
672
673
!skb_queue_empty (& wcid -> tx_offchannel ) &&
673
674
list_empty (& wcid -> tx_list ))
674
675
list_add_tail (& wcid -> tx_list , & phy -> tx_list );
675
-
676
- if (ret < 0 )
677
- break ;
678
676
}
679
677
spin_unlock (& phy -> tx_lock );
680
678
0 commit comments