[PATCH net-next v2 2/7] net: airoha: npu: Add NPU wlan memory initialization commands

Lorenzo Bianconi lorenzo at kernel.org
Mon Jul 7 00:24:31 PDT 2025


> On Sat, Jul 05, 2025 at 11:09:46PM +0200, Lorenzo Bianconi wrote:
> > +
> >  struct airoha_npu *airoha_npu_get(struct device *dev, dma_addr_t *stats_addr)
> >  {
> >  	struct platform_device *pdev;
> > @@ -493,6 +573,7 @@ static int airoha_npu_probe(struct platform_device *pdev)
> >  	npu->ops.ppe_deinit = airoha_npu_ppe_deinit;
> >  	npu->ops.ppe_flush_sram_entries = airoha_npu_ppe_flush_sram_entries;
> >  	npu->ops.ppe_foe_commit_entry = airoha_npu_foe_commit_entry;
> > +	npu->ops.wlan_init_reserved_memory = airoha_npu_wlan_init_memory;
> 
> I cannot find in your code single place calling this (later you add a
> wrapper... which is not called either).
> 
> All this looks like dead code...

As pointed out in the commit log, these callbacks will be used by MT76 driver
to initialize the NPU reserved memory and registers during driver probe in
order to initialize the WiFi offloading. Since MT76 patches are going via
the wireless tree, I needed to add these callbacks first.

Regards,
Lorenzo

> 
> Best regards,
> Krzysztof
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20250707/667c71d9/attachment-0001.sig>


More information about the Linux-mediatek mailing list