]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: ath12k: allocate dummy net_device dynamically
authorBreno Leitao <leitao@debian.org>
Wed, 8 May 2024 09:54:09 +0000 (02:54 -0700)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 13 May 2024 14:19:13 +0000 (17:19 +0300)
commit4f9206e8c2c15a3770e3eb0b9755a05d559fecea
tree5f090bcdde5424a4e99f77b82985ae597cd13005
parent6d67d18014a8130defbca1972d7f0e0a8f8f259e
wifi: ath12k: allocate dummy net_device dynamically

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