blob: cee8d389f6a243c10d80d4d73e734c63f22a58a1 [file] [log] [blame]
developerd0c89452024-10-11 16:53:27 +08001From 5ef8895f1b5e8684b4f81ce52bffa28e629d966b 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
developerd0c89452024-10-11 16:53:27 +08004Subject: [PATCH 012/223] mtk: mt76: mt7996: for build pass
developer66e89bc2024-04-23 14:50:01 +08005
developerd0c89452024-10-11 16:53:27 +08006Change-Id: Ieb44c33ee6e6a2e6058c1ef528404c1a1cbcfdaf
developer66e89bc2024-04-23 14:50:01 +08007---
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
developer05f3b2b2024-08-19 19:17:34 +080020index c4649ba0..ac5207e5 100644
developer66e89bc2024-04-23 14:50:01 +080021--- 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
developer05f3b2b2024-08-19 19:17:34 +080036index f4f88c44..56044639 100644
developer66e89bc2024-04-23 14:50:01 +080037--- 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
developerd0c89452024-10-11 16:53:27 +080049index 3353012e..2bcce21f 100644
developer66e89bc2024-04-23 14:50:01 +080050--- 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
developerd0c89452024-10-11 16:53:27 +080061index 4e350f27..c2090378 100644
developer66e89bc2024-04-23 14:50:01 +080062--- 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
developerd0c89452024-10-11 16:53:27 +080073index 77f3e92d..07f52dd6 100644
developer66e89bc2024-04-23 14:50:01 +080074--- 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
developerd0c89452024-10-11 16:53:27 +080085index 72c8e574..b04a960b 100644
developer66e89bc2024-04-23 14:50:01 +080086--- 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
developer05f3b2b2024-08-19 19:17:34 +080097index 73e633d0..759a58e8 100644
developer66e89bc2024-04-23 14:50:01 +080098--- 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
developerd0c89452024-10-11 16:53:27 +0800112index 77dd6b20..21379ce0 100644
developer66e89bc2024-04-23 14:50:01 +0800113--- a/mt7996/eeprom.c
114+++ b/mt7996/eeprom.c
developerd0c89452024-10-11 16:53:27 +0800115@@ -249,6 +249,7 @@ static int mt7996_eeprom_parse_efuse_hw_cap(struct mt7996_phy *phy,
developer66e89bc2024-04-23 14:50:01 +0800116 if (ret)
117 return ret;
118
119+ cap = 0x4b249248; /* internal hardcode */
120 if (cap) {
developerd0c89452024-10-11 16:53:27 +0800121 u8 band_offs = phy->mt76->band_idx * 3;
122
developer66e89bc2024-04-23 14:50:01 +0800123diff --git a/mt7996/mcu.c b/mt7996/mcu.c
developerd0c89452024-10-11 16:53:27 +0800124index 46fb3a03..623d19f1 100644
developer66e89bc2024-04-23 14:50:01 +0800125--- 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--
developerd0c89452024-10-11 16:53:27 +08001362.45.2
developer66e89bc2024-04-23 14:50:01 +0800137