blob: 8d96c929eb2805eba8a2f6f239bee476bc38c6d5 [file] [log] [blame]
developer6bcdd6c2024-03-21 16:26:34 +08001From fc954fed4de0e8c72cff82604531c87f01379852 Mon Sep 17 00:00:00 2001
2From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Thu, 3 Nov 2022 00:27:17 +0800
4Subject: [PATCH 023/120] mtk: wifi: mt76: mt7996: for build pass
5
6Change-Id: Ieb44c33ee6e6a2e6058c1ef528404c1a1cbcfdaf
7---
8 debugfs.c | 3 +++
9 dma.c | 2 +-
10 mcu.c | 1 +
11 mt7615/mcu.c | 1 +
12 mt76_connac_mcu.c | 1 +
13 mt7915/mcu.c | 1 +
14 mt7996/dma.c | 4 ++--
15 mt7996/eeprom.c | 1 +
16 mt7996/mcu.c | 1 +
17 9 files changed, 12 insertions(+), 3 deletions(-)
18
19diff --git a/debugfs.c b/debugfs.c
20index c4649ba04..ac5207e5e 100644
21--- a/debugfs.c
22+++ b/debugfs.c
23@@ -33,8 +33,11 @@ mt76_napi_threaded_set(void *data, u64 val)
24 if (!mt76_is_mmio(dev))
25 return -EOPNOTSUPP;
26
27+#if 0
28+ /* need to backport patch from networking stack */
29 if (dev->napi_dev.threaded != val)
30 return dev_set_threaded(&dev->napi_dev, val);
31+#endif
32
33 return 0;
34 }
35diff --git a/dma.c b/dma.c
36index f4f88c444..560446395 100644
37--- a/dma.c
38+++ b/dma.c
39@@ -883,7 +883,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
40 !(dev->drv->rx_check(dev, data, len)))
41 goto free_frag;
42
43- skb = napi_build_skb(data, q->buf_size);
44+ skb = build_skb(data, q->buf_size);
45 if (!skb)
46 goto free_frag;
47
48diff --git a/mcu.c b/mcu.c
49index a8cafa39a..fa4b05441 100644
50--- a/mcu.c
51+++ b/mcu.c
52@@ -4,6 +4,7 @@
53 */
54
55 #include "mt76.h"
56+#include <linux/moduleparam.h>
57
58 struct sk_buff *
59 __mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
60diff --git a/mt7615/mcu.c b/mt7615/mcu.c
61index c807bd8d9..a9310660b 100644
62--- a/mt7615/mcu.c
63+++ b/mt7615/mcu.c
64@@ -10,6 +10,7 @@
65 #include "mcu.h"
66 #include "mac.h"
67 #include "eeprom.h"
68+#include <linux/moduleparam.h>
69
70 static bool prefer_offload_fw = true;
71 module_param(prefer_offload_fw, bool, 0644);
72diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
73index 5b286f4ba..768c4b9a9 100644
74--- a/mt76_connac_mcu.c
75+++ b/mt76_connac_mcu.c
76@@ -4,6 +4,7 @@
77 #include <linux/firmware.h>
78 #include "mt76_connac2_mac.h"
79 #include "mt76_connac_mcu.h"
80+#include <linux/module.h>
81
82 int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
83 {
84diff --git a/mt7915/mcu.c b/mt7915/mcu.c
85index 24daa0835..2d017396c 100644
86--- a/mt7915/mcu.c
87+++ b/mt7915/mcu.c
88@@ -6,6 +6,7 @@
89 #include "mcu.h"
90 #include "mac.h"
91 #include "eeprom.h"
92+#include <linux/moduleparam.h>
93
94 #define fw_name(_dev, name, ...) ({ \
95 char *_fw; \
96diff --git a/mt7996/dma.c b/mt7996/dma.c
97index 73e633d0d..759a58e8e 100644
98--- a/mt7996/dma.c
99+++ b/mt7996/dma.c
100@@ -641,8 +641,8 @@ int mt7996_dma_init(struct mt7996_dev *dev)
101 if (ret < 0)
102 return ret;
103
104- netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
105- mt7996_poll_tx);
106+ netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
107+ mt7996_poll_tx, NAPI_POLL_WEIGHT);
108 napi_enable(&dev->mt76.tx_napi);
109
110 mt7996_dma_enable(dev, false);
111diff --git a/mt7996/eeprom.c b/mt7996/eeprom.c
112index 3260d1fef..121a3c958 100644
113--- a/mt7996/eeprom.c
114+++ b/mt7996/eeprom.c
115@@ -138,6 +138,7 @@ static int mt7996_eeprom_parse_efuse_hw_cap(struct mt7996_dev *dev)
116 if (ret)
117 return ret;
118
119+ cap = 0x4b249248; /* internal hardcode */
120 if (cap) {
121 dev->has_eht = !(cap & MODE_HE_ONLY);
122 dev->wtbl_size_group = u32_get_bits(cap, WTBL_SIZE_GROUP);
123diff --git a/mt7996/mcu.c b/mt7996/mcu.c
124index d3cc7fbaf..8c80bb231 100644
125--- a/mt7996/mcu.c
126+++ b/mt7996/mcu.c
127@@ -5,6 +5,7 @@
128
129 #include <linux/firmware.h>
130 #include <linux/fs.h>
131+#include <linux/moduleparam.h>
132 #include "mt7996.h"
133 #include "mcu.h"
134 #include "mac.h"
135--
1362.39.2
137