public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] mt76: mt7615: fix sta ampdu factor for VHT
@ 2020-04-22 16:04 Felix Fietkau
  2020-04-22 16:04 ` [PATCH 2/9] mt76: fix A-MPDU density handling Felix Fietkau
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Felix Fietkau @ 2020-04-22 16:04 UTC (permalink / raw)
  To: linux-wireless

If VHT has a larger A-MPDU size limit, pass it to the MCU via the wtbl_ht
TLV element.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index dc297856b749..24b78d10d7f7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -924,11 +924,10 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
 		       void *sta_wtbl, void *wtbl_tlv)
 {
 	struct tlv *tlv;
+	struct wtbl_ht *ht = NULL;
 	u32 flags = 0;
 
 	if (sta->ht_cap.ht_supported) {
-		struct wtbl_ht *ht;
-
 		tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_HT, sizeof(*ht),
 						wtbl_tlv, sta_wtbl);
 		ht = (struct wtbl_ht *)tlv;
@@ -945,6 +944,7 @@ mt7615_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
 
 	if (sta->vht_cap.vht_supported) {
 		struct wtbl_vht *vht;
+		u8 af;
 
 		tlv = mt7615_mcu_add_nested_tlv(skb, WTBL_VHT, sizeof(*vht),
 						wtbl_tlv, sta_wtbl);
@@ -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->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)
 			flags |= MT_WTBL_W5_SHORT_GI_80;
 		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-22 16:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-22 16:04 [PATCH 1/9] mt76: mt7615: fix sta ampdu factor for VHT Felix Fietkau
2020-04-22 16:04 ` [PATCH 2/9] mt76: fix A-MPDU density handling Felix Fietkau
2020-04-22 16:04 ` [PATCH 3/9] mt76: mt7615: use larger rx buffers if VHT is supported Felix Fietkau
2020-04-22 16:04 ` [PATCH 4/9] mt76: mt7615: never use an 802.11b CF-End rate on 5GHz Felix Fietkau
2020-04-22 16:04 ` [PATCH 5/9] mt76: mt7603: " Felix Fietkau
2020-04-22 16:04 ` [PATCH 6/9] mt76: mt7615: adjust timing in mt7615_mac_set_timing to match fw/hw values Felix Fietkau
2020-04-22 16:04 ` [PATCH 7/9] mt76: mt7615: do not adjust MAC timings if the device is not running Felix Fietkau
2020-04-22 16:04 ` [PATCH 8/9] mt76: mt7615: fix tx status rate index calculation Felix Fietkau
2020-04-22 16:04 ` [PATCH 9/9] mt76: mt7603: " Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox