mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00: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: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
8808d7c4ee
commit
36e0b90e47
+4
-2
@@ -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