Re: [PATCH wireless-next] wil6210: Do not use embedded netdev in wil6210_priv

From: Kalle Valo
Date: Tue May 07 2024 - 06:05:49 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 wil6210_priv by converting it
> into a pointer. Then use the leverage alloc_netdev_dummy() to allocate
> the net_device object at wil_if_add(). The free of the device
> occurs at wil_if_remove().
>
> 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.

10d2b4f4aa0b wifi: wil6210: Do not use embedded netdev in wil6210_priv

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

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