[][mac80211][wifi6][mt76][Fix crash caused by per-BSS counter updating]

[Description]
Fix kernel crash issue caused by per-BSS Rx counter
processing flow.

At multi-station scenario, it's observed that driver might
randomly obtain invalid wlan_idx (equals to 0) in Rx count
reports, which will lead to call trace problem. Hence we
add sanity-check to handle such invalid wlan_idx case.

If without this patch, kernel panic issue might occur under
multi-station scenario.

[Release-log]
N/A


Change-Id: I626459755a7ebadd48824feae09909835eca86ab
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8352829
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/2012-wifi-mt76-mt7915-wed-add-per-bss-statistic-info.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2012-wifi-mt76-mt7915-wed-add-per-bss-statistic-info.patch
index e9267b5..ddb9e47 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/2012-wifi-mt76-mt7915-wed-add-per-bss-statistic-info.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2012-wifi-mt76-mt7915-wed-add-per-bss-statistic-info.patch
@@ -143,9 +143,18 @@
  out:
  	dev_kfree_skb(skb);
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 2ad7ba4..ce976b4 100644
+index 285b9cb..e68ead9 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
+@@ -727,7 +727,7 @@ static void mt7915_mmio_wed_update_rx_stats(struct mtk_wed_device *wed,
+ 
+ 	dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
+ 
+-	if (idx >= mt7915_wtbl_size(dev))
++	if (idx <= 0 || idx >= mt7915_wtbl_size(dev))
+ 		return;
+ 
+ 	rcu_read_lock();
 @@ -742,8 +742,32 @@ static void mt7915_mmio_wed_update_rx_stats(struct mtk_wed_device *wed,
  		wcid->stats.rx_packets += le32_to_cpu(stats->rx_pkt_cnt);
  		wcid->stats.rx_errors += le32_to_cpu(stats->rx_err_cnt);