@@ -421,7 +421,6 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
421
421
return ;
422
422
423
423
rcu_read_lock ();
424
- mt76_tx_status_lock (mdev , & list );
425
424
426
425
if (stat -> wcid < ARRAY_SIZE (dev -> mt76 .wcid ))
427
426
wcid = rcu_dereference (dev -> mt76 .wcid [stat -> wcid ]);
@@ -434,6 +433,8 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
434
433
drv_priv );
435
434
}
436
435
436
+ mt76_tx_status_lock (mdev , & list );
437
+
437
438
if (wcid ) {
438
439
if (stat -> pktid )
439
440
status .skb = mt76_tx_status_skb_get (mdev , wcid ,
@@ -453,7 +454,9 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
453
454
if (* update == 0 && stat_val == stat_cache &&
454
455
stat -> wcid == msta -> status .wcid && msta -> n_frames < 32 ) {
455
456
msta -> n_frames ++ ;
456
- goto out ;
457
+ mt76_tx_status_unlock (mdev , & list );
458
+ rcu_read_unlock ();
459
+ return ;
457
460
}
458
461
459
462
mt76x02_mac_fill_tx_status (dev , status .info , & msta -> status ,
@@ -469,11 +472,10 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev,
469
472
470
473
if (status .skb )
471
474
mt76_tx_status_skb_done (mdev , status .skb , & list );
472
- else
473
- ieee80211_tx_status_ext (mt76_hw (dev ), & status );
474
-
475
- out :
476
475
mt76_tx_status_unlock (mdev , & list );
476
+
477
+ if (!status .skb )
478
+ ieee80211_tx_status_ext (mt76_hw (dev ), & status );
477
479
rcu_read_unlock ();
478
480
}
479
481
0 commit comments