Skip to contentSkip to conversation

mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC)

PATCH In review Paul Fertser 5 participants 8 messages Jun 5, 2023 – Jul 24, 2023

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC)

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Fixes 7660a1bd0c22 ("mt76: mt7615: register ext_phy if DBDC is detected")
---
 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c +3 -3
index 68e88224b8b1..ccedea7e8a50 100644
@@ -128,12 +128,12 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev)
 	case MT_EE_5GHZ:
 		dev->mphy.cap.has_5ghz = true;
 		break;
-	case MT_EE_2GHZ:
-		dev->mphy.cap.has_2ghz = true;
-		break;
 	case MT_EE_DBDC:
 		dev->dbdc_support = true;
 		fallthrough;
+	case MT_EE_2GHZ:
+		dev->mphy.cap.has_2ghz = true;
+		break;
 	default:
 		dev->mphy.cap.has_2ghz = true;
 		dev->mphy.cap.has_5ghz = true;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Paul Fertser

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Hi Paul,

Can I clarify that the second object won't hit the logic change below and thus be limited to 2GHz?

Quoted 33 lines
Fixes 7660a1bd0c22 ("mt76: mt7615: register ext_phy if DBDC is detected")
---
 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c +3 -3
index 68e88224b8b1..ccedea7e8a50 100644
@@ -128,12 +128,12 @@ mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev)
 	case MT_EE_5GHZ:
 		dev->mphy.cap.has_5ghz = true;
 		break;
-	case MT_EE_2GHZ:
-		dev->mphy.cap.has_2ghz = true;
-		break;
 	case MT_EE_DBDC:
 		dev->dbdc_support = true;
 		fallthrough;
+	case MT_EE_2GHZ:
+		dev->mphy.cap.has_2ghz = true;
+		break;
 	default:
 		dev->mphy.cap.has_2ghz = true;
 		dev->mphy.cap.has_5ghz = true;
Signature · 1 line
2.34.1
#2 lore raw

Hi Simon,

Quoted 7 lines · Simon Horman
Quoted 3 lines · Paul Fertser

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Can I clarify that the second object won't hit the logic change below and thus be limited to 2GHz?

The second object (external 5 GHz phy) doesn't have an EEPROM of its own, and is created explicitly with just this band enabled:

https://elixir.bootlin.com/linux/latest/source/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c#L104
https://elixir.bootlin.com/linux/latest/source/drivers/net/wireless/mediatek/mt76/mt7615/init.c#L573

So it won't hit the logic change and it will be limited to 5 GHz.

Signature · 2 lines
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[email protected]
Reviewed-by
#3 lore raw
Quoted 11 lines · Paul Fertser

Hi Simon,

Quoted 7 lines · Simon Horman
Quoted 3 lines · Paul Fertser

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Can I clarify that the second object won't hit the logic change below and thus be limited to 2GHz?

Quoted 7 lines

The second object (external 5 GHz phy) doesn't have an EEPROM of its own, and is created explicitly with just this band enabled:

https://elixir.bootlin.com/linux/latest/source/drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c#L104
https://elixir.bootlin.com/linux/latest/source/drivers/net/wireless/mediatek/mt76/mt7615/init.c#L573

So it won't hit the logic change and it will be limited to 5 GHz.

Thanks Paul,

in that case this patch looks good to me.

maintainer Acked-by on v1 1/1
#4 lore raw
In reply to Paul Fertser
Quoted 9 lines · Paul Fertser

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Fixes 7660a1bd0c22 ("mt76: mt7615: register ext_phy if DBDC is detected")

Jakub, could you please pick this one up for 6.5?

Thanks,

- Felix

maintainer
#5 lore raw
Quoted 5 lines · On Fri, 21 Jul 2023 10:03:49 +0200 Felix Fietkau wrote:
Quoted 4 lines · Paul Fertser

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Quoted 8 lines
Quoted 5 lines
Fixes 7660a1bd0c22 ("mt76: mt7615: register ext_phy if DBDC is detected")

Jakub, could you please pick this one up for 6.5?

Kalle reported that he's back to wireless duties a few hours after you posted so just to avoid any confusion - I'll leave this one to Kalle unless told otherwise.

#6 lore raw
Quoted 11 lines · Jakub Kicinski
Quoted 10 lines · On Fri, 21 Jul 2023 10:03:49 +0200 Felix Fietkau wrote:
Quoted 9 lines · Paul Fertser

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Fixes 7660a1bd0c22 ("mt76: mt7615: register ext_phy if DBDC is detected")
Quoted 7 lines
Quoted 3 lines

Jakub, could you please pick this one up for 6.5?

Kalle reported that he's back to wireless duties a few hours after you posted so just to avoid any confusion - I'll leave this one to Kalle unless told otherwise.

Yup, I'm back. I assigned this to me on patchwork and planning to queue for v6.5.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#7 lore raw

Re: wifi: mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC)

In reply to Paul Fertser
Quoted 11 lines · Paul Fertser

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Fixes 7660a1bd0c22 ("mt76: mt7615: register ext_phy if DBDC is detected")

Patch applied to wireless.git, thanks.

421033deb915 wifi: mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC)

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches