developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 1 | From 2cdf9a78e39cbb91519b09393ea438c49df5b594 Mon Sep 17 00:00:00 2001 |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Fri, 8 Sep 2023 18:29:32 +0800 |
developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 4 | Subject: [PATCH 2010/2015] wifi: mt76: mt7915: add error message when driver |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 5 | receive invalid token id |
| 6 | |
| 7 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 8 | --- |
| 9 | mt7915/mac.c | 6 ++++++ |
| 10 | 1 file changed, 6 insertions(+) |
| 11 | |
| 12 | diff --git a/mt7915/mac.c b/mt7915/mac.c |
developer | dc9eeae | 2024-04-08 14:36:46 +0800 | [diff] [blame] | 13 | index 1c8b873..3f907e6 100644 |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 14 | --- a/mt7915/mac.c |
| 15 | +++ b/mt7915/mac.c |
developer | a46f613 | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 16 | @@ -1007,6 +1007,12 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len) |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 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 | -- |
| 30 | 2.18.0 |
| 31 | |