Skip to content
Commit 08f116c9 authored by Breno Leitao's avatar Breno Leitao Committed by Jakub Kicinski
Browse files

wifi: mt76: un-embedd netdev from mt76_dev

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_devices from struct mt76_dev by converting them
into pointers, and allocating them dynamically. Use the leverage
alloc_netdev_dummy() to allocate the net_device object at
mt76_dma_init().

The free of the device occurs at mt76_dma_cleanup().

Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/

 [1]
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Acked-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240619105311.3144908-1-leitao@debian.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d21a103b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment