Re: [PATCH wireless v2] wifi: mt76: mt7996: replace direct WTBL access with MCU for station statistics

kernel test robot
2026-04-07T14:57:37Z

Hi Joshua,

kernel test robot noticed the following build errors:

[auto build test ERROR on wireless/main]
[also build test ERROR on linus/master v7.0-rc7 next-20260406]
[cannot apply to wireless-next/main]
[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/Joshua-Klinesmith/wifi-mt76-mt7996-replace-direct-WTBL-access-with-MCU-for-station-statistics/20260407-151612
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git main
patch link: https://lore.kernel.org/r/20260407053855.75828-1-joshuaklinesmith%40gmail.com
patch subject: [PATCH wireless v2] wifi: mt76: mt7996: replace direct WTBL access with MCU for station statistics
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20260407/202604072310.QZ9n9tFj-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c80443cd37b2e2788cba67ffa180a6331e5f0791)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604072310.QZ9n9tFj-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/202604072310.QZ9n9tFj-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4870:10: error: incompatible pointer types assigning to 'struct mt76_vif_link *' from 'struct mt76_vif_data *' [-Wincompatible-pointer-types]
4870 | mvif = &msta_link->sta->vif->mt76;
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:4871:35: error: no member named 'link' in 'struct mt76_vif_link'
4871 | mlink = rcu_dereference(mvif->link[wcid->link_id]);
| ~~~~ ^
11 errors generated.

vim +4870 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c

4786
4787 int mt7996_mcu_get_per_sta_info(struct mt7996_phy *phy, u16 tag)
4788 {
4789 struct mt7996_dev *dev = phy->dev;
4790 struct mt7996_mcu_per_sta_info_event *res;
4791 struct mt76_wcid *wcid;
4792 struct sk_buff *skb;
4793 int i, ret, sta_num, resp_sta_num;
4794 int wcid_idx = 0;
4795 struct {
4796 u8 _rsv1;
4797 u8 unsolicit;
4798 u8 _rsv2[2];
4799
4800 __le16 tag;
4801 __le16 len;
4802 __le16 sta_num;
4803 u8 _rsv3[2];
4804 __le16 wlan_idx[PER_STA_INFO_MAX_NUM];
4805 } __packed req = {
4806 .tag = cpu_to_le16(tag),
4807 .len = cpu_to_le16(sizeof(req) - 4),
4808 };
4809
4810 while (wcid_idx < mt7996_wtbl_size(dev)) {
4811 sta_num = 0;
4812
4813 rcu_read_lock();
4814 for (i = wcid_idx;
4815 i < mt7996_wtbl_size(dev) && sta_num < PER_STA_INFO_MAX_NUM;
4816 i++) {
4817 wcid = rcu_dereference(dev->mt76.wcid[i]);
4818 if (!wcid || !wcid->sta)
4819 continue;
4820 req.wlan_idx[sta_num++] = cpu_to_le16(i);
4821 }
4822 rcu_read_unlock();
4823 wcid_idx = i;
4824
4825 if (!sta_num)
4826 continue;
4827
4828 req.sta_num = cpu_to_le16(sta_num);
4829
4830 ret = mt76_mcu_send_and_get_msg(&dev->mt76,
4831 MCU_WM_UNI_CMD(PER_STA_INFO),
4832 &req, sizeof(req), true, &skb);
4833 if (ret)
4834 return ret;
4835
4836 res = (struct mt7996_mcu_per_sta_info_event *)skb->data;
4837
4838 resp_sta_num = le16_to_cpu(res->sta_num);
4839 if (resp_sta_num > sta_num ||
4840 skb->len < struct_size(res, rssi, resp_sta_num)) {
4841 dev_kfree_skb(skb);
4842 return -EINVAL;
4843 }
4844
4845 rcu_read_lock();
4846 for (i = 0; i < resp_sta_num; i++) {
4847 struct mt7996_sta_link *msta_link;
4848 struct mt76_vif_link *mvif;
4849 struct mt76_vif_link *mlink;
4850 struct mt76_phy *mphy;
4851 u16 wlan_idx;
4852 s8 rssi[4];
4853
4854 switch (tag) {
4855 case UNI_PER_STA_RSSI:
4856 wlan_idx = le16_to_cpu(res->rssi[i].wlan_idx);
4857 wcid = mt76_wcid_ptr(dev, wlan_idx);
4858 if (!wcid || !wcid->sta)
4859 break;
4860
4861 msta_link = container_of(wcid,
4862 struct mt7996_sta_link,
4863 wcid);
4864
4865 rssi[0] = (res->rssi[i].rcpi[0] - 220) / 2;
4866 rssi[1] = (res->rssi[i].rcpi[1] - 220) / 2;
4867 rssi[2] = (res->rssi[i].rcpi[2] - 220) / 2;
4868 rssi[3] = (res->rssi[i].rcpi[3] - 220) / 2;
4869
> 4870 mvif = &msta_link->sta->vif->mt76;
4871 mlink = rcu_dereference(mvif->link[wcid->link_id]);
4872 if (mlink) {
4873 mphy = mt76_vif_link_phy(mlink);
4874 if (mphy)
4875 msta_link->ack_signal =
4876 mt76_rx_signal(mphy->antenna_mask,
4877 rssi);
4878 }
4879
4880 ewma_avg_signal_add(&msta_link->avg_ack_signal,
4881 -msta_link->ack_signal);
4882 break;
4883 }
4884 }
4885 rcu_read_unlock();
4886
4887 dev_kfree_skb(skb);
4888 }
4889
4890 return 0;
4891 }
4892

--
0-DAY CI Kernel Test Service