[PATCH] wifi: mt76: mt7921: add rfkill_poll for hardware rfkill
kernel test robot
lkp at intel.com
Sun Dec 8 20:10:17 PST 2024
Hi Allan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.13-rc1 next-20241206]
[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/Allan-Wang/wifi-mt76-mt7921-add-rfkill_poll-for-hardware-rfkill/20241206-094523
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20241206014355.32426-1-allan.wang%40mediatek.com
patch subject: [PATCH] wifi: mt76: mt7921: add rfkill_poll for hardware rfkill
config: powerpc-randconfig-r113-20241207 (https://download.01.org/0day-ci/archive/20241207/202412071431.tF1EfPaT-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce: (https://download.01.org/0day-ci/archive/20241207/202412071431.tF1EfPaT-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412071431.tF1EfPaT-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:69:28: sparse: sparse: cast to restricted __le32
vim +69 drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
17
18 int mt7921_mcu_parse_response(struct mt76_dev *mdev, int cmd,
19 struct sk_buff *skb, int seq)
20 {
21 int mcu_cmd = FIELD_GET(__MCU_CMD_FIELD_ID, cmd);
22 struct mt76_connac2_mcu_rxd *rxd;
23 int ret = 0;
24
25 if (!skb) {
26 dev_err(mdev->dev, "Message %08x (seq %d) timeout\n",
27 cmd, seq);
28 mt792x_reset(mdev);
29
30 return -ETIMEDOUT;
31 }
32
33 rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
34 if (seq != rxd->seq)
35 return -EAGAIN;
36
37 if (cmd == MCU_CMD(PATCH_SEM_CONTROL) ||
38 cmd == MCU_CMD(PATCH_FINISH_REQ)) {
39 skb_pull(skb, sizeof(*rxd) - 4);
40 ret = *skb->data;
41 } else if (cmd == MCU_EXT_CMD(THERMAL_CTRL)) {
42 skb_pull(skb, sizeof(*rxd) + 4);
43 ret = le32_to_cpu(*(__le32 *)skb->data);
44 } else if (cmd == MCU_UNI_CMD(DEV_INFO_UPDATE) ||
45 cmd == MCU_UNI_CMD(BSS_INFO_UPDATE) ||
46 cmd == MCU_UNI_CMD(STA_REC_UPDATE) ||
47 cmd == MCU_UNI_CMD(HIF_CTRL) ||
48 cmd == MCU_UNI_CMD(OFFLOAD) ||
49 cmd == MCU_UNI_CMD(SUSPEND)) {
50 struct mt76_connac_mcu_uni_event *event;
51
52 skb_pull(skb, sizeof(*rxd));
53 event = (struct mt76_connac_mcu_uni_event *)skb->data;
54 ret = le32_to_cpu(event->status);
55 /* skip invalid event */
56 if (mcu_cmd != event->cid)
57 ret = -EAGAIN;
58 } else if (cmd == MCU_CE_QUERY(REG_READ)) {
59 struct mt76_connac_mcu_reg_event *event;
60
61 skb_pull(skb, sizeof(*rxd));
62 event = (struct mt76_connac_mcu_reg_event *)skb->data;
63 ret = (int)le32_to_cpu(event->val);
64 } else if (cmd == MCU_EXT_CMD(WF_RF_PIN_CTRL)) {
65 struct mt7921_wf_rf_pin_ctrl_event *event;
66
67 skb_pull(skb, sizeof(*rxd));
68 event = (struct mt7921_wf_rf_pin_ctrl_event *)skb->data;
> 69 ret = (int)le32_to_cpu(event->result);
70 } else {
71 skb_pull(skb, sizeof(struct mt76_connac2_mcu_rxd));
72 }
73
74 return ret;
75 }
76 EXPORT_SYMBOL_GPL(mt7921_mcu_parse_response);
77
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-mediatek
mailing list