developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 1 | From 83bb8ec37f85161b08f4eb2abf6a9a0530cfc189 Mon Sep 17 00:00:00 2001 |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Thu, 3 Nov 2022 00:27:17 +0800 |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 0999/1015] wifi: mt76: mt7996: for build pass |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 5 | |
| 6 | Change-Id: Ieb44c33ee6e6a2e6058c1ef528404c1a1cbcfdaf |
| 7 | --- |
| 8 | debugfs.c | 3 +++ |
| 9 | dma.c | 2 +- |
| 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 ++-- |
| 16 | mt7996/eeprom.c | 1 + |
| 17 | mt7996/mcu.c | 1 + |
| 18 | 10 files changed, 19 insertions(+), 4 deletions(-) |
| 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 | } |
| 36 | diff --git a/dma.c b/dma.c |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 37 | index f2b1b2ac..e1e9062b 100644 |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 38 | --- a/dma.c |
| 39 | +++ b/dma.c |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 40 | @@ -859,7 +859,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget) |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 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 | |
| 49 | diff --git a/eeprom.c b/eeprom.c |
| 50 | index 263e5089..aa889258 100644 |
| 51 | --- a/eeprom.c |
| 52 | +++ b/eeprom.c |
| 53 | @@ -108,9 +108,15 @@ void |
| 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 8d745c97..86061e95 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 |
| 95 | index 5fab6772..c24dac10 100644 |
| 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 |
| 107 | index aa706ff6..e8c1e572 100644 |
| 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 | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 119 | index f01cea5e..b8f253d0 100644 |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 120 | --- a/mt7996/dma.c |
| 121 | +++ b/mt7996/dma.c |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 122 | @@ -360,8 +360,8 @@ int mt7996_dma_init(struct mt7996_dev *dev) |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 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 | |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 132 | mt7996_dma_enable(dev, false); |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 133 | diff --git a/mt7996/eeprom.c b/mt7996/eeprom.c |
developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 134 | index 9840c77d..b81ed64c 100644 |
developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 135 | --- a/mt7996/eeprom.c |
| 136 | +++ b/mt7996/eeprom.c |
| 137 | @@ -121,6 +121,7 @@ static int mt7996_eeprom_parse_efuse_hw_cap(struct mt7996_dev *dev) |
| 138 | if (ret) |
| 139 | return ret; |
| 140 | |
| 141 | + cap = 0x4b249248; /* internal hardcode */ |
| 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 | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame^] | 146 | index 871d32a4..58893348 100644 |
developer | de9ecce | 2023-05-22 11:17:16 +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 | -- |
| 158 | 2.39.2 |
| 159 | |