mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
wifi: mt76: mt7925: improve EHT capability control in regulatory flow
Move EHT flag handling into mt7925_regd_channel_update() to ensure correct channel capability reporting. Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20251031090352.1400079-5-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
3305100859
commit
6338709a4f
|
|
@ -1369,8 +1369,6 @@ void mt7925_scan_work(struct work_struct *work)
|
|||
if (!is_valid_alpha2(evt->alpha2))
|
||||
break;
|
||||
|
||||
mt7925_regd_be_ctrl(phy->dev, evt->alpha2);
|
||||
|
||||
if (mdev->alpha2[0] != '0' && mdev->alpha2[1] != '0')
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,17 @@ mt7925_regd_channel_update(struct wiphy *wiphy, struct mt792x_dev *dev)
|
|||
dev->phy.clc_chan_conf &= ~MT7925_UNII_6G_IS_VALID;
|
||||
}
|
||||
|
||||
sband = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
if (!sband)
|
||||
return;
|
||||
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
ch = &sband->channels[i];
|
||||
|
||||
if (!dev->has_eht)
|
||||
ch->flags |= IEEE80211_CHAN_NO_EHT;
|
||||
}
|
||||
|
||||
sband = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
if (!sband)
|
||||
return;
|
||||
|
|
@ -93,6 +104,9 @@ mt7925_regd_channel_update(struct wiphy *wiphy, struct mt792x_dev *dev)
|
|||
/* UNII-4 */
|
||||
if (IS_UNII_INVALID(0, 5845, 5925, ch->center_freq))
|
||||
ch->flags |= IEEE80211_CHAN_DISABLED;
|
||||
|
||||
if (!dev->has_eht)
|
||||
ch->flags |= IEEE80211_CHAN_NO_EHT;
|
||||
}
|
||||
|
||||
sband = wiphy->bands[NL80211_BAND_6GHZ];
|
||||
|
|
@ -108,6 +122,9 @@ mt7925_regd_channel_update(struct wiphy *wiphy, struct mt792x_dev *dev)
|
|||
IS_UNII_INVALID(3, 6525, 6875, ch->center_freq) ||
|
||||
IS_UNII_INVALID(4, 6875, 7125, ch->center_freq))
|
||||
ch->flags |= IEEE80211_CHAN_DISABLED;
|
||||
|
||||
if (!dev->has_eht)
|
||||
ch->flags |= IEEE80211_CHAN_NO_EHT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -128,6 +145,7 @@ int mt7925_mcu_regd_update(struct mt792x_dev *dev, u8 *alpha2,
|
|||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
mt7925_regd_be_ctrl(dev, alpha2);
|
||||
mt7925_regd_channel_update(wiphy, dev);
|
||||
|
||||
ret = mt7925_mcu_set_channel_domain(hw->priv);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user