developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 1 | From 5b6ee04d5043e2cbf4a7c0a0129e1dfbd7f33f2b Mon Sep 17 00:00:00 2001 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Thu, 3 Nov 2022 00:27:17 +0800 |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 4 | Subject: [PATCH 0999/1001] mt76: mt7996: for build pass |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 5 | |
| 6 | Change-Id: Ieb44c33ee6e6a2e6058c1ef528404c1a1cbcfdaf |
| 7 | --- |
| 8 | debugfs.c | 3 +++ |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 9 | dma.c | 2 +- |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 10 | eeprom.c | 8 +++++++- |
| 11 | mcu.c | 1 + |
| 12 | mt7615/mcu.c | 1 + |
| 13 | mt76_connac_mcu.c | 1 + |
| 14 | mt7915/mcu.c | 1 + |
| 15 | mt7996/dma.c | 4 ++-- |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 16 | mt7996/eeprom.c | 1 + |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 17 | mt7996/mcu.c | 1 + |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 18 | 10 files changed, 19 insertions(+), 4 deletions(-) |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 19 | |
| 20 | diff --git a/debugfs.c b/debugfs.c |
| 21 | index 79064a4d..e10d4cbc 100644 |
| 22 | --- a/debugfs.c |
| 23 | +++ b/debugfs.c |
| 24 | @@ -33,8 +33,11 @@ mt76_napi_threaded_set(void *data, u64 val) |
| 25 | if (!mt76_is_mmio(dev)) |
| 26 | return -EOPNOTSUPP; |
| 27 | |
| 28 | +#if 0 |
| 29 | + /* need to backport patch from networking stack */ |
| 30 | if (dev->napi_dev.threaded != val) |
| 31 | return dev_set_threaded(&dev->napi_dev, val); |
| 32 | +#endif |
| 33 | |
| 34 | return 0; |
| 35 | } |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 36 | diff --git a/dma.c b/dma.c |
| 37 | index 7357b398..2fc70e23 100644 |
| 38 | --- a/dma.c |
| 39 | +++ b/dma.c |
| 40 | @@ -856,7 +856,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget) |
| 41 | !(dev->drv->rx_check(dev, data, len))) |
| 42 | goto free_frag; |
| 43 | |
| 44 | - skb = napi_build_skb(data, q->buf_size); |
| 45 | + skb = build_skb(data, q->buf_size); |
| 46 | if (!skb) |
| 47 | goto free_frag; |
| 48 | |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 49 | diff --git a/eeprom.c b/eeprom.c |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 50 | index 263e5089..aa889258 100644 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 51 | --- a/eeprom.c |
| 52 | +++ b/eeprom.c |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 53 | @@ -108,9 +108,15 @@ void |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 54 | mt76_eeprom_override(struct mt76_phy *phy) |
| 55 | { |
| 56 | struct mt76_dev *dev = phy->dev; |
| 57 | +#ifdef CONFIG_OF |
| 58 | struct device_node *np = dev->dev->of_node; |
| 59 | + const u8 *mac = NULL; |
| 60 | |
| 61 | - of_get_mac_address(np, phy->macaddr); |
| 62 | + if (np) |
| 63 | + mac = of_get_mac_address(np); |
| 64 | + if (!IS_ERR_OR_NULL(mac)) |
| 65 | + ether_addr_copy(phy->macaddr, mac); |
| 66 | +#endif |
| 67 | |
| 68 | if (!is_valid_ether_addr(phy->macaddr)) { |
| 69 | eth_random_addr(phy->macaddr); |
| 70 | diff --git a/mcu.c b/mcu.c |
| 71 | index a8cafa39..fa4b0544 100644 |
| 72 | --- a/mcu.c |
| 73 | +++ b/mcu.c |
| 74 | @@ -4,6 +4,7 @@ |
| 75 | */ |
| 76 | |
| 77 | #include "mt76.h" |
| 78 | +#include <linux/moduleparam.h> |
| 79 | |
| 80 | struct sk_buff * |
| 81 | __mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data, |
| 82 | diff --git a/mt7615/mcu.c b/mt7615/mcu.c |
| 83 | index eea398c7..4593b2e1 100644 |
| 84 | --- a/mt7615/mcu.c |
| 85 | +++ b/mt7615/mcu.c |
| 86 | @@ -10,6 +10,7 @@ |
| 87 | #include "mcu.h" |
| 88 | #include "mac.h" |
| 89 | #include "eeprom.h" |
| 90 | +#include <linux/moduleparam.h> |
| 91 | |
| 92 | static bool prefer_offload_fw = true; |
| 93 | module_param(prefer_offload_fw, bool, 0644); |
| 94 | diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 95 | index 4e4f6b35..e5815227 100644 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 96 | --- a/mt76_connac_mcu.c |
| 97 | +++ b/mt76_connac_mcu.c |
| 98 | @@ -4,6 +4,7 @@ |
| 99 | #include <linux/firmware.h> |
| 100 | #include "mt76_connac2_mac.h" |
| 101 | #include "mt76_connac_mcu.h" |
| 102 | +#include <linux/module.h> |
| 103 | |
| 104 | int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option) |
| 105 | { |
| 106 | diff --git a/mt7915/mcu.c b/mt7915/mcu.c |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 107 | index d08907f5..99ef8c9c 100644 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 108 | --- a/mt7915/mcu.c |
| 109 | +++ b/mt7915/mcu.c |
| 110 | @@ -6,6 +6,7 @@ |
| 111 | #include "mcu.h" |
| 112 | #include "mac.h" |
| 113 | #include "eeprom.h" |
| 114 | +#include <linux/moduleparam.h> |
| 115 | |
| 116 | #define fw_name(_dev, name, ...) ({ \ |
| 117 | char *_fw; \ |
| 118 | diff --git a/mt7996/dma.c b/mt7996/dma.c |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 119 | index 18ea758c..3e2967f7 100644 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 120 | --- a/mt7996/dma.c |
| 121 | +++ b/mt7996/dma.c |
| 122 | @@ -343,8 +343,8 @@ int mt7996_dma_init(struct mt7996_dev *dev) |
| 123 | if (ret < 0) |
| 124 | return ret; |
| 125 | |
| 126 | - netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, |
| 127 | - mt7996_poll_tx); |
| 128 | + netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi, |
| 129 | + mt7996_poll_tx, NAPI_POLL_WEIGHT); |
| 130 | napi_enable(&dev->mt76.tx_napi); |
| 131 | |
| 132 | mt7996_dma_enable(dev); |
| 133 | diff --git a/mt7996/eeprom.c b/mt7996/eeprom.c |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 134 | index 64e3c4e2..7bff504a 100644 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 135 | --- a/mt7996/eeprom.c |
| 136 | +++ b/mt7996/eeprom.c |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 137 | @@ -121,6 +121,7 @@ static int mt7996_eeprom_parse_efuse_hw_cap(struct mt7996_dev *dev) |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 138 | if (ret) |
| 139 | return ret; |
| 140 | |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 141 | + cap = 0x4b249248; /* internal hardcode */ |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 142 | if (cap) { |
| 143 | dev->has_eht = !(cap & MODE_HE_ONLY); |
| 144 | dev->wtbl_size_group = u32_get_bits(cap, WTBL_SIZE_GROUP); |
| 145 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 146 | index 0a52afd1..cc948395 100644 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 147 | --- a/mt7996/mcu.c |
| 148 | +++ b/mt7996/mcu.c |
| 149 | @@ -5,6 +5,7 @@ |
| 150 | |
| 151 | #include <linux/firmware.h> |
| 152 | #include <linux/fs.h> |
| 153 | +#include <linux/moduleparam.h> |
| 154 | #include "mt7996.h" |
| 155 | #include "mcu.h" |
| 156 | #include "mac.h" |
| 157 | -- |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 158 | 2.39.2 |
developer | 60a3d66 | 2023-02-07 15:24:34 +0800 | [diff] [blame] | 159 | |