mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 17:27:11 -04:00
wifi: mt76: fix available_antennas setting
Check if available_antennas_tx and available_antennas_rx are already set
during the per-chip initialization phase; otherwise, they could be
overwritten with incorrect values.
Fixes: 69d54ce749 ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Link: https://patch.msgid.link/20250515032952.1653494-8-shayne.chen@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
42cb27af34
commit
249173e94d
@@ -449,8 +449,10 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS);
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AQL);
|
||||
|
||||
wiphy->available_antennas_tx = phy->antenna_mask;
|
||||
wiphy->available_antennas_rx = phy->antenna_mask;
|
||||
if (!wiphy->available_antennas_tx)
|
||||
wiphy->available_antennas_tx = phy->antenna_mask;
|
||||
if (!wiphy->available_antennas_rx)
|
||||
wiphy->available_antennas_rx = phy->antenna_mask;
|
||||
|
||||
wiphy->sar_capa = &mt76_sar_capa;
|
||||
phy->frp = devm_kcalloc(dev->dev, wiphy->sar_capa->num_freq_ranges,
|
||||
|
||||
Reference in New Issue
Block a user