[][mac80211][wifi6][mt76][Enhance debug log]

[Description]
Add debug log for wa uart and invalid token id.

[Release-log]
N/A

Change-Id: Ib8c57a85610c7b7f4116c7ebc584420f61a9ff3c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7987487
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/2010-wifi-mt76-mt7915-add-error-message-when-driver-recei.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2010-wifi-mt76-mt7915-add-error-message-when-driver-recei.patch
new file mode 100644
index 0000000..c58df9a
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2010-wifi-mt76-mt7915-add-error-message-when-driver-recei.patch
@@ -0,0 +1,31 @@
+From cd5ad3c3cb05cdc1986003d2e9b6f2e1ab806fab Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Fri, 8 Sep 2023 18:29:32 +0800
+Subject: [PATCH] wifi: mt76: mt7915: add error message when driver receive
+ invalid token id
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ mt7915/mac.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/mt7915/mac.c b/mt7915/mac.c
+index 94cfab61..661f4243 100644
+--- a/mt7915/mac.c
++++ b/mt7915/mac.c
+@@ -998,6 +998,12 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+ 			} else {
+ 				msdu = FIELD_GET(MT_TX_FREE_MSDU_ID, info);
+ 			}
++
++			/* Todo: check if msdu is sw token */
++			if (msdu > MT7915_TOKEN_SIZE)
++				dev_err(mdev->dev, "Receive invalid token id(%d)\n",
++					msdu);
++
+ 			count++;
+ 			txwi = mt76_token_release(mdev, msdu, &wake);
+ 			if (!txwi)
+-- 
+2.18.0
+