Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 23/24] wifi: mt76: mt7996: switch to single multi-radio wiphy
Date: Thu, 1 May 2025 14:45:51 -0700	[thread overview]
Message-ID: <7783ae40-8d26-0dad-dd6b-591824cdfcdd@candelatech.com> (raw)
In-Reply-To: <20250102163508.52945-23-nbd@nbd.name>

On 1/2/25 08:35, Felix Fietkau wrote:
> Use generic mt76 chanctx functions and look up phy from vif link.
> The driver now uses only a single phy to handle multiple interfaces on
> different channels. This is preparation for full MLO support.

Hello Felix,

Did you combine all of the antennas on purpose?

iw phy phy0 info
...
	Available Antennas: TX 0xf RX 0xf
	Configured Antennas: TX 0xfff RX 0xfff

I noticed this while trying to set antennas...it was failing because
the orig_chainmask is not always 0xf (it shifts by 4 for each phy it seems).

I guess this *might* let you use un-modified iw to set different radio's
antennas...but seems like a weird API to me.  I was in the middle of passing
in a 'radio-id', based on logic by Roopni in this series when I found this
weirdness.

Roopni's series to allow per-radio config:

wifi: cfg80211/mac80211: Set/get wiphy parameters on per-radio basis


> 
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
>   .../wireless/mediatek/mt76/mt7996/eeprom.c    |   1 +
>   .../net/wireless/mediatek/mt76/mt7996/init.c  | 252 ++++---
>   .../net/wireless/mediatek/mt76/mt7996/mac.c   |   6 +-
>   .../net/wireless/mediatek/mt76/mt7996/main.c  | 649 +++++++++++-------
>   .../net/wireless/mediatek/mt76/mt7996/mcu.c   |  15 +-
>   .../net/wireless/mediatek/mt76/mt7996/mmio.c  |   3 +
>   .../wireless/mediatek/mt76/mt7996/mt7996.h    |  52 +-
>   7 files changed, 595 insertions(+), 383 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c
> index da94751df020..53dfac02f8af 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c
> @@ -305,6 +305,7 @@ int mt7996_eeprom_parse_hw_cap(struct mt7996_dev *dev, struct mt7996_phy *phy)
>   
>   	mphy->antenna_mask = BIT(nss) - 1;
>   	mphy->chainmask = (BIT(path) - 1) << dev->chainshift[band_idx];
> +	phy->orig_chainmask = mphy->chainmask;
>   	dev->chainmask |= mphy->chainmask;
>   	if (band_idx < MT_BAND2)
>   		dev->chainshift[band_idx + 1] = dev->chainshift[band_idx] +
[snip]

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



  reply	other threads:[~2025-05-01 21:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 16:34 [PATCH 01/24] wifi: mt76: add code for emulating hardware scanning Felix Fietkau
2025-01-02 16:34 ` [PATCH 02/24] wifi: mt76: add support for allocating a phy without hw Felix Fietkau
2025-01-02 16:34 ` [PATCH 03/24] wifi: mt76: rename struct mt76_vif to mt76_vif_link Felix Fietkau
2025-01-02 16:34 ` [PATCH 04/24] wifi: mt76: add vif link specific data structure Felix Fietkau
2025-01-02 16:34 ` [PATCH 05/24] wifi: mt76: mt7996: split link specific data from struct mt7996_vif Felix Fietkau
2025-01-02 16:34 ` [PATCH 06/24] wifi: mt76: initialize more wcid fields mt76_wcid_init Felix Fietkau
2025-01-02 16:34 ` [PATCH 07/24] wifi: mt76: add chanctx functions for multi-channel phy support Felix Fietkau
2025-01-02 16:34 ` [PATCH 08/24] wifi: mt76: remove dev->wcid_phy_mask Felix Fietkau
2025-01-02 16:34 ` [PATCH 09/24] wifi: mt76: add multi-radio support to a few core hw ops Felix Fietkau
2025-01-02 16:34 ` [PATCH 10/24] wifi: mt76: add multi-radio support to tx scheduling Felix Fietkau
2025-01-02 16:34 ` [PATCH 11/24] wifi: mt76: add multi-radio support to scanning code Felix Fietkau
2025-01-02 16:34 ` [PATCH 12/24] wifi: mt76: add multi-radio remain_on_channel functions Felix Fietkau
2025-01-02 16:34 ` [PATCH 13/24] wifi: mt76: mt7996: use emulated hardware scan support Felix Fietkau
2025-01-02 16:34 ` [PATCH 14/24] wifi: mt76: mt7996: pass wcid to mt7996_mcu_sta_hdr_trans_tlv Felix Fietkau
2025-01-02 16:34 ` [PATCH 15/24] wifi: mt76: mt7996: prepare mt7996_mcu_add_dev/bss_info for MLO support Felix Fietkau
2025-01-02 16:35 ` [PATCH 16/24] wifi: mt76: mt7996: prepare mt7996_mcu_add_beacon " Felix Fietkau
2025-01-02 16:35 ` [PATCH 17/24] wifi: mt76: mt7996: prepare mt7996_mcu_set_tx " Felix Fietkau
2025-01-02 16:35 ` [PATCH 18/24] wifi: mt76: mt7996: prepare mt7996_mcu_set_timing " Felix Fietkau
2025-01-02 16:35 ` [PATCH 19/24] wifi: mt76: connac: prepare mt76_connac_mcu_sta_basic_tlv " Felix Fietkau
2025-01-02 16:35 ` [PATCH 20/24] wifi: mt76: mt7996: prepare mt7996_mcu_update_bss_color " Felix Fietkau
2025-01-02 16:35 ` [PATCH 21/24] wifi: mt76: connac: rework connac helpers Felix Fietkau
2025-01-02 16:35 ` [PATCH 22/24] wifi: mt76: mt7996: move all debugfs files to the primary phy Felix Fietkau
2025-01-02 16:35 ` [PATCH 23/24] wifi: mt76: mt7996: switch to single multi-radio wiphy Felix Fietkau
2025-05-01 21:45   ` Ben Greear [this message]
2025-01-02 16:35 ` [PATCH 24/24] wifi: mt76: mt7996: fix monitor mode Felix Fietkau

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=7783ae40-8d26-0dad-dd6b-591824cdfcdd@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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