blob: 001f88717057b35b6d8384deb68757f6d85e3874 [file] [log] [blame]
developer9237f442024-06-14 17:13:04 +08001From e3182cb0870f1d702a01deecdf62493832ab4fd9 Mon Sep 17 00:00:00 2001
developer66e89bc2024-04-23 14:50:01 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Thu, 3 Nov 2022 00:27:17 +0800
developer9237f442024-06-14 17:13:04 +08004Subject: [PATCH 018/116] mtk: wifi: mt76: mt7996: for build pass
developer66e89bc2024-04-23 14:50:01 +08005
developer66e89bc2024-04-23 14:50:01 +08006---
7 debugfs.c | 3 +++
8 dma.c | 2 +-
9 mcu.c | 1 +
10 mt7615/mcu.c | 1 +
11 mt76_connac_mcu.c | 1 +
12 mt7915/mcu.c | 1 +
13 mt7996/dma.c | 4 ++--
14 mt7996/eeprom.c | 1 +
15 mt7996/mcu.c | 1 +
16 9 files changed, 12 insertions(+), 3 deletions(-)
17
18diff --git a/debugfs.c b/debugfs.c
developer9237f442024-06-14 17:13:04 +080019index c4649ba..ac5207e 100644
developer66e89bc2024-04-23 14:50:01 +080020--- a/debugfs.c
21+++ b/debugfs.c
22@@ -33,8 +33,11 @@ mt76_napi_threaded_set(void *data, u64 val)
23 if (!mt76_is_mmio(dev))
24 return -EOPNOTSUPP;
25
26+#if 0
27+ /* need to backport patch from networking stack */
28 if (dev->napi_dev.threaded != val)
29 return dev_set_threaded(&dev->napi_dev, val);
30+#endif
31
32 return 0;
33 }
34diff --git a/dma.c b/dma.c
developer9237f442024-06-14 17:13:04 +080035index f4f88c4..5604463 100644
developer66e89bc2024-04-23 14:50:01 +080036--- a/dma.c
37+++ b/dma.c
38@@ -883,7 +883,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
39 !(dev->drv->rx_check(dev, data, len)))
40 goto free_frag;
41
42- skb = napi_build_skb(data, q->buf_size);
43+ skb = build_skb(data, q->buf_size);
44 if (!skb)
45 goto free_frag;
46
47diff --git a/mcu.c b/mcu.c
developer9237f442024-06-14 17:13:04 +080048index a8cafa3..fa4b054 100644
developer66e89bc2024-04-23 14:50:01 +080049--- a/mcu.c
50+++ b/mcu.c
51@@ -4,6 +4,7 @@
52 */
53
54 #include "mt76.h"
55+#include <linux/moduleparam.h>
56
57 struct sk_buff *
58 __mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
59diff --git a/mt7615/mcu.c b/mt7615/mcu.c
developer9237f442024-06-14 17:13:04 +080060index c807bd8..a931066 100644
developer66e89bc2024-04-23 14:50:01 +080061--- a/mt7615/mcu.c
62+++ b/mt7615/mcu.c
63@@ -10,6 +10,7 @@
64 #include "mcu.h"
65 #include "mac.h"
66 #include "eeprom.h"
67+#include <linux/moduleparam.h>
68
69 static bool prefer_offload_fw = true;
70 module_param(prefer_offload_fw, bool, 0644);
71diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
developer9237f442024-06-14 17:13:04 +080072index b35acf8..1e34e0a 100644
developer66e89bc2024-04-23 14:50:01 +080073--- a/mt76_connac_mcu.c
74+++ b/mt76_connac_mcu.c
75@@ -4,6 +4,7 @@
76 #include <linux/firmware.h>
77 #include "mt76_connac2_mac.h"
78 #include "mt76_connac_mcu.h"
79+#include <linux/module.h>
80
81 int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
82 {
83diff --git a/mt7915/mcu.c b/mt7915/mcu.c
developer9237f442024-06-14 17:13:04 +080084index fc194e0..363ea0e 100644
developer66e89bc2024-04-23 14:50:01 +080085--- a/mt7915/mcu.c
86+++ b/mt7915/mcu.c
87@@ -6,6 +6,7 @@
88 #include "mcu.h"
89 #include "mac.h"
90 #include "eeprom.h"
91+#include <linux/moduleparam.h>
92
93 #define fw_name(_dev, name, ...) ({ \
94 char *_fw; \
95diff --git a/mt7996/dma.c b/mt7996/dma.c
developer9237f442024-06-14 17:13:04 +080096index 73e633d..759a58e 100644
developer66e89bc2024-04-23 14:50:01 +080097--- a/mt7996/dma.c
98+++ b/mt7996/dma.c
99@@ -641,8 +641,8 @@ int mt7996_dma_init(struct mt7996_dev *dev)
100 if (ret < 0)
101 return ret;
102
103- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
104- mt7996_poll_tx);
105+ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
106+ mt7996_poll_tx, NAPI_POLL_WEIGHT);
107 napi_enable(&dev->mt76.tx_napi);
108
109 mt7996_dma_enable(dev, false);
110diff --git a/mt7996/eeprom.c b/mt7996/eeprom.c
developer9237f442024-06-14 17:13:04 +0800111index 3260d1f..121a3c9 100644
developer66e89bc2024-04-23 14:50:01 +0800112--- a/mt7996/eeprom.c
113+++ b/mt7996/eeprom.c
114@@ -138,6 +138,7 @@ static int mt7996_eeprom_parse_efuse_hw_cap(struct mt7996_dev *dev)
115 if (ret)
116 return ret;
117
118+ cap = 0x4b249248; /* internal hardcode */
119 if (cap) {
120 dev->has_eht = !(cap & MODE_HE_ONLY);
121 dev->wtbl_size_group = u32_get_bits(cap, WTBL_SIZE_GROUP);
122diff --git a/mt7996/mcu.c b/mt7996/mcu.c
developer9237f442024-06-14 17:13:04 +0800123index f4bbb78..90332fe 100644
developer66e89bc2024-04-23 14:50:01 +0800124--- a/mt7996/mcu.c
125+++ b/mt7996/mcu.c
126@@ -5,6 +5,7 @@
127
128 #include <linux/firmware.h>
129 #include <linux/fs.h>
130+#include <linux/moduleparam.h>
131 #include "mt7996.h"
132 #include "mcu.h"
133 #include "mac.h"
134--
developer9237f442024-06-14 17:13:04 +08001352.18.0
developer66e89bc2024-04-23 14:50:01 +0800136