wifi: mt7915: move capability check to start_ap

Avoid using it for non-AP modes

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2023-06-30 11:01:52 +02:00
parent d7d7479b00
commit 1377f586c6
2 changed files with 19 additions and 19 deletions
+19
View File
@@ -658,6 +658,23 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
mutex_unlock(&dev->mt76.mutex);
}
static void
mt7915_vif_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif)
{
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
struct mt7915_vif_cap *vc = &mvif->cap;
vc->vht_ldpc = mvif->cap.vht_ldpc;
vc->vht_su_ebfer = mvif->cap.vht_su_ebfer;
vc->vht_su_ebfee = mvif->cap.vht_su_ebfee;
vc->vht_mu_ebfer = mvif->cap.vht_mu_ebfer;
vc->vht_mu_ebfee = mvif->cap.vht_mu_ebfee;
vc->he_ldpc = mvif->cap.he_ldpc;
vc->he_su_ebfer = mvif->cap.he_su_ebfer;
vc->he_su_ebfee = mvif->cap.he_su_ebfee;
vc->he_mu_ebfer = vif->bss_conf.he_mu_beamformer;
}
static int
mt7915_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link_conf)
@@ -668,6 +685,8 @@ mt7915_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
mutex_lock(&dev->mt76.mutex);
mt7915_vif_check_caps(phy, vif);
err = mt7915_mcu_add_bss_info(phy, vif, true);
if (err)
goto out;
-19
View File
@@ -1882,23 +1882,6 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
memcpy(buf + MT_TXD_SIZE, skb->data, skb->len);
}
static void
mt7915_mcu_vif_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif)
{
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
struct mt7915_vif_cap *vc = &mvif->cap;
vc->vht_ldpc = mvif->cap.vht_ldpc;
vc->vht_su_ebfer = mvif->cap.vht_su_ebfer;
vc->vht_su_ebfee = mvif->cap.vht_su_ebfee;
vc->vht_mu_ebfer = mvif->cap.vht_mu_ebfer;
vc->vht_mu_ebfee = mvif->cap.vht_mu_ebfee;
vc->he_ldpc = mvif->cap.he_ldpc;
vc->he_su_ebfer = mvif->cap.he_su_ebfer;
vc->he_su_ebfee = mvif->cap.he_su_ebfee;
vc->he_mu_ebfer = vif->bss_conf.he_mu_beamformer;
}
static void
mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
struct sk_buff *rskb, struct bss_info_bcn *bcn,
@@ -2009,8 +1992,6 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
info = IEEE80211_SKB_CB(skb);
info->hw_queue = FIELD_PREP(MT_TX_HW_QUEUE_PHY, ext_phy);
mt7915_mcu_vif_check_caps(phy, vif);
mt7915_mcu_beacon_cntdwn(vif, rskb, skb, bcn, &offs);
mt7915_mcu_beacon_mbss(rskb, skb, vif, bcn, &offs);
mt7915_mcu_beacon_cont(dev, vif, rskb, skb, bcn, &offs);