@@ -436,12 +436,11 @@ mt76_txq_stopped(struct mt76_queue *q)
436436
437437static int
438438mt76_txq_send_burst (struct mt76_phy * phy , struct mt76_queue * q ,
439- struct mt76_txq * mtxq )
439+ struct mt76_txq * mtxq , struct mt76_wcid * wcid )
440440{
441441 struct mt76_dev * dev = phy -> dev ;
442442 struct ieee80211_txq * txq = mtxq_to_txq (mtxq );
443443 enum mt76_txq_id qid = mt76_txq_get_qid (txq );
444- struct mt76_wcid * wcid = mtxq -> wcid ;
445444 struct ieee80211_tx_info * info ;
446445 struct sk_buff * skb ;
447446 int n_frames = 1 ;
@@ -527,8 +526,8 @@ mt76_txq_schedule_list(struct mt76_phy *phy, enum mt76_txq_id qid)
527526 break ;
528527
529528 mtxq = (struct mt76_txq * )txq -> drv_priv ;
530- wcid = mtxq -> wcid ;
531- if (wcid && test_bit (MT_WCID_FLAG_PS , & wcid -> flags ))
529+ wcid = rcu_dereference ( dev -> wcid [ mtxq -> wcid ]) ;
530+ if (! wcid || test_bit (MT_WCID_FLAG_PS , & wcid -> flags ))
532531 continue ;
533532
534533 if (mtxq -> send_bar && mtxq -> aggr ) {
@@ -543,7 +542,7 @@ mt76_txq_schedule_list(struct mt76_phy *phy, enum mt76_txq_id qid)
543542 }
544543
545544 if (!mt76_txq_stopped (q ))
546- n_frames = mt76_txq_send_burst (phy , q , mtxq );
545+ n_frames = mt76_txq_send_burst (phy , q , mtxq , wcid );
547546
548547 ieee80211_return_txq (phy -> hw , txq , false);
549548
0 commit comments