mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: fix survey regression
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+4
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user