wifi: rtl8xxxu: extend wifi connected check to both interfaces
authorMartin Kaistra <martin.kaistra@linutronix.de>
Fri, 22 Dec 2023 10:14:27 +0000 (11:14 +0100)
committerKalle Valo <kvalo@kernel.org>
Wed, 10 Jan 2024 14:52:56 +0000 (16:52 +0200)
commit9aa776209ca31695bead52674ad943848ccc97d5
tree99501e2d50092d5706da7e117b80f6ab4d5d2506
parent00add60cad3c9690ac0f9d4f6685f96ccd607670
wifi: rtl8xxxu: extend wifi connected check to both interfaces

There are multiple places in the code where the current connection
status of wifi is checked. The driver will support two interfaces soon
and either one of them (or both) could be connected.

Convert all uses of (vif && vif->cfg.assoc) to a new helper
function rtl8xxxu_is_assoc() which checks both interfaces.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-7-martin.kaistra@linutronix.de
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c