From fdc63f168eeb64e1849852cbd242ef7b93d9e0ac Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 27 Oct 2018 17:31:05 +0200 Subject: [PATCH] mt76: fix regression in tx status handling Tx status reporting needs to work on non-STA WCID entries as well Signed-off-by: Felix Fietkau --- mt76x02_mac.c | 3 +++ tx.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mt76x02_mac.c b/mt76x02_mac.c index f7a78d07..118e3005 100644 --- a/mt76x02_mac.c +++ b/mt76x02_mac.c @@ -459,6 +459,9 @@ void mt76x02_send_tx_status(struct mt76x02_dev *dev, priv = msta = container_of(wcid, struct mt76x02_sta, wcid); status.sta = container_of(priv, struct ieee80211_sta, drv_priv); + } + + if (wcid) { if (stat->pktid) status.skb = mt76_tx_status_skb_get(mdev, wcid, stat->pktid); diff --git a/tx.c b/tx.c index cdd0af35..e6cd583a 100644 --- a/tx.c +++ b/tx.c @@ -143,7 +143,7 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid, struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb); int pid; - if (!wcid || !wcid->sta) + if (!wcid) return 0; if (info->flags & IEEE80211_TX_CTL_NO_ACK)