summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2024-06-26 20:35:02 +0300
committerJakub Kicinski <kuba@kernel.org>2024-06-28 02:55:34 +0300
commit94833addfaba89d12e5dbd82e350a692c00648ab (patch)
tree9fcd0195e1b25e4ca5f74663e5ac534f5debb45d /net/wireless
parent2d5f6801db8ec0ce97bc520ecd51a7be06a35042 (diff)
downloadlinux-94833addfaba89d12e5dbd82e350a692c00648ab.tar.xz
net: thunderx: Unembed netdev structure
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 lmac by converting them into pointers, and allocating them dynamically. Use the leverage alloc_netdev() to allocate the net_device object at bgx_lmac_enable(). The free of the device occurs at bgx_lmac_disable(). Do not free_netdevice() if bgx_lmac_enable() fails after lmac->netdev is allocated, since bgx_lmac_disable() is called if bgx_lmac_enable() fails, and lmac->netdev will be freed there (similarly to lmac->dmacs). Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1] Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20240626173503.87636-1-leitao@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/wireless')
0 files changed, 0 insertions, 0 deletions