Commit d0116058 authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt7615: fix sta ampdu factor for VHT

If VHT has a larger A-MPDU size limit, pass it to the MCU via the wtbl_ht
TLV element.
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 5416651c
...@@ -924,11 +924,10 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, ...@@ -924,11 +924,10 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
void *sta_wtbl, void *wtbl_tlv) void *sta_wtbl, void *wtbl_tlv)
{ {
struct tlv *tlv; struct tlv *tlv;
struct wtbl_ht *ht = NULL;
u32 flags = 0; u32 flags = 0;
if (sta->ht_cap.ht_supported) { if (sta->ht_cap.ht_supported) {
struct wtbl_ht *ht;
tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_HT, sizeof(*ht), tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_HT, sizeof(*ht),
wtbl_tlv, sta_wtbl); wtbl_tlv, sta_wtbl);
ht = (struct wtbl_ht *)tlv; ht = (struct wtbl_ht *)tlv;
...@@ -945,6 +944,7 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, ...@@ -945,6 +944,7 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
if (sta->vht_cap.vht_supported) { if (sta->vht_cap.vht_supported) {
struct wtbl_vht *vht; struct wtbl_vht *vht;
u8 af;
tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_VHT, sizeof(*vht), tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_VHT, sizeof(*vht),
wtbl_tlv, sta_wtbl); wtbl_tlv, sta_wtbl);
...@@ -952,6 +952,13 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, ...@@ -952,6 +952,13 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
vht->ldpc = sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC, vht->ldpc = sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC,
vht->vht = 1; vht->vht = 1;
af = (sta->vht_cap.cap &
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK) >>
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT;
if (ht)
ht->af = max(ht->af, af);
if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80) if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
flags |= MT_WTBL_W5_SHORT_GI_80; flags |= MT_WTBL_W5_SHORT_GI_80;
if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160) if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment