Files
linux/drivers
Breno Leitao b73c138a87 wifi: iwlwifi: pcie: allocate dummy net_device dynamically
struct net_device shouldn't be embedded into any structure, instead,
the owner should use the priv space to embed their state into net_device.

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 iwl_trans_pcie by converting it
into a pointer. Then use the leverage alloc_netdev() to allocate the
net_device object at iwl_trans_pcie_alloc.

The private data of net_device becomes a pointer for the struct
iwl_trans_pcie, so, it is easy to get back to the iwl_trans_pcie parent
given the net_device object.

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

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://msgid.link/20240501165417.3406039-1-leitao@debian.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-05-03 10:01:52 +02:00
..
2024-03-07 21:52:03 +00:00
2024-03-07 20:37:04 +00:00
2024-02-19 21:23:28 +01:00
2024-03-07 20:32:47 +00:00
2024-03-07 20:32:38 +00:00
2024-03-27 13:17:15 +01:00
2024-02-20 13:36:34 +01:00
2024-02-19 11:10:55 +01:00