From 4e356ab590676cbf9b00a74c873ada87e14762c1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 12 Oct 2015 14:31:50 +0200 Subject: [PATCH] tx: get txq fields inside the locked section before calling ieee80211_send_bar Signed-off-by: Felix Fietkau --- tx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tx.c b/tx.c index d1cea40d..29ea0e52 100644 --- a/tx.c +++ b/tx.c @@ -380,11 +380,14 @@ restart: mtxq = list_first_entry(&hwq->swq, struct mt76_txq, list); if (mtxq->send_bar && mtxq->aggr) { struct ieee80211_txq *txq = mtxq_to_txq(mtxq); + struct ieee80211_sta *sta = txq->sta; + struct ieee80211_vif *vif = txq->vif; + u16 agg_ssn = mtxq->agg_ssn; + u8 tid = txq->tid; mtxq->send_bar = false; spin_unlock_bh(&hwq->lock); - ieee80211_send_bar(txq->vif, txq->sta->addr, txq->tid, - mtxq->agg_ssn); + ieee80211_send_bar(vif, sta->addr, tid, agg_ssn); spin_lock_bh(&hwq->lock); goto restart; }