summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2023-07-26 20:35:05 +0200
committerFelix Fietkau <nbd@nbd.name>2023-07-31 10:56:28 +0200
commit4f1875c288dfc1ccea81fc17fef1d30c9d8498b2 (patch)
tree4be83fbc0362471d69e3cb8861cc00fb5f02ca4f
parentwifi: mt76: mt76x02: fix return value check in mt76x02_mac_process_rx (diff)
downloadlinux-4f1875c288dfc1ccea81fc17fef1d30c9d8498b2.tar.xz
linux-4f1875c288dfc1ccea81fc17fef1d30c9d8498b2.zip
wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
Correct per-device TLV lengths to avoid invalid operation in firmware. ( 64.040375:28:STATS-E)statsGetSingleHWCounter: MIB counter index = 65472 not supported. This happens on mt7916/mt7986. Fixes: b0bfa00595be ("wifi: mt76: mt7915: improve accuracy of time_busy calculation") Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/mcu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 5f4c2946b26b..50ae7bf3af91 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -3038,7 +3038,7 @@ int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch)
}
ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(GET_MIB_INFO),
- req, sizeof(req), true, &skb);
+ req, len * sizeof(req[0]), true, &skb);
if (ret)
return ret;