linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY
@ 2021-05-07 10:02 Felix Fietkau
  2021-05-07 10:02 ` [PATCH 5.13 2/2] mt76: mt7921: fix max aggregation subframes setting Felix Fietkau
  2021-05-15 11:45 ` [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Felix Fietkau @ 2021-05-07 10:02 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, Jayden Kuo

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

Reported-by: Jayden Kuo (郭育辰) <Jayden.Kuo@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index fe0ab5e5ff81..619561606f96 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -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;
-- 
2.30.1


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

* [PATCH 5.13 2/2] mt76: mt7921: fix max aggregation subframes setting
  2021-05-07 10:02 [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY Felix Fietkau
@ 2021-05-07 10:02 ` Felix Fietkau
  2021-05-15 11:45 ` [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2021-05-07 10:02 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo

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

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

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
index fe28bf4050c4..1763ea0614ce 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
@@ -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;
-- 
2.30.1


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

* Re: [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY
  2021-05-07 10:02 [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY Felix Fietkau
  2021-05-07 10:02 ` [PATCH 5.13 2/2] mt76: mt7921: fix max aggregation subframes setting Felix Fietkau
@ 2021-05-15 11:45 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-05-15 11:45 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, Jayden Kuo

Felix Fietkau <nbd@nbd.name> wrote:

> The MT7921 firmware needs this to enable tx A-MPDU properly
> 
> Reported-by: Jayden Kuo (郭育辰) <Jayden.Kuo@mediatek.com>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>

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

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210507100211.15709-1-nbd@nbd.name/

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


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

end of thread, other threads:[~2021-05-15 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 10:02 [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY Felix Fietkau
2021-05-07 10:02 ` [PATCH 5.13 2/2] mt76: mt7921: fix max aggregation subframes setting Felix Fietkau
2021-05-15 11:45 ` [PATCH 5.13 1/2] mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).