* [PATCH v5 1/2] wifi: mt76: fix backoff fields and max_power calculation
@ 2026-02-12 0:36 Ryder Lee
2026-02-12 0:36 ` [PATCH v5 2/2] dt-bindings: net: wireless: mt76: clarify backoff limit usage Ryder Lee
0 siblings, 1 reply; 5+ messages in thread
From: Ryder Lee @ 2026-02-12 0:36 UTC (permalink / raw)
To: Felix Fietkau, Rob Herring
Cc: devicetree, linux-mediatek, linux-wireless, Allen Ye, Ryder Lee
From: Allen Ye <allen.ye@mediatek.com>
The maximum power value may exist in either the data or backoff field.
Previously, backoff power limits were not considered in txpower reporting.
This patch ensures mt76 also considers backoff values in the SKU table.
Also, each RU entry (RU26, RU52, RU106, BW20, ...) in the DTS corresponds
to 10 stream combinations (1T1ss, 2T1ss, 3T1ss, 4T1ss, 2T2ss, 3T2ss,
4T2ss, 3T3ss, 4T3ss, 4T4ss).
For beamforming tables:
- In connac2, beamforming entries for BW20~BW160, and OFDM do not include
1T1ss.
- In connac3, beamforming entries for BW20~BW160, and RU include 1T1ss,
but OFDM beamforming does not include 1T1ss.
Non-beamforming and RU entries for both connac2 and connac3 include 1T1ss.
Fixes: b05ab4be9fd7 ("wifi: mt76: mt7915: add bf backoff limit table support")
Signed-off-by: Allen Ye <allen.ye@mediatek.com>
Co-developed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
v1:
- Add "wifi:" prefix to the subject.
v2:
- Fix checkpatch errors.
- Remove unnecessary style changes.
- Add explanation for connac2 index adjustment.
v3:
- Fix "case"s for MT76_SKU_BACKOFF_BF_OFFSET and MT76_SKU_BACKOFF.
- add more explanation for connac2/connac3 tables.
---
drivers/net/wireless/mediatek/mt76/eeprom.c | 154 ++++++++++++++------
drivers/net/wireless/mediatek/mt76/mt76.h | 1 -
2 files changed, 109 insertions(+), 46 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index 573400d57..afdb73661 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -9,6 +9,13 @@
#include <linux/nvmem-consumer.h>
#include <linux/etherdevice.h>
#include "mt76.h"
+#include "mt76_connac.h"
+
+enum mt76_sku_type {
+ MT76_SKU_RATE,
+ MT76_SKU_BACKOFF,
+ MT76_SKU_BACKOFF_BF_OFFSET,
+};
static int mt76_get_of_eeprom_data(struct mt76_dev *dev, void *eep, int len)
{
@@ -292,7 +299,6 @@ mt76_find_channel_node(struct device_node *np, struct ieee80211_channel *chan)
}
EXPORT_SYMBOL_GPL(mt76_find_channel_node);
-
static s8
mt76_get_txs_delta(struct device_node *np, u8 nss)
{
@@ -306,9 +312,24 @@ mt76_get_txs_delta(struct device_node *np, u8 nss)
return be32_to_cpu(val[nss - 1]);
}
+static inline u8 mt76_backoff_n_chains(struct mt76_dev *dev, u8 idx)
+{
+ /* 0:1T1ss, 1:2T1ss, ..., 14:5T5ss */
+ static const u8 connac3_table[] = {
+ 1, 2, 3, 4, 5, 2, 3, 4, 5, 3, 4, 5, 4, 5, 5};
+ static const u8 connac2_table[] = {
+ 1, 2, 3, 4, 2, 3, 4, 3, 4, 4, 0, 0, 0, 0, 0};
+
+ if (idx >= ARRAY_SIZE(connac3_table))
+ return 0;
+
+ return is_mt799x(dev) ? connac3_table[idx] : connac2_table[idx];
+}
+
static void
-mt76_apply_array_limit(s8 *pwr, size_t pwr_len, const s8 *data,
- s8 target_power, s8 nss_delta, s8 *max_power)
+mt76_apply_array_limit(struct mt76_dev *dev, s8 *pwr, size_t pwr_len,
+ const s8 *data, s8 target_power, s8 nss_delta,
+ s8 *max_power, int n_chains, enum mt76_sku_type type)
{
int i;
@@ -316,18 +337,51 @@ mt76_apply_array_limit(s8 *pwr, size_t pwr_len, const s8 *data,
return;
for (i = 0; i < pwr_len; i++) {
- pwr[i] = min_t(s8, target_power, data[i] + nss_delta);
+ u8 backoff_chain_idx = i;
+ int backoff_n_chains;
+ s8 backoff_delta;
+ s8 delta;
+
+ switch (type) {
+ case MT76_SKU_RATE:
+ delta = 0;
+ backoff_delta = 0;
+ backoff_n_chains = 0;
+ break;
+ case MT76_SKU_BACKOFF_BF_OFFSET:
+ backoff_chain_idx += 1;
+ fallthrough;
+ case MT76_SKU_BACKOFF:
+ delta = mt76_tx_power_path_delta(n_chains);
+ backoff_n_chains = mt76_backoff_n_chains(dev, backoff_chain_idx);
+ backoff_delta = mt76_tx_power_path_delta(backoff_n_chains);
+ break;
+ default:
+ return;
+ }
+
+ pwr[i] = min_t(s8, target_power + delta - backoff_delta, data[i] + nss_delta);
+
+ /* used for padding, doesn't need to be considered */
+ if (data[i] >= S8_MAX - 1)
+ continue;
+
+ /* only consider backoff value for the configured chain number */
+ if (type != MT76_SKU_RATE && n_chains != backoff_n_chains)
+ continue;
+
*max_power = max(*max_power, pwr[i]);
}
}
static void
-mt76_apply_multi_array_limit(s8 *pwr, size_t pwr_len, s8 pwr_num,
- const s8 *data, size_t len, s8 target_power,
- s8 nss_delta)
+mt76_apply_multi_array_limit(struct mt76_dev *dev, s8 *pwr, size_t pwr_len,
+ s8 pwr_num, const s8 *data, size_t len,
+ s8 target_power, s8 nss_delta, s8 *max_power,
+ int n_chains, enum mt76_sku_type type)
{
+ static const int connac2_backoff_ru_idx = 2;
int i, cur;
- s8 max_power = -128;
if (!data)
return;
@@ -337,8 +391,26 @@ mt76_apply_multi_array_limit(s8 *pwr, size_t pwr_len, s8 pwr_num,
if (len < pwr_len + 1)
break;
- mt76_apply_array_limit(pwr + pwr_len * i, pwr_len, data + 1,
- target_power, nss_delta, &max_power);
+ /* Each RU entry (RU26, RU52, RU106, BW20, ...) in the DTS
+ * corresponds to 10 stream combinations (1T1ss, 2T1ss, 3T1ss,
+ * 4T1ss, 2T2ss, 3T2ss, 4T2ss, 3T3ss, 4T3ss, 4T4ss).
+ *
+ * For beamforming tables:
+ * - In connac2, beamforming entries for BW20~BW160 and OFDM
+ * do not include 1T1ss.
+ * - In connac3, beamforming entries for BW20~BW160 and RU
+ * include 1T1ss, but OFDM beamforming does not include 1T1ss.
+ *
+ * Non-beamforming and RU entries for both connac2 and connac3
+ * include 1T1ss.
+ */
+ if (!is_mt799x(dev) && type == MT76_SKU_BACKOFF &&
+ i > connac2_backoff_ru_idx)
+ type = MT76_SKU_BACKOFF_BF_OFFSET;
+
+ mt76_apply_array_limit(dev, pwr + pwr_len * i, pwr_len, data + 1,
+ target_power, nss_delta, max_power,
+ n_chains, type);
if (--cur > 0)
continue;
@@ -360,18 +432,11 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
struct device_node *np;
const s8 *val;
char name[16];
- u32 mcs_rates = dev->drv->mcs_rates;
- u32 ru_rates = ARRAY_SIZE(dest->ru[0]);
char band;
size_t len;
- s8 max_power = 0;
- s8 max_power_backoff = -127;
+ s8 max_power = -127;
s8 txs_delta;
int n_chains = hweight16(phy->chainmask);
- s8 target_power_combine = target_power + mt76_tx_power_path_delta(n_chains);
-
- if (!mcs_rates)
- mcs_rates = 10;
memset(dest, target_power, sizeof(*dest) - sizeof(dest->path));
memset(&dest->path, 0, sizeof(dest->path));
@@ -409,46 +474,45 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
txs_delta = mt76_get_txs_delta(np, hweight16(phy->chainmask));
val = mt76_get_of_array_s8(np, "rates-cck", &len, ARRAY_SIZE(dest->cck));
- mt76_apply_array_limit(dest->cck, ARRAY_SIZE(dest->cck), val,
- target_power, txs_delta, &max_power);
+ mt76_apply_array_limit(dev, dest->cck, ARRAY_SIZE(dest->cck), val,
+ target_power, txs_delta, &max_power, n_chains, MT76_SKU_RATE);
- val = mt76_get_of_array_s8(np, "rates-ofdm",
- &len, ARRAY_SIZE(dest->ofdm));
- mt76_apply_array_limit(dest->ofdm, ARRAY_SIZE(dest->ofdm), val,
- target_power, txs_delta, &max_power);
+ val = mt76_get_of_array_s8(np, "rates-ofdm", &len, ARRAY_SIZE(dest->ofdm));
+ mt76_apply_array_limit(dev, dest->ofdm, ARRAY_SIZE(dest->ofdm), val,
+ target_power, txs_delta, &max_power, n_chains, MT76_SKU_RATE);
- val = mt76_get_of_array_s8(np, "rates-mcs", &len, mcs_rates + 1);
- mt76_apply_multi_array_limit(dest->mcs[0], ARRAY_SIZE(dest->mcs[0]),
- ARRAY_SIZE(dest->mcs), val, len,
- target_power, txs_delta);
+ val = mt76_get_of_array_s8(np, "rates-mcs", &len, ARRAY_SIZE(dest->mcs[0]) + 1);
+ mt76_apply_multi_array_limit(dev, dest->mcs[0], ARRAY_SIZE(dest->mcs[0]),
+ ARRAY_SIZE(dest->mcs), val, len, target_power,
+ txs_delta, &max_power, n_chains, MT76_SKU_RATE);
- val = mt76_get_of_array_s8(np, "rates-ru", &len, ru_rates + 1);
- mt76_apply_multi_array_limit(dest->ru[0], ARRAY_SIZE(dest->ru[0]),
- ARRAY_SIZE(dest->ru), val, len,
- target_power, txs_delta);
+ val = mt76_get_of_array_s8(np, "rates-ru", &len, ARRAY_SIZE(dest->ru[0]) + 1);
+ mt76_apply_multi_array_limit(dev, dest->ru[0], ARRAY_SIZE(dest->ru[0]),
+ ARRAY_SIZE(dest->ru), val, len, target_power,
+ txs_delta, &max_power, n_chains, MT76_SKU_RATE);
- max_power_backoff = max_power;
val = mt76_get_of_array_s8(np, "paths-cck", &len, ARRAY_SIZE(dest->path.cck));
- mt76_apply_array_limit(dest->path.cck, ARRAY_SIZE(dest->path.cck), val,
- target_power_combine, txs_delta, &max_power_backoff);
+ mt76_apply_array_limit(dev, dest->path.cck, ARRAY_SIZE(dest->path.cck), val,
+ target_power, txs_delta, &max_power, n_chains, MT76_SKU_BACKOFF);
val = mt76_get_of_array_s8(np, "paths-ofdm", &len, ARRAY_SIZE(dest->path.ofdm));
- mt76_apply_array_limit(dest->path.ofdm, ARRAY_SIZE(dest->path.ofdm), val,
- target_power_combine, txs_delta, &max_power_backoff);
+ mt76_apply_array_limit(dev, dest->path.ofdm, ARRAY_SIZE(dest->path.ofdm), val,
+ target_power, txs_delta, &max_power, n_chains, MT76_SKU_BACKOFF);
val = mt76_get_of_array_s8(np, "paths-ofdm-bf", &len, ARRAY_SIZE(dest->path.ofdm_bf));
- mt76_apply_array_limit(dest->path.ofdm_bf, ARRAY_SIZE(dest->path.ofdm_bf), val,
- target_power_combine, txs_delta, &max_power_backoff);
+ mt76_apply_array_limit(dev, dest->path.ofdm_bf, ARRAY_SIZE(dest->path.ofdm_bf), val,
+ target_power, txs_delta, &max_power, n_chains,
+ MT76_SKU_BACKOFF_BF_OFFSET);
val = mt76_get_of_array_s8(np, "paths-ru", &len, ARRAY_SIZE(dest->path.ru[0]) + 1);
- mt76_apply_multi_array_limit(dest->path.ru[0], ARRAY_SIZE(dest->path.ru[0]),
- ARRAY_SIZE(dest->path.ru), val, len,
- target_power_combine, txs_delta);
+ mt76_apply_multi_array_limit(dev, dest->path.ru[0], ARRAY_SIZE(dest->path.ru[0]),
+ ARRAY_SIZE(dest->path.ru), val, len, target_power,
+ txs_delta, &max_power, n_chains, MT76_SKU_BACKOFF);
val = mt76_get_of_array_s8(np, "paths-ru-bf", &len, ARRAY_SIZE(dest->path.ru_bf[0]) + 1);
- mt76_apply_multi_array_limit(dest->path.ru_bf[0], ARRAY_SIZE(dest->path.ru_bf[0]),
- ARRAY_SIZE(dest->path.ru_bf), val, len,
- target_power_combine, txs_delta);
+ mt76_apply_multi_array_limit(dev, dest->path.ru_bf[0], ARRAY_SIZE(dest->path.ru_bf[0]),
+ ARRAY_SIZE(dest->path.ru_bf), val, len, target_power,
+ txs_delta, &max_power, n_chains, MT76_SKU_BACKOFF);
return max_power;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index d05e83ea1..32876eab2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -540,7 +540,6 @@ struct mt76_driver_ops {
u32 survey_flags;
u16 txwi_size;
u16 token_size;
- u8 mcs_rates;
unsigned int link_data_size;
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v5 2/2] dt-bindings: net: wireless: mt76: clarify backoff limit usage
2026-02-12 0:36 [PATCH v5 1/2] wifi: mt76: fix backoff fields and max_power calculation Ryder Lee
@ 2026-02-12 0:36 ` Ryder Lee
2026-02-12 7:50 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Ryder Lee @ 2026-02-12 0:36 UTC (permalink / raw)
To: Felix Fietkau, Rob Herring
Cc: devicetree, linux-mediatek, linux-wireless, Ryder Lee, Allen Ye
Clarify the usage of path backoff limit properties in mt76 binding.
Add explicit documentation for old generation (mt7915, mt7916, mt7981,
mt7986) and new generation (mt7990, mt7992, mt7996) devices, including
the difference in beamforming and non-beamforming entries.
Rephrase the paths-ru/paths-ru-bf description to make them more precise.
Co-developed-by: Allen Ye <allen.ye@mediatek.com>
Signed-off-by: Allen Ye <allen.ye@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
v4:
- revise commit message
- use PCI id as the compatible string to replace "connac2/3"
v5: fix missing starting space in comment(comments)
---
.../bindings/net/wireless/mediatek,mt76.yaml | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
index ae6b97cdc..20b868f7d 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
@@ -27,6 +27,11 @@ properties:
- mediatek,mt7622-wmac
- mediatek,mt7981-wmac
- mediatek,mt7986-wmac
+ - pci14c3,7915 # mt7915
+ - pci14c3,7906 # mt7916
+ - pci14c3,7990 # mt7996
+ - pci14c3,7992 # mt7992
+ - pci14c3,7993 # mt7990
reg:
minItems: 1
@@ -252,6 +257,14 @@ properties:
followed by 10 power limit values. The order of the
channel resource unit settings is RU26, RU52, RU106,
RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
+ - For mt7981/mt7986/mt7915/mt7916
+ - Beamforming entries for BW20~BW160 and OFDM do not
+ include 1T1ss.
+ - When 1T1ss is not used, it should be filled with 0.
+ - For mt7996/mt7992/mt7990
+ - Beamforming entries for BW20~BW160 and RU include
+ 1T1ss, but OFDM does not include 1T1ss.
+ - 1T1ss is taken into account, so no need to fill with 0.
minItems: 1
maxItems: 7
items:
@@ -270,6 +283,14 @@ properties:
followed by 10 power limit values. The order of the
channel resource unit settings is RU26, RU52, RU106,
RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
+ - For mt7981/mt7986/mt7915/mt7916
+ - Beamforming entries for BW20~BW160 and OFDM do not
+ include 1T1ss.
+ - When 1T1ss is not used, it should be filled with 0.
+ - For mt7996/mt7992/mt7990
+ - Beamforming entries for BW20~BW160 and RU include
+ 1T1ss, but OFDM does not include 1T1ss.
+ - 1T1ss is taken into account, so no need to fill with 0.
minItems: 1
maxItems: 7
items:
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v5 2/2] dt-bindings: net: wireless: mt76: clarify backoff limit usage
2026-02-12 0:36 ` [PATCH v5 2/2] dt-bindings: net: wireless: mt76: clarify backoff limit usage Ryder Lee
@ 2026-02-12 7:50 ` Krzysztof Kozlowski
2026-02-12 17:31 ` Ryder Lee
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-12 7:50 UTC (permalink / raw)
To: Ryder Lee
Cc: Felix Fietkau, Rob Herring, devicetree, linux-mediatek,
linux-wireless, Allen Ye
On Wed, Feb 11, 2026 at 04:36:06PM -0800, Ryder Lee wrote:
> Clarify the usage of path backoff limit properties in mt76 binding.
> Add explicit documentation for old generation (mt7915, mt7916, mt7981,
> mt7986) and new generation (mt7990, mt7992, mt7996) devices, including
> the difference in beamforming and non-beamforming entries.
>
> Rephrase the paths-ru/paths-ru-bf description to make them more precise.
>
> Co-developed-by: Allen Ye <allen.ye@mediatek.com>
> Signed-off-by: Allen Ye <allen.ye@mediatek.com>
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
> v4:
> - revise commit message
> - use PCI id as the compatible string to replace "connac2/3"
>
> v5: fix missing starting space in comment(comments)
> ---
> .../bindings/net/wireless/mediatek,mt76.yaml | 21 +++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> index ae6b97cdc..20b868f7d 100644
> --- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> @@ -27,6 +27,11 @@ properties:
> - mediatek,mt7622-wmac
> - mediatek,mt7981-wmac
> - mediatek,mt7986-wmac
> + - pci14c3,7915 # mt7915
> + - pci14c3,7906 # mt7916
> + - pci14c3,7990 # mt7996
> + - pci14c3,7992 # mt7992
> + - pci14c3,7993 # mt7990
These are two separate commits with their own separate rationale.
>
> reg:
> minItems: 1
> @@ -252,6 +257,14 @@ properties:
> followed by 10 power limit values. The order of the
> channel resource unit settings is RU26, RU52, RU106,
> RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
> + - For mt7981/mt7986/mt7915/mt7916
> + - Beamforming entries for BW20~BW160 and OFDM do not
> + include 1T1ss.
> + - When 1T1ss is not used, it should be filled with 0.
Shouldn't be skipped in such case? Why filling with 0 matters?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v5 2/2] dt-bindings: net: wireless: mt76: clarify backoff limit usage
2026-02-12 7:50 ` Krzysztof Kozlowski
@ 2026-02-12 17:31 ` Ryder Lee
2026-02-15 8:55 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Ryder Lee @ 2026-02-12 17:31 UTC (permalink / raw)
To: krzk@kernel.org
Cc: robh@kernel.org, nbd@nbd.name, linux-mediatek@lists.infradead.org,
devicetree@vger.kernel.org, Allen Ye (葉芷勳),
linux-wireless@vger.kernel.org
On Thu, 2026-02-12 at 08:50 +0100, Krzysztof Kozlowski wrote:
> On Wed, Feb 11, 2026 at 04:36:06PM -0800, Ryder Lee wrote:
> > Clarify the usage of path backoff limit properties in mt76 binding.
> > Add explicit documentation for old generation (mt7915, mt7916,
> > mt7981,
> > mt7986) and new generation (mt7990, mt7992, mt7996) devices,
> > including
> > the difference in beamforming and non-beamforming entries.
> >
> > Rephrase the paths-ru/paths-ru-bf description to make them more
> > precise.
> >
> > Co-developed-by: Allen Ye <allen.ye@mediatek.com>
> > Signed-off-by: Allen Ye <allen.ye@mediatek.com>
> > Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> > ---
> > v4:
> > - revise commit message
> > - use PCI id as the compatible string to replace "connac2/3"
> >
> > v5: fix missing starting space in comment(comments)
> > ---
> > .../bindings/net/wireless/mediatek,mt76.yaml | 21
> > +++++++++++++++++++
> > 1 file changed, 21 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> > b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> > index ae6b97cdc..20b868f7d 100644
> > ---
> > a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> > +++
> > b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> > @@ -27,6 +27,11 @@ properties:
> > - mediatek,mt7622-wmac
> > - mediatek,mt7981-wmac
> > - mediatek,mt7986-wmac
> > + - pci14c3,7915 # mt7915
> > + - pci14c3,7906 # mt7916
> > + - pci14c3,7990 # mt7996
> > + - pci14c3,7992 # mt7992
> > + - pci14c3,7993 # mt7990
>
> These are two separate commits with their own separate rationale.
>
Ok.
> >
> > reg:
> > minItems: 1
> > @@ -252,6 +257,14 @@ properties:
> > followed by 10 power limit values. The order
> > of the
> > channel resource unit settings is RU26,
> > RU52, RU106,
> > RU242/SU20, RU484/SU40, RU996/SU80 and
> > RU2x996/SU160.
> > + - For mt7981/mt7986/mt7915/mt7916
> > + - Beamforming entries for BW20~BW160 and
> > OFDM do not
> > + include 1T1ss.
> > + - When 1T1ss is not used, it should be
> > filled with 0.
>
> Shouldn't be skipped in such case? Why filling with 0 matters?
>
This logic was already present in driver. The driver determines whether
to skip 1T1ss based on its value (0), so my update is focused on
improving the documentation to guide users on the correct DTS format.
For example, in the paths-ru-bf entries:
<1 20 22 38 36 24 30 23 21 28 29>,
<1 20 39 31 25 26 25 28 30 39 39>,
<1 37 34 26 26 25 21 34 23 34 24>,
<1 0 20 23 31 23 30 39 28 29 36>,
<1 0 27 34 33 34 29 38 33 33 22>,
<1 0 30 23 39 28 21 25 29 28 21>,
<1 0 34 20 38 32 35 33 37 26 36>;
(The order of all fields is required by the firmware.)
The value for 1T1ss is set to 0 when it is not used, and the driver
will skip it during parsing. So, users should always fill the DTS with
all 10 values, using 0 for unused entries.
This ensures that the parsing logic remains simple and uniform,
avoiding potential errors or misalignment.
For the new generation mt7996/mt7992/mt7990, skipping is not needed
because the 1T1ss value is always non-zero.
In summary, this patch is only to document the behavior from earlier
commits for mt7915/mt7986/mt7916/mt7981.
The previous committer requested that this behavior be explained in the
documentation, which is why this patch was added.
Ryder
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v5 2/2] dt-bindings: net: wireless: mt76: clarify backoff limit usage
2026-02-12 17:31 ` Ryder Lee
@ 2026-02-15 8:55 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-15 8:55 UTC (permalink / raw)
To: Ryder Lee
Cc: robh@kernel.org, nbd@nbd.name, linux-mediatek@lists.infradead.org,
devicetree@vger.kernel.org, Allen Ye (葉芷勳),
linux-wireless@vger.kernel.org
On 12/02/2026 18:31, Ryder Lee wrote:
>>>
>>> reg:
>>> minItems: 1
>>> @@ -252,6 +257,14 @@ properties:
>>> followed by 10 power limit values. The order
>>> of the
>>> channel resource unit settings is RU26,
>>> RU52, RU106,
>>> RU242/SU20, RU484/SU40, RU996/SU80 and
>>> RU2x996/SU160.
>>> + - For mt7981/mt7986/mt7915/mt7916
>>> + - Beamforming entries for BW20~BW160 and
>>> OFDM do not
>>> + include 1T1ss.
>>> + - When 1T1ss is not used, it should be
>>> filled with 0.
>>
>> Shouldn't be skipped in such case? Why filling with 0 matters?
>>
> This logic was already present in driver. The driver determines whether
> to skip 1T1ss based on its value (0), so my update is focused on
> improving the documentation to guide users on the correct DTS format.
>
> For example, in the paths-ru-bf entries:
> <1 20 22 38 36 24 30 23 21 28 29>,
> <1 20 39 31 25 26 25 28 30 39 39>,
> <1 37 34 26 26 25 21 34 23 34 24>,
> <1 0 20 23 31 23 30 39 28 29 36>,
> <1 0 27 34 33 34 29 38 33 33 22>,
> <1 0 30 23 39 28 21 25 29 28 21>,
> <1 0 34 20 38 32 35 33 37 26 36>;
> (The order of all fields is required by the firmware.)
>
> The value for 1T1ss is set to 0 when it is not used, and the driver
> will skip it during parsing. So, users should always fill the DTS with
> all 10 values, using 0 for unused entries.
>
> This ensures that the parsing logic remains simple and uniform,
> avoiding potential errors or misalignment.
>
OK
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-15 8:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12 0:36 [PATCH v5 1/2] wifi: mt76: fix backoff fields and max_power calculation Ryder Lee
2026-02-12 0:36 ` [PATCH v5 2/2] dt-bindings: net: wireless: mt76: clarify backoff limit usage Ryder Lee
2026-02-12 7:50 ` Krzysztof Kozlowski
2026-02-12 17:31 ` Ryder Lee
2026-02-15 8:55 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox