From 02f453d8dfc8f61124a96d6aac32b2573df31469 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 13 Jan 2025 19:00:58 +0100 Subject: [PATCH] wifi: mt76: fix survey regression Signed-off-by: Felix Fietkau --- mac80211.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mac80211.c b/mac80211.c index 24f91756..20afd9f0 100644 --- a/mac80211.c +++ b/mac80211.c @@ -1035,9 +1035,6 @@ EXPORT_SYMBOL_GPL(mt76_update_channel); static struct mt76_sband * mt76_get_survey_sband(struct mt76_phy *phy, int *idx) { - if (idx == 0 && phy->dev->drv->update_survey) - mt76_update_survey(phy); - if (*idx < phy->sband_2g.sband.n_channels) return &phy->sband_2g; @@ -1073,6 +1070,10 @@ int mt76_get_survey(struct ieee80211_hw *hw, int idx, continue; sband = mt76_get_survey_sband(phy, &idx); + + if (idx == 0 && phy->dev->drv->update_survey) + mt76_update_survey(phy); + if (sband || !hw->wiphy->n_radio) break; }