Search Linux Wireless

Re: [PATCH 23/24] wifi: mt76: mt7996: switch to single multi-radio wiphy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
  .../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@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux