From: kernel test robot <lkp@intel.com>
To: JB Tsai <jb.tsai@mediatek.com>, nbd@nbd.name, lorenzo@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org, Deren.Wu@mediatek.com,
Sean.Wang@mediatek.com, Quan.Zhou@mediatek.com,
Ryder.Lee@mediatek.com, Leon.Yen@mediatek.com,
litien.chang@mediatek.com, Charlie-cy.Wu@mediatek.com,
jb.tsai@mediatek.com
Subject: Re: [PATCH] wifi: mt76: mt7925: add regulatory wiphy self manager support
Date: Wed, 3 Jun 2026 22:27:39 +0200 [thread overview]
Message-ID: <202606032205.iaSDVq2Z-lkp@intel.com> (raw)
In-Reply-To: <20260603075331.1234691-1-jb.tsai@mediatek.com>
Hi JB,
kernel test robot noticed the following build errors:
[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v7.1-rc6 next-20260602]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/JB-Tsai/wifi-mt76-mt7925-add-regulatory-wiphy-self-manager-support/20260603-155908
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20260603075331.1234691-1-jb.tsai%40mediatek.com
patch subject: [PATCH] wifi: mt76: mt7925: add regulatory wiphy self manager support
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260603/202606032205.iaSDVq2Z-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project f43d6834093b19baf79beda8c0337ab020ac5f17)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260603/202606032205.iaSDVq2Z-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606032205.iaSDVq2Z-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/wireless/mediatek/mt76/mt7925/regd.c:361:43: error: passing 'const struct ieee80211_regdomain *' to parameter of type 'struct ieee80211_regdomain *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
361 | return regulatory_set_wiphy_regd(wiphy, &mt7925_regd_ww);
| ^~~~~~~~~~~~~~~
include/net/cfg80211.h:8082:38: note: passing argument to parameter 'rd' here
8082 | struct ieee80211_regdomain *rd);
| ^
1 error generated.
vim +361 drivers/net/wireless/mediatek/mt76/mt7925/regd.c
286
287 int mt7925_regd_update(struct mt792x_phy *phy, char *alpha2)
288 {
289 struct wiphy *wiphy = phy->mt76->hw->wiphy;
290 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
291 struct mt792x_dev *dev = mt792x_hw_dev(hw);
292 struct mt7925_regd_rule *mt7925_rule;
293 struct mt76_dev *mdev = &dev->mt76;
294 struct ieee80211_regdomain *regd;
295 struct ieee80211_reg_rule *rule;
296 struct mt7925_regd_rule_ev *ev;
297 int i, num_of_rules = 0;
298 struct sk_buff *skb;
299 int ret = 0;
300
301 if (dev->hw_full_reset)
302 return 0;
303
304 if (!MT7925_REGD_SUPPORTED(phy))
305 return -EOPNOTSUPP;
306
307 mt792x_mutex_acquire(dev);
308 skb = mt7925_regd_query_regdb(phy, alpha2);
309 mt792x_mutex_release(dev);
310
311 if (!skb)
312 return -EINVAL;
313
314 ev = (struct mt7925_regd_rule_ev *)(skb->data + 4);
315 num_of_rules = le32_to_cpu(ev->n_reg_rules);
316
317 if (!num_of_rules ||
318 WARN_ON_ONCE(num_of_rules > NL80211_MAX_SUPP_REG_RULES)) {
319 ret = -EINVAL;
320 goto err;
321 }
322
323 regd = kzalloc(struct_size(regd, reg_rules, num_of_rules), GFP_KERNEL);
324 if (!regd) {
325 ret = -ENOMEM;
326 goto err;
327 }
328
329 for (i = 0; i < num_of_rules; i++) {
330 mt7925_rule = &ev->reg_rule[i];
331 rule = ®d->reg_rules[i];
332
333 rule->freq_range.start_freq_khz =
334 MHZ_TO_KHZ(mt7925_rule->start_freq);
335 rule->freq_range.end_freq_khz =
336 MHZ_TO_KHZ(mt7925_rule->end_freq);
337 rule->freq_range.max_bandwidth_khz =
338 MHZ_TO_KHZ(mt7925_rule->max_bw);
339 /* not used by fw */
340 rule->power_rule.max_antenna_gain = DBI_TO_MBI(6);
341 rule->power_rule.max_eirp = DBM_TO_MBM(22);
342 rule->flags = mt7925_rule->flags;
343 }
344
345 regd->n_reg_rules = num_of_rules;
346 regd->dfs_region = ev->dfs_region;
347
348 memcpy(regd->alpha2, alpha2, 2);
349 memcpy(mdev->alpha2, alpha2, 2);
350
351 dev->regd_change = true;
352 mt7925_mcu_regd_update(dev, alpha2, ENVIRON_ANY);
353
354 ret = regulatory_set_wiphy_regd(wiphy, regd);
355
356 kfree(regd);
357 err:
358 dev_kfree_skb(skb);
359
360 if (ret < 0)
> 361 return regulatory_set_wiphy_regd(wiphy, &mt7925_regd_ww);
362
363 return ret;
364 }
365 EXPORT_SYMBOL_GPL(mt7925_regd_update);
366
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2026-06-03 20:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 7:53 [PATCH] wifi: mt76: mt7925: add regulatory wiphy self manager support JB Tsai
2026-06-03 14:41 ` kernel test robot
2026-06-03 20:27 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202606032205.iaSDVq2Z-lkp@intel.com \
--to=lkp@intel.com \
--cc=Charlie-cy.Wu@mediatek.com \
--cc=Deren.Wu@mediatek.com \
--cc=Leon.Yen@mediatek.com \
--cc=Quan.Zhou@mediatek.com \
--cc=Ryder.Lee@mediatek.com \
--cc=Sean.Wang@mediatek.com \
--cc=jb.tsai@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=litien.chang@mediatek.com \
--cc=llvm@lists.linux.dev \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox