Re: [PATCH wireless-next v2] wifi: ath12k: allocate dummy net_device dynamically

From: Kalle Valo
Date: Mon May 13 2024 - 10:19:34 EST


Breno Leitao <leitao@xxxxxxxxxx> wrote:

> Embedding net_device into structures prohibits the usage of flexible
> arrays in the net_device structure. For more details, see the discussion
> at [1].
>
> Un-embed the net_device from struct ath12k_ext_irq_grp by converting it
> into a pointer. Then use the leverage alloc_netdev_dummy() to allocate
> the net_device object at ath12k_pci_ext_irq_config().
>
> The free of the device occurs at ath12k_pci_free_ext_irq().
>
> Link: https://lore.kernel.org/all/20240229225910.79e224cf@xxxxxxxxxx/ [1]
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
> Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>

Patch applied to ath-next branch of ath.git, thanks.

4f9206e8c2c1 wifi: ath12k: allocate dummy net_device dynamically

--
https://patchwork.kernel.org/project/linux-wireless/patch/20240508095410.1923198-1-leitao@xxxxxxxxxx/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches