blob: 8bccb66ed29c36d25106d30c11c1d7ecee747a38 [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 24b3e43ac4d858dd17013087e4ea0b4b86002079 Mon Sep 17 00:00:00 2001
developerbd9fa1e2023-10-16 11:04:00 +08002From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Fri, 8 Sep 2023 18:29:32 +0800
developera20cdc22024-05-31 18:57:31 +08004Subject: [PATCH 2010/2015] wifi: mt76: mt7915: add error message when driver
developerbd9fa1e2023-10-16 11:04:00 +08005 receive 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
developer05f3b2b2024-08-19 19:17:34 +080013index 1c8b8732..3f907e61 100644
developerbd9fa1e2023-10-16 11:04:00 +080014--- a/mt7915/mac.c
15+++ b/mt7915/mac.c
developera46f6132024-03-26 14:09:54 +080016@@ -1007,6 +1007,12 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
developerbd9fa1e2023-10-16 11:04:00 +080017 } 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