* [nbd168-wireless:mt76 18/21] drivers/net/wireless/mediatek/mt76/mt7915/init.c:86:27: error: storage size of 'limits' isn't known
@ 2020-06-22 23:45 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-06-22 23:45 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7698 bytes --]
tree: https://github.com/nbd168/wireless mt76
head: bc6add98a89a784ff03d10a217ca8b7f26cde8b3
commit: 8c9eac34691676f400ff01c08892e990ef3f36ec [18/21] mt76: mt7915: rework the flow of txpower setting
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 8c9eac34691676f400ff01c08892e990ef3f36ec
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_init_txpower':
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:86:27: error: storage size of 'limits' isn't known
86 | struct mt76_power_limits limits;
| ^~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:101:18: error: implicit declaration of function 'mt76_get_rate_power_limits' [-Werror=implicit-function-declaration]
101 | target_power = mt76_get_rate_power_limits(&dev->mphy, chan,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/init.c:86:27: warning: unused variable 'limits' [-Wunused-variable]
86 | struct mt76_power_limits limits;
| ^~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_regd_notifier':
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:229:18: error: 'struct mt76_dev' has no member named 'alpha2'
229 | memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2));
| ^
drivers/net/wireless/mediatek/mt76/mt7915/init.c:229:60: error: 'struct mt76_dev' has no member named 'alpha2'
229 | memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2));
| ^
cc1: some warnings being treated as errors
vim +86 drivers/net/wireless/mediatek/mt76/mt7915/init.c
78
79 static void
80 mt7915_init_txpower(struct mt7915_dev *dev,
81 struct ieee80211_supported_band *sband)
82 {
83 int i, n_chains = hweight8(dev->mphy.antenna_mask);
84 int nss_delta = mt76_tx_power_nss_delta(n_chains);
85 int pwr_delta = mt7915_eeprom_get_power_delta(dev, sband->band);
> 86 struct mt76_power_limits limits;
87
88 for (i = 0; i < sband->n_channels; i++) {
89 struct ieee80211_channel *chan = &sband->channels[i];
90 u32 target_power = 0;
91 int j;
92
93 for (j = 0; j < n_chains; j++) {
94 u32 val;
95
96 val = mt7915_eeprom_get_target_power(dev, chan, j);
97 target_power = max(target_power, val);
98 }
99
100 target_power += pwr_delta;
> 101 target_power = mt76_get_rate_power_limits(&dev->mphy, chan,
102 &limits,
103 target_power);
104 target_power += nss_delta;
105 target_power = DIV_ROUND_UP(target_power, 2);
106 chan->max_power = min_t(int, chan->max_reg_power,
107 target_power);
108 chan->orig_mpwr = target_power;
109 }
110 }
111
112 static void mt7915_init_work(struct work_struct *work)
113 {
114 struct mt7915_dev *dev = container_of(work, struct mt7915_dev,
115 init_work);
116
117 mt7915_mcu_set_eeprom(dev);
118 mt7915_mac_init(dev);
119 mt7915_init_txpower(dev, &dev->mphy.sband_2g.sband);
120 mt7915_init_txpower(dev, &dev->mphy.sband_5g.sband);
121 mt7915_txbf_init(dev);
122 }
123
124 static int mt7915_init_hardware(struct mt7915_dev *dev)
125 {
126 int ret, idx;
127
128 mt76_wr(dev, MT_INT_SOURCE_CSR, ~0);
129
130 INIT_WORK(&dev->init_work, mt7915_init_work);
131 spin_lock_init(&dev->token_lock);
132 idr_init(&dev->token);
133
134 ret = mt7915_dma_init(dev);
135 if (ret)
136 return ret;
137
138 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state);
139
140 ret = mt7915_mcu_init(dev);
141 if (ret)
142 return ret;
143
144 ret = mt7915_eeprom_init(dev);
145 if (ret < 0)
146 return ret;
147
148 /* Beacon and mgmt frames should occupy wcid 0 */
149 idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA - 1);
150 if (idx)
151 return -ENOSPC;
152
153 dev->mt76.global_wcid.idx = idx;
154 dev->mt76.global_wcid.hw_key_idx = -1;
155 dev->mt76.global_wcid.tx_info |= MT_WCID_TX_INFO_SET;
156 rcu_assign_pointer(dev->mt76.wcid[idx], &dev->mt76.global_wcid);
157
158 return 0;
159 }
160
161 #define CCK_RATE(_idx, _rate) { \
162 .bitrate = _rate, \
163 .flags = IEEE80211_RATE_SHORT_PREAMBLE, \
164 .hw_value = (MT_PHY_TYPE_CCK << 8) | (_idx), \
165 .hw_value_short = (MT_PHY_TYPE_CCK << 8) | (4 + (_idx)), \
166 }
167
168 #define OFDM_RATE(_idx, _rate) { \
169 .bitrate = _rate, \
170 .hw_value = (MT_PHY_TYPE_OFDM << 8) | (_idx), \
171 .hw_value_short = (MT_PHY_TYPE_OFDM << 8) | (_idx), \
172 }
173
174 static struct ieee80211_rate mt7915_rates[] = {
175 CCK_RATE(0, 10),
176 CCK_RATE(1, 20),
177 CCK_RATE(2, 55),
178 CCK_RATE(3, 110),
179 OFDM_RATE(11, 60),
180 OFDM_RATE(15, 90),
181 OFDM_RATE(10, 120),
182 OFDM_RATE(14, 180),
183 OFDM_RATE(9, 240),
184 OFDM_RATE(13, 360),
185 OFDM_RATE(8, 480),
186 OFDM_RATE(12, 540),
187 };
188
189 static const struct ieee80211_iface_limit if_limits[] = {
190 {
191 .max = 1,
192 .types = BIT(NL80211_IFTYPE_ADHOC)
193 }, {
194 .max = MT7915_MAX_INTERFACES,
195 .types = BIT(NL80211_IFTYPE_AP) |
196 #ifdef CONFIG_MAC80211_MESH
197 BIT(NL80211_IFTYPE_MESH_POINT) |
198 #endif
199 BIT(NL80211_IFTYPE_STATION)
200 }
201 };
202
203 static const struct ieee80211_iface_combination if_comb[] = {
204 {
205 .limits = if_limits,
206 .n_limits = ARRAY_SIZE(if_limits),
207 .max_interfaces = 4,
208 .num_different_channels = 1,
209 .beacon_int_infra_match = true,
210 .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
211 BIT(NL80211_CHAN_WIDTH_20) |
212 BIT(NL80211_CHAN_WIDTH_40) |
213 BIT(NL80211_CHAN_WIDTH_80) |
214 BIT(NL80211_CHAN_WIDTH_160) |
215 BIT(NL80211_CHAN_WIDTH_80P80),
216 }
217 };
218
219 static void
220 mt7915_regd_notifier(struct wiphy *wiphy,
221 struct regulatory_request *request)
222 {
223 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
224 struct mt7915_dev *dev = mt7915_hw_dev(hw);
225 struct mt76_phy *mphy = hw->priv;
226 struct mt7915_phy *phy = mphy->priv;
227 struct cfg80211_chan_def *chandef = &mphy->chandef;
228
> 229 memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2));
230 dev->mt76.region = request->dfs_region;
231
232 mt7915_init_txpower(dev, &mphy->sband_2g.sband);
233 mt7915_init_txpower(dev, &mphy->sband_5g.sband);
234
235 if (!(chandef->chan->flags & IEEE80211_CHAN_RADAR))
236 return;
237
238 mt7915_dfs_init_radar_detector(phy);
239 }
240
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 74060 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-22 23:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 23:45 [nbd168-wireless:mt76 18/21] drivers/net/wireless/mediatek/mt76/mt7915/init.c:86:27: error: storage size of 'limits' isn't known kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.