public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Wang <sean.wang@kernel.org>
To: Javier Tia <floss@jetm.me>
Cc: "Felix Fietkau" <nbd@nbd.name>,
	"Lorenzo Bianconi" <lorenzo@kernel.org>,
	"Ryder Lee" <ryder.lee@mediatek.com>,
	"Shayne Chen" <shayne.chen@mediatek.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Ming Yen Hsieh" <mingyen.hsieh@mediatek.com>,
	"Deren Wu" <deren.wu@mediatek.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, "Marcin FM" <marcin@lgic.pl>,
	"Cristian-Florin Radoi" <radoi.chris@gmail.com>,
	"George Salukvadze" <giosal90@gmail.com>,
	"Evgeny Kapusta" <3193631@gmail.com>,
	"Samu Toljamo" <samu.toljamo@gmail.com>,
	"Ariel Rosenfeld" <ariel.rosenfeld.750@gmail.com>,
	"Chapuis Dario" <chapuisdario4@gmail.com>,
	"Thibaut François" <tibo@humeurlibre.fr>,
	张旭涵 <Loong.0x00@gmail.com>
Subject: Re: [PATCH v3 05/13] wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band
Date: Thu, 26 Mar 2026 01:08:56 -0500	[thread overview]
Message-ID: <CAGp9Lzr1Fgj5Gk2cAUFWq6sfKZZR2Cd6ymrzP7wKQh-7P9eo1A@mail.gmail.com> (raw)
In-Reply-To: <20260325-mt7927-wifi-support-v2-v3-5-5ca66c97a755@jetm.me>

Hi, Javier

On Wed, Mar 25, 2026 at 5:14 PM Javier Tia <floss@jetm.me> wrote:
>
> mt7925_init_eht_caps() only populates EHT MCS/NSS maps for BW <= 80
> and BW = 160, but never sets BW = 320. This means iw phy shows no
> 320MHz MCS map entries even though the hardware supports 320MHz
> operation in the 6GHz band.
>
> Add the missing 320MHz capability bits for 6GHz:
>   - PHY_CAP0: IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ
>   - PHY_CAP1: beamformee SS for 320MHz
>   - PHY_CAP2: sounding dimensions for 320MHz
>   - PHY_CAP6: MCS15 support for 320MHz width
>   - MCS/NSS: populate bw._320 maps for 6GHz band
>
> Introduce is_320mhz_supported() to gate 320MHz on MT7927 only, since
> MT7925 does not support 320MHz operation.
>
> Tested-by: Marcin FM <marcin@lgic.pl>
> Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
> Tested-by: George Salukvadze <giosal90@gmail.com>
> Tested-by: Evgeny Kapusta <3193631@gmail.com>
> Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
> Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
> Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
> Tested-by: Thibaut François <tibo@humeurlibre.fr>
> Tested-by: 张旭涵 <Loong.0x00@gmail.com>
> Signed-off-by: Javier Tia <floss@jetm.me>
> ---
>  drivers/net/wireless/mediatek/mt76/mt76_connac.h |  5 +++++
>  drivers/net/wireless/mediatek/mt76/mt7925/main.c | 22 +++++++++++++++++++++-
>  2 files changed, 26 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac.h
> index 813d61bffc2c..3785fbf5ac99 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h
> +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h
> @@ -177,6 +177,11 @@ static inline bool is_mt7925(struct mt76_dev *dev)
>         return mt76_chip(dev) == 0x7925;
>  }
>
> +static inline bool is_320mhz_supported(struct mt76_dev *dev)
> +{
> +       return is_mt7927(dev);

This looks like it would cause a build error since is_mt7927() is not
introduced until patch 6.

> +}
> +
>  static inline bool is_mt7920(struct mt76_dev *dev)
>  {
>         return mt76_chip(dev) == 0x7920;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> index f128a198f81d..cfce851a94e2 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> @@ -183,6 +183,10 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
>                 IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER |
>                 IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
>
> +       if (band == NL80211_BAND_6GHZ && is_320mhz_supported(&phy->dev->mt76))
> +               eht_cap_elem->phy_cap_info[0] |=
> +                       IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
> +
>         eht_cap_elem->phy_cap_info[0] |=
>                 u8_encode_bits(u8_get_bits(sts - 1, BIT(0)),
>                                IEEE80211_EHT_PHY_CAP0_BEAMFORMEE_SS_80MHZ_MASK);
> @@ -193,10 +197,20 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
>                 u8_encode_bits(sts - 1,
>                                IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_160MHZ_MASK);
>
> +       if (band == NL80211_BAND_6GHZ && is_320mhz_supported(&phy->dev->mt76))
> +               eht_cap_elem->phy_cap_info[1] |=
> +                       u8_encode_bits(sts - 1,
> +                                      IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_320MHZ_MASK);
> +
>         eht_cap_elem->phy_cap_info[2] =
>                 u8_encode_bits(sts - 1, IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_80MHZ_MASK) |
>                 u8_encode_bits(sts - 1, IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_160MHZ_MASK);
>
> +       if (band == NL80211_BAND_6GHZ && is_320mhz_supported(&phy->dev->mt76))
> +               eht_cap_elem->phy_cap_info[2] |=
> +                       u8_encode_bits(sts - 1,
> +                                      IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK);
> +
>         eht_cap_elem->phy_cap_info[3] =
>                 IEEE80211_EHT_PHY_CAP3_NG_16_SU_FEEDBACK |
>                 IEEE80211_EHT_PHY_CAP3_NG_16_MU_FEEDBACK |
> @@ -217,7 +231,8 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
>                 u8_encode_bits(u8_get_bits(0x11, GENMASK(1, 0)),
>                                IEEE80211_EHT_PHY_CAP5_MAX_NUM_SUPP_EHT_LTF_MASK);
>
> -       val = width == NL80211_CHAN_WIDTH_160 ? 0x7 :
> +       val = width == NL80211_CHAN_WIDTH_320 ? 0xf :
> +             width == NL80211_CHAN_WIDTH_160 ? 0x7 :
>               width == NL80211_CHAN_WIDTH_80 ? 0x3 : 0x1;
>         eht_cap_elem->phy_cap_info[6] =
>                 u8_encode_bits(u8_get_bits(0x11, GENMASK(4, 2)),
> @@ -239,6 +254,11 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
>         eht_nss->bw._160.rx_tx_mcs9_max_nss = val;
>         eht_nss->bw._160.rx_tx_mcs11_max_nss = val;
>         eht_nss->bw._160.rx_tx_mcs13_max_nss = val;
> +       if (band == NL80211_BAND_6GHZ && is_320mhz_supported(&phy->dev->mt76)) {
> +               eht_nss->bw._320.rx_tx_mcs9_max_nss = val;
> +               eht_nss->bw._320.rx_tx_mcs11_max_nss = val;
> +               eht_nss->bw._320.rx_tx_mcs13_max_nss = val;
> +       }
>  }
>
>  int mt7925_init_mlo_caps(struct mt792x_phy *phy)
>
> --
> 2.53.0
>
>

  reply	other threads:[~2026-03-26  6:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 22:10 [PATCH v3 00/13] This series adds support for the MediaTek MT7927 (Filogic 380) combo Javier Tia
2026-03-25 22:10 ` [PATCH v3 01/13] wifi: mt76: mt7925: fix stale pointer comparisons in change_vif_links Javier Tia
2026-03-25 22:10 ` [PATCH v3 02/13] wifi: mt76: mt7925: add 320MHz bandwidth to bss_rlm_tlv Javier Tia
2026-03-25 22:10 ` [PATCH v3 03/13] wifi: mt76: mt7925: handle 320MHz bandwidth in RXV and TXS Javier Tia
2026-03-25 22:10 ` [PATCH v3 04/13] wifi: mt76: mt7925: populate EHT 320MHz MCS map in sta_rec Javier Tia
2026-03-25 22:10 ` [PATCH v3 05/13] wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band Javier Tia
2026-03-26  6:08   ` Sean Wang [this message]
2026-03-25 22:10 ` [PATCH v3 06/13] wifi: mt76: mt7925: add MT7927 chip ID helpers Javier Tia
2026-03-25 22:10 ` [PATCH v3 07/13] wifi: mt76: mt7925: add MT7927 firmware paths Javier Tia
2026-03-25 22:10 ` [PATCH v3 08/13] wifi: mt76: mt7925: use irq_map for chip-specific interrupt handling Javier Tia
2026-03-25 22:10 ` [PATCH v3 09/13] wifi: mt76: mt7925: add chip-specific DMA configuration Javier Tia
2026-03-25 22:10 ` [PATCH v3 10/13] wifi: mt76: mt7925: add MT7927 hardware initialization Javier Tia
2026-03-25 22:11 ` [PATCH v3 11/13] wifi: mt76: mt7925: fix band_idx for stable 5GHz/6GHz operation Javier Tia
2026-03-25 22:11 ` [PATCH v3 12/13] wifi: mt76: mt7925: disable ASPM and runtime PM for MT7927 Javier Tia
2026-03-26  6:14   ` Sean Wang
2026-03-25 22:11 ` [PATCH v3 13/13] wifi: mt76: mt7925: enable MT7927 PCI device IDs Javier Tia
2026-03-26  6:26   ` Sean Wang
2026-03-26  5:56 ` [PATCH v3 00/13] This series adds support for the MediaTek MT7927 (Filogic 380) combo Sean Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGp9Lzr1Fgj5Gk2cAUFWq6sfKZZR2Cd6ymrzP7wKQh-7P9eo1A@mail.gmail.com \
    --to=sean.wang@kernel.org \
    --cc=3193631@gmail.com \
    --cc=Loong.0x00@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ariel.rosenfeld.750@gmail.com \
    --cc=chapuisdario4@gmail.com \
    --cc=deren.wu@mediatek.com \
    --cc=floss@jetm.me \
    --cc=giosal90@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=marcin@lgic.pl \
    --cc=matthias.bgg@gmail.com \
    --cc=mingyen.hsieh@mediatek.com \
    --cc=nbd@nbd.name \
    --cc=radoi.chris@gmail.com \
    --cc=ryder.lee@mediatek.com \
    --cc=samu.toljamo@gmail.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    --cc=tibo@humeurlibre.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox