Skip to contentSkip to conversation

mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY

PATCH In review Felix Fietkau 2 participants 3 messages May 7, 2021 – May 15, 2021

Subsystems (2)
lore
Share & tools
lore

Felix Fietkau

author maintainer
#0 lore raw

PATCH 1/2 mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY

The MT7921 firmware needs this to enable tx A-MPDU properly

---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +4 -0
index fe0ab5e5ff81..619561606f96 100644
@@ -721,6 +721,10 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
 	phy->phy_type = mt76_connac_get_phy_mode_v2(mphy, vif, band, sta);
 	phy->basic_rate = cpu_to_le16((u16)vif->bss_conf.basic_rates);
 	phy->rcpi = rcpi;
+	phy->ampdu = FIELD_PREP(IEEE80211_HT_AMPDU_PARM_FACTOR,
+				sta->ht_cap.ampdu_factor) |
+		     FIELD_PREP(IEEE80211_HT_AMPDU_PARM_DENSITY,
+				sta->ht_cap.ampdu_density);
 
 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra_info));
 	ra_info = (struct sta_rec_ra_info *)tlv;
Signature · 1 line
2.30.1
author maintainer
#1 lore raw

PATCH 2/2 mt76: mt7921: fix max aggregation subframes setting

The hardware can only handle 64 subframes in rx direction and 128 for tx. Improves throughput with APs that can handle more than that

---
 drivers/net/wireless/mediatek/mt76/mt7921/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7921/init.c +2 -2
index fe28bf4050c4..1763ea0614ce 100644
@@ -76,8 +76,8 @@ mt7921_init_wiphy(struct ieee80211_hw *hw)
 	struct wiphy *wiphy = hw->wiphy;
 
 	hw->queues = 4;
-	hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
-	hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
+	hw->max_rx_aggregation_subframes = 64;
+	hw->max_tx_aggregation_subframes = 128;
 
 	hw->radiotap_timestamp.units_pos =
 		IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US;
Signature · 1 line
2.30.1
#2 lore raw
In reply to Felix Fietkau
Quoted 4 lines · Felix Fietkau

The MT7921 firmware needs this to enable tx A-MPDU properly

2 patches applied to wireless-drivers.git, thanks.

d6245712add0 mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY 94bb18b03d43 mt76: mt7921: fix max aggregation subframes setting

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches