Check first whether priv->vifs[0] exists and is of type STATION, otherwise go to priv->vifs[1]. Signed-off-by: Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx> --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index f54d7b1647792..0d171f61ac8e8 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -7190,7 +7190,9 @@ static void rtl8xxxu_watchdog_callback(struct work_struct *work) struct rtl8xxxu_priv *priv; priv = container_of(work, struct rtl8xxxu_priv, ra_watchdog.work); - vif = priv->vif; + vif = priv->vifs[0]; + if (vif && vif->type != NL80211_IFTYPE_STATION) + vif = priv->vifs[1]; if (vif && vif->type == NL80211_IFTYPE_STATION) { int signal; -- 2.39.2