wifi: rtw88: Un-embed dummy device
authorBreno Leitao <leitao@debian.org>
Thu, 25 Apr 2024 08:29:09 +0000 (01:29 -0700)
committerPing-Ke Shih <pkshih@realtek.com>
Thu, 9 May 2024 06:16:39 +0000 (14:16 +0800)
commitd0bcb10e7b94861c714ab1e62c98bf8abaa37527
tree276f5a8cc04d4b28468200425472300733493901
parent4c9aa94a39e6ef1a1381b1e6d841105fee5b7c96
wifi: rtw88: Un-embed dummy 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 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/

Tested with RTL8723DE and RTL8822CE.

Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240425082910.2824393-1-leitao@debian.org
drivers/net/wireless/realtek/rtw88/pci.c
drivers/net/wireless/realtek/rtw88/pci.h