developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 1 | From 5ef8895f1b5e8684b4f81ce52bffa28e629d966b 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 | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 012/223] mtk: mt76: mt7996: for build pass |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 6 | Change-Id: Ieb44c33ee6e6a2e6058c1ef528404c1a1cbcfdaf |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | |
| 19 | diff --git a/debugfs.c b/debugfs.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 20 | index c4649ba0..ac5207e5 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | } |
| 35 | diff --git a/dma.c b/dma.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 36 | index f4f88c44..56044639 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | |
| 48 | diff --git a/mcu.c b/mcu.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 49 | index 3353012e..2bcce21f 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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, |
| 60 | diff --git a/mt7615/mcu.c b/mt7615/mcu.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 61 | index 4e350f27..c2090378 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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); |
| 72 | diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 73 | index 77f3e92d..07f52dd6 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | { |
| 84 | diff --git a/mt7915/mcu.c b/mt7915/mcu.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 85 | index 72c8e574..b04a960b 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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; \ |
| 96 | diff --git a/mt7996/dma.c b/mt7996/dma.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 97 | index 73e633d0..759a58e8 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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); |
| 111 | diff --git a/mt7996/eeprom.c b/mt7996/eeprom.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 112 | index 77dd6b20..21379ce0 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 113 | --- a/mt7996/eeprom.c |
| 114 | +++ b/mt7996/eeprom.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 115 | @@ -249,6 +249,7 @@ static int mt7996_eeprom_parse_efuse_hw_cap(struct mt7996_phy *phy, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 116 | if (ret) |
| 117 | return ret; |
| 118 | |
| 119 | + cap = 0x4b249248; /* internal hardcode */ |
| 120 | if (cap) { |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 121 | u8 band_offs = phy->mt76->band_idx * 3; |
| 122 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 123 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 124 | index 46fb3a03..623d19f1 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | -- |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 136 | 2.45.2 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 137 | |