Commit 1aea6c05 authored by Breno Leitao's avatar Breno Leitao Committed by Greg Kroah-Hartman
Browse files

net: ibm/emac: allocate dummy net_device dynamically

[ Upstream commit 2eb5e25d ]

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 the private struct by converting it
into a pointer. Then use the leverage the new alloc_netdev_dummy()
helper to allocate and initialize dummy devices.

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



Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Stable-dep-of: 080ddc22 ("net: ibm: emac: mal: add dcr_unmap to _remove")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0f6dcaf4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment