@@ -466,7 +466,6 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
466
466
return ;
467
467
468
468
rcu_read_lock ();
469
- mt76_tx_status_lock (mdev , & list );
470
469
471
470
if (stat -> wcid < ARRAY_SIZE (dev -> mt76 .wcid ))
472
471
wcid = rcu_dereference (dev -> mt76 .wcid [stat -> wcid ]);
@@ -479,6 +478,8 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
479
478
drv_priv );
480
479
}
481
480
481
+ mt76_tx_status_lock (mdev , & list );
482
+
482
483
if (wcid ) {
483
484
if (stat -> pktid >= MT_PACKET_ID_FIRST )
484
485
status .skb = mt76_tx_status_skb_get (mdev , wcid ,
@@ -498,7 +499,9 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
498
499
if (* update == 0 && stat_val == stat_cache &&
499
500
stat -> wcid == msta -> status .wcid && msta -> n_frames < 32 ) {
500
501
msta -> n_frames ++ ;
501
- goto out ;
502
+ mt76_tx_status_unlock (mdev , & list );
503
+ rcu_read_unlock ();
504
+ return ;
502
505
}
503
506
504
507
mt76x02_mac_fill_tx_status (dev , status .info , & msta -> status ,
@@ -514,11 +517,10 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
514
517
515
518
if (status .skb )
516
519
mt76_tx_status_skb_done (mdev , status .skb , & list );
517
- else
518
- ieee80211_tx_status_ext (mt76_hw (dev ), & status );
519
-
520
- out :
521
520
mt76_tx_status_unlock (mdev , & list );
521
+
522
+ if (!status .skb )
523
+ ieee80211_tx_status_ext (mt76_hw (dev ), & status );
522
524
rcu_read_unlock ();
523
525
}
524
526
0 commit comments