blob: c58df9a79160b97c492b051e102d90fed51c3c6a [file] [log] [blame]
developer05680132023-09-08 18:32:17 +08001From cd5ad3c3cb05cdc1986003d2e9b6f2e1ab806fab Mon Sep 17 00:00:00 2001
2From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Fri, 8 Sep 2023 18:29:32 +0800
4Subject: [PATCH] wifi: mt76: mt7915: add error message when driver receive
5 invalid token id
6
7Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
8---
9 mt7915/mac.c | 6 ++++++
10 1 file changed, 6 insertions(+)
11
12diff --git a/mt7915/mac.c b/mt7915/mac.c
13index 94cfab61..661f4243 100644
14--- a/mt7915/mac.c
15+++ b/mt7915/mac.c
16@@ -998,6 +998,12 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
17 } else {
18 msdu = FIELD_GET(MT_TX_FREE_MSDU_ID, info);
19 }
20+
21+ /* Todo: check if msdu is sw token */
22+ if (msdu > MT7915_TOKEN_SIZE)
23+ dev_err(mdev->dev, "Receive invalid token id(%d)\n",
24+ msdu);
25+
26 count++;
27 txwi = mt76_token_release(mdev, msdu, &wake);
28 if (!txwi)
29--
302.18.0
31