]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: wil6210: Do not use embedded netdev in wil6210_priv
authorBreno Leitao <leitao@debian.org>
Fri, 3 May 2024 10:32:56 +0000 (03:32 -0700)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 7 May 2024 10:05:24 +0000 (13:05 +0300)
commit10d2b4f4aa0b9a1ac55d2313d2c682add25e31c6
tree49a68a354181e80a67a83a0fbfe0a1febf513e38
parent4c2b796be3a12a11ab611917fafdabc9d3862a1d
wifi: wil6210: Do not use embedded netdev in wil6210_priv

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@kernel.org/
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240503103304.339489-1-leitao@debian.org
drivers/net/wireless/ath/wil6210/netdev.c
drivers/net/wireless/ath/wil6210/wil6210.h