developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 1 | From e3182cb0870f1d702a01deecdf62493832ab4fd9 Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Thu, 3 Nov 2022 00:27:17 +0800 |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 4 | Subject: [PATCH 018/116] mtk: wifi: mt76: mt7996: for build pass |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 6 | --- |
| 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 | |
| 18 | diff --git a/debugfs.c b/debugfs.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 19 | index c4649ba..ac5207e 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 20 | --- 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 | } |
| 34 | diff --git a/dma.c b/dma.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 35 | index f4f88c4..5604463 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 36 | --- 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 | |
| 47 | diff --git a/mcu.c b/mcu.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 48 | index a8cafa3..fa4b054 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 49 | --- 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, |
| 59 | diff --git a/mt7615/mcu.c b/mt7615/mcu.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 60 | index c807bd8..a931066 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 61 | --- 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); |
| 71 | diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 72 | index b35acf8..1e34e0a 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 73 | --- 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 | { |
| 83 | diff --git a/mt7915/mcu.c b/mt7915/mcu.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 84 | index fc194e0..363ea0e 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 85 | --- 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; \ |
| 95 | diff --git a/mt7996/dma.c b/mt7996/dma.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 96 | index 73e633d..759a58e 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 97 | --- 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); |
| 110 | diff --git a/mt7996/eeprom.c b/mt7996/eeprom.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 111 | index 3260d1f..121a3c9 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 112 | --- 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); |
| 122 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 123 | index f4bbb78..90332fe 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 124 | --- 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 | -- |
developer | 9237f44 | 2024-06-14 17:13:04 +0800 | [diff] [blame] | 135 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 136 | |