2021-01-05 05:45:12

by Shayne Chen

[permalink] [raw]
Subject: [PATCH] mt76: mt7915: force ldpc for bw larger than 20MHz in testmode

LDPC should be set when bw is larger than 20MHz to make
testmode tx work normally.

Signed-off-by: Shayne Chen <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index dc1f56fb823d..e8787c336a55 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -700,7 +700,7 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
if (mode >= MT_PHY_TYPE_HE_SU)
val |= FIELD_PREP(MT_TXD6_HELTF, td->tx_ltf);

- if (td->tx_rate_ldpc)
+ if (td->tx_rate_ldpc || bw > 0)
val |= MT_TXD6_LDPC;

txwi[6] |= cpu_to_le32(val);
--
2.29.2


2021-01-06 00:52:35

by Ryder Lee

[permalink] [raw]
Subject: Re: [PATCH] mt76: mt7915: force ldpc for bw larger than 20MHz in testmode

On Tue, 2021-01-05 at 13:41 +0800, Shayne Chen wrote:
> LDPC should be set when bw is larger than 20MHz to make
> testmode tx work normally.
>
> Signed-off-by: Shayne Chen <[email protected]>
> ---
> drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
> index dc1f56fb823d..e8787c336a55 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
> @@ -700,7 +700,7 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
> if (mode >= MT_PHY_TYPE_HE_SU)
> val |= FIELD_PREP(MT_TXD6_HELTF, td->tx_ltf);
>
> - if (td->tx_rate_ldpc)
> + if (td->tx_rate_ldpc || bw > 0)

Prefer explicitly checking bw > IEEE80211_STA_RX_BW_20

> val |= MT_TXD6_LDPC;
>
> txwi[6] |= cpu_to_le32(val);

Ryder