aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/wireless/mediatek/mt76/mcu.c
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2021-09-18 07:54:21 +0800
committerFelix Fietkau <nbd@nbd.name>2021-10-20 10:36:49 +0200
commit5b8f1840c3e11e5422f395a0acb0bbb1ba5f889f (patch)
tree61d0d9058e983da92305d4ed91986ca458cfa214 /drivers/net/wireless/mediatek/mt76/mcu.c
parentmt76: introduce __mt76_mcu_send_firmware routine (diff)
downloadwireguard-linux-5b8f1840c3e11e5422f395a0acb0bbb1ba5f889f.tar.xz
wireguard-linux-5b8f1840c3e11e5422f395a0acb0bbb1ba5f889f.zip
mt76: drop MCU header size from buffer size in __mt76_mcu_send_firmware
Each firmware piece with mt7915 and mt7921 do not have the MCU header to reroute the packet to the internal RAM. So we do not need to consider the MCU header size in __mt76_mcu_send_firmware. Move the MCU header overhead calculation to mt76_mcu_send_firmware (for older chipsets) Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Fixes: 1c099ab44727 ("mt76: mt7921: add MCU support") Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mcu.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mcu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mcu.c b/drivers/net/wireless/mediatek/mt76/mcu.c
index 946694af5dcc..3f94c37251df 100644
--- a/drivers/net/wireless/mediatek/mt76/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mcu.c
@@ -112,7 +112,7 @@ int __mt76_mcu_send_firmware(struct mt76_dev *dev, int cmd, const void *data,
int err, cur_len;
while (len > 0) {
- cur_len = min_t(int, max_len - dev->mcu_ops->headroom, len);
+ cur_len = min_t(int, max_len, len);
err = mt76_mcu_send_msg(dev, cmd, data, cur_len, false);
if (err)