mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: connac: move mt76_connac_mcu_bss_ext_tlv in connac module
Move mt7915_mcu_bss_ext_tlv/mt7615_mcu_bss_ext_tlv in connac module since it is shared between mt7615 and mt7915 drivers. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
9198eca1b1
commit
829d87a93a
+1
-21
@@ -836,26 +836,6 @@ mt7615_mcu_bss_basic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* SIFS 20us + 512 byte beacon tranmitted by 1Mbps (3906us) */
|
||||
#define BCN_TX_ESTIMATE_TIME (4096 + 20)
|
||||
static void
|
||||
mt7615_mcu_bss_ext_tlv(struct sk_buff *skb, struct mt7615_vif *mvif)
|
||||
{
|
||||
struct bss_info_ext_bss *ext;
|
||||
int ext_bss_idx, tsf_offset;
|
||||
struct tlv *tlv;
|
||||
|
||||
ext_bss_idx = mvif->mt76.omac_idx - EXT_BSSID_START;
|
||||
if (ext_bss_idx < 0)
|
||||
return;
|
||||
|
||||
tlv = mt76_connac_mcu_add_tlv(skb, BSS_INFO_EXT_BSS, sizeof(*ext));
|
||||
|
||||
ext = (struct bss_info_ext_bss *)tlv;
|
||||
tsf_offset = ext_bss_idx * BCN_TX_ESTIMATE_TIME;
|
||||
ext->mbss_tsf_offset = cpu_to_le32(tsf_offset);
|
||||
}
|
||||
|
||||
static int
|
||||
mt7615_mcu_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, bool enable)
|
||||
@@ -878,7 +858,7 @@ mt7615_mcu_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
||||
|
||||
if (enable && mvif->mt76.omac_idx >= EXT_BSSID_START &&
|
||||
mvif->mt76.omac_idx < REPEATER_BSSID_START)
|
||||
mt7615_mcu_bss_ext_tlv(skb, mvif);
|
||||
mt76_connac_mcu_bss_ext_tlv(skb, &mvif->mt76);
|
||||
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD(BSS_INFO_UPDATE), true);
|
||||
|
||||
Reference in New Issue
Block a user