drivers/net/wireless/mediatek/mt76/dma.c:601:39: error: 'struct mtk_wed_device' has no member named 'version'

kernel test robot <[email protected]> Mon, 03 Aug 2026 17:45:37 +0200
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://github.com/intel-lab-lkp/linux/commits/Felix-Fietkau/wifi-mt76-check-txfree-done-event-on-the-WED-hw-path/20260803-182427
head:   261b0cd9ec58080c2f56a5e6d9015b1081d564e7
commit: 027db2aff0a37c106cbda90adb0101e30b4546e8 wifi: mt76: check txfree done event on the WED hw path
date:   5 hours ago
config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260803/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260803/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   drivers/net/wireless/mediatek/mt76/dma.c: In function 'mt76_dma_dequeue':
>> drivers/net/wireless/mediatek/mt76/dma.c:601:39: error: 'struct mtk_wed_device' has no member named 'version'
     601 |                 else if (dev->mmio.wed.version > 2 &&
         |                                       ^


vim +601 drivers/net/wireless/mediatek/mt76/dma.c

   549	
   550	static void *
   551	mt76_dma_dequeue(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
   552			 int *len, u32 *info, bool *more, bool *drop)
   553	{
   554		int idx = q->tail;
   555	
   556		*more = false;
   557		if (!q->queued)
   558			return NULL;
   559	
   560		if (mt76_queue_is_wed_rro_data(q) || mt76_queue_is_wed_rro_msdu_pg(q))
   561			goto done;
   562	
   563		if (mt76_queue_is_wed_rro_ind(q)) {
   564			struct mt76_wed_rro_ind *cmd;
   565			u8 magic_cnt;
   566	
   567			if (flush)
   568				goto done;
   569	
   570			cmd = q->entry[idx].buf;
   571			magic_cnt = FIELD_GET(RRO_IND_DATA1_MAGIC_CNT_MASK,
   572					      le32_to_cpu(cmd->data1));
   573			if (magic_cnt != q->magic_cnt)
   574				return NULL;
   575	
   576			if (q->tail == q->ndesc - 1)
   577				q->magic_cnt = (q->magic_cnt + 1) % MT_DMA_WED_IND_CMD_CNT;
   578		} else if (mt76_queue_is_wed_rro_rxdmad_c(q)) {
   579			struct mt76_rro_rxdmad_c *dmad;
   580			u16 magic_cnt;
   581	
   582			if (flush)
   583				goto done;
   584	
   585			dmad = q->entry[idx].buf;
   586			magic_cnt = FIELD_GET(RRO_RXDMAD_DATA3_MAGIC_CNT_MASK,
   587					      le32_to_cpu(dmad->data3));
   588			if (magic_cnt != q->magic_cnt)
   589				return NULL;
   590	
   591			if (q->tail == q->ndesc - 1)
   592				q->magic_cnt = (q->magic_cnt + 1) % MT_DMA_MAGIC_CNT;
   593		} else {
   594			if (flush)
   595				q->desc[idx].ctrl |= cpu_to_le32(MT_DMA_CTL_DMA_DONE);
   596			else if (!(q->desc[idx].ctrl & cpu_to_le32(MT_DMA_CTL_DMA_DONE)))
   597				return NULL;
   598			/* on WED v3 the M_DONE bit signals that WED is done reading
   599			 * the txfree descriptor; WED v2 does not set it
   600			 */
 > 601			else if (dev->mmio.wed.version > 2 &&
   602				 mt76_queue_is_wed_tx_free(q) &&
   603				 !(q->desc[idx].ctrl & cpu_to_le32(MT_DMA_CTL_M_DONE)))
   604				return NULL;
   605		}
   606	done:
   607		q->tail = (q->tail + 1) % q->ndesc;
   608		q->queued--;
   609	
   610		return mt76_dma_get_buf(dev, q, idx, len, info, more, drop, flush);
   611	}
   612	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki