Skip to content
Commit bca592ea authored by Breno Leitao's avatar Breno Leitao Committed by David S. Miller
Browse files

wifi: ath11k: 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 ath11k_ext_irq_grp by converting it
into a pointer. Then use the leverage alloc_netdev() to allocate the
net_device object at ath11k_ahb_config_ext_irq() for ahb, and
ath11k_pcic_ext_irq_config() for pcic.

The free of the device occurs at ath11k_ahb_free_ext_irq() for the ahb
case, and ath11k_pcic_free_ext_irq() for the pcic case.

[1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/

Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Tested-by: default avatarKalle Valo <kvalo@kernel.org>
Acked-by: default avatarKalle Valo <kvalo@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 57738dab
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment