blob: 101893a5e1c39b424eab3f7d3ffc02cfeb6dd290 [file] [log] [blame]
From db4bbc138ecda8790cc3e6b0d513278ff900a4cc Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Thu, 3 Nov 2022 00:27:17 +0800
Subject: [PATCH 019/116] mtk: wifi: mt76: mt7996: for build pass
---
debugfs.c | 3 +++
dma.c | 2 +-
mcu.c | 1 +
mt7615/mcu.c | 1 +
mt76_connac_mcu.c | 1 +
mt7915/mcu.c | 1 +
mt7996/dma.c | 4 ++--
mt7996/eeprom.c | 1 +
mt7996/mcu.c | 1 +
9 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/debugfs.c b/debugfs.c
index c4649ba04..ac5207e5e 100644
--- a/debugfs.c
+++ b/debugfs.c
@@ -33,8 +33,11 @@ mt76_napi_threaded_set(void *data, u64 val)
if (!mt76_is_mmio(dev))
return -EOPNOTSUPP;
+#if 0
+ /* need to backport patch from networking stack */
if (dev->napi_dev.threaded != val)
return dev_set_threaded(&dev->napi_dev, val);
+#endif
return 0;
}
diff --git a/dma.c b/dma.c
index f4f88c444..560446395 100644
--- a/dma.c
+++ b/dma.c
@@ -883,7 +883,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
!(dev->drv->rx_check(dev, data, len)))
goto free_frag;
- skb = napi_build_skb(data, q->buf_size);
+ skb = build_skb(data, q->buf_size);
if (!skb)
goto free_frag;
diff --git a/mcu.c b/mcu.c
index a8cafa39a..fa4b05441 100644
--- a/mcu.c
+++ b/mcu.c
@@ -4,6 +4,7 @@
*/
#include "mt76.h"
+#include <linux/moduleparam.h>
struct sk_buff *
__mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
diff --git a/mt7615/mcu.c b/mt7615/mcu.c
index c807bd8d9..a9310660b 100644
--- a/mt7615/mcu.c
+++ b/mt7615/mcu.c
@@ -10,6 +10,7 @@
#include "mcu.h"
#include "mac.h"
#include "eeprom.h"
+#include <linux/moduleparam.h>
static bool prefer_offload_fw = true;
module_param(prefer_offload_fw, bool, 0644);
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
index b35acf86e..1e34e0ae3 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
@@ -4,6 +4,7 @@
#include <linux/firmware.h>
#include "mt76_connac2_mac.h"
#include "mt76_connac_mcu.h"
+#include <linux/module.h>
int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
{
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
index 24daa0835..2d017396c 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -6,6 +6,7 @@
#include "mcu.h"
#include "mac.h"
#include "eeprom.h"
+#include <linux/moduleparam.h>
#define fw_name(_dev, name, ...) ({ \
char *_fw; \
diff --git a/mt7996/dma.c b/mt7996/dma.c
index 73e633d0d..759a58e8e 100644
--- a/mt7996/dma.c
+++ b/mt7996/dma.c
@@ -641,8 +641,8 @@ int mt7996_dma_init(struct mt7996_dev *dev)
if (ret < 0)
return ret;
- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
- mt7996_poll_tx);
+ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
+ mt7996_poll_tx, NAPI_POLL_WEIGHT);
napi_enable(&dev->mt76.tx_napi);
mt7996_dma_enable(dev, false);
diff --git a/mt7996/eeprom.c b/mt7996/eeprom.c
index 3260d1fef..121a3c958 100644
--- a/mt7996/eeprom.c
+++ b/mt7996/eeprom.c
@@ -138,6 +138,7 @@ static int mt7996_eeprom_parse_efuse_hw_cap(struct mt7996_dev *dev)
if (ret)
return ret;
+ cap = 0x4b249248; /* internal hardcode */
if (cap) {
dev->has_eht = !(cap & MODE_HE_ONLY);
dev->wtbl_size_group = u32_get_bits(cap, WTBL_SIZE_GROUP);
diff --git a/mt7996/mcu.c b/mt7996/mcu.c
index 0656b4a51..57cfa1494 100644
--- a/mt7996/mcu.c
+++ b/mt7996/mcu.c
@@ -5,6 +5,7 @@
#include <linux/firmware.h>
#include <linux/fs.h>
+#include <linux/moduleparam.h>
#include "mt7996.h"
#include "mcu.h"
#include "mac.h"
--
2.39.2