mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: rely on mt76_connac_mcu_wtbl_smps_tlv
Rely on mt76_connac_mcu_wtbl_smps_tlv routine in mt7915 and remove duplicated code. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
60394d3e35
commit
3a79454d07
+2
-15
@@ -1022,19 +1022,6 @@ mt7915_mcu_sta_amsdu_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
|
||||
msta->wcid.amsdu = true;
|
||||
}
|
||||
|
||||
static void
|
||||
mt7915_mcu_wtbl_smps_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
|
||||
void *sta_wtbl, void *wtbl_tlv)
|
||||
{
|
||||
struct wtbl_smps *smps;
|
||||
struct tlv *tlv;
|
||||
|
||||
tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_SMPS, sizeof(*smps),
|
||||
wtbl_tlv, sta_wtbl);
|
||||
smps = (struct wtbl_smps *)tlv;
|
||||
smps->smps = (sta->smps_mode == IEEE80211_SMPS_DYNAMIC);
|
||||
}
|
||||
|
||||
static void
|
||||
mt7915_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, void *sta_wtbl,
|
||||
@@ -1075,7 +1062,7 @@ mt7915_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
|
||||
ht->af = max_t(u8, ht->af, af);
|
||||
}
|
||||
|
||||
mt7915_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_tlv);
|
||||
mt76_connac_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_tlv);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1509,7 +1496,7 @@ int mt7915_mcu_add_smps(struct mt7915_dev *dev, struct ieee80211_vif *vif,
|
||||
if (IS_ERR(wtbl_hdr))
|
||||
return PTR_ERR(wtbl_hdr);
|
||||
|
||||
mt7915_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_hdr);
|
||||
mt76_connac_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_hdr);
|
||||
|
||||
ret = mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
MCU_EXT_CMD(STA_REC_UPDATE), true);
|
||||
|
||||
Reference in New Issue
Block a user