diff mbox series

ramips: mt7621: fix R6850 EEPROM offsets

Message ID 20210312114515.357872-1-foss@volatilesystems.org
State Not Applicable
Headers show
Series ramips: mt7621: fix R6850 EEPROM offsets | expand

Commit Message

Stijn Segers March 12, 2021, 11:45 a.m. UTC
The Netgear R6850 has its EEPROM data sitting at 0x28000 for the 5 GHz radio
and at 0x20000 for the 2,4 GHz radio. See forum topic for a hex dump [1].

[1]  https://forum.openwrt.org/t/netgear-r6850-very-low-transmit-power-on-5ghz/90984

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Bernt Ø. Thorvaldsen <bernt.thorvaldsen@gmail.com>
---
 .../linux/ramips/dts/mt7621_netgear_r6850.dts  | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Adrian Schmutzler March 12, 2021, 9:01 p.m. UTC | #1
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Stijn Segers
> Sent: Freitag, 12. März 2021 12:45
> To: openwrt-devel@lists.openwrt.org
> Cc: mail@david-bauer.net; Bernt Ø . Thorvaldsen
> <bernt.thorvaldsen@gmail.com>
> Subject: [PATCH] ramips: mt7621: fix R6850 EEPROM offsets
> 
> The Netgear R6850 has its EEPROM data sitting at 0x28000 for the 5 GHz radio
> and at 0x20000 for the 2,4 GHz radio. See forum topic for a hex dump [1].

The commit title/message does not really fit the code changes here.
You are adding full pcieX block, not just swapping EEPROM data. Please update to make clear what's going on.

Best

Adrian

> 
> [1]  https://forum.openwrt.org/t/netgear-r6850-very-low-transmit-power-
> on-5ghz/90984
> 
> Signed-off-by: Stijn Segers <foss@volatilesystems.org>
> Tested-by: Bernt Ø. Thorvaldsen <bernt.thorvaldsen@gmail.com>
> ---
>  .../linux/ramips/dts/mt7621_netgear_r6850.dts  | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/target/linux/ramips/dts/mt7621_netgear_r6850.dts
> b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
> index 78e9093216..313fecf936 100644
> --- a/target/linux/ramips/dts/mt7621_netgear_r6850.dts
> +++ b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
> @@ -6,3 +6,21 @@
>  	compatible = "netgear,r6850", "mediatek,mt7621-soc";
>  	model = "Netgear R6850";
>  };
> +
> +&pcie0 {
> +	wifi@0,0 {
> +		compatible = "mediatek,mt76";
> +		reg = <0x0 0 0 0 0>;
> +		mediatek,mtd-eeprom = <&factory 0x28000>;
> +		ieee80211-freq-limit = <5000000 6000000>;
> +	};
> +};
> +
> +&pcie1 {
> +	wifi@0,0 {
> +		compatible = "mediatek,mt76";
> +		reg = <0x0 0 0 0 0>;
> +		mediatek,mtd-eeprom = <&factory 0x20000>;
> +		ieee80211-freq-limit = <2400000 2500000>;
> +	};
> +};
> --
> 2.30.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Stijn Segers March 12, 2021, 9:56 p.m. UTC | #2
Hi Adrian,

Op vrijdag 12 maart 2021 om 22u01 schreef Adrian Schmutzler 
<mail@adrianschmutzler.de>:
> Hi,
> 
>>  -----Original Message-----
>>  From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
>>  On Behalf Of Stijn Segers
>>  Sent: Freitag, 12. März 2021 12:45
>>  To: openwrt-devel@lists.openwrt.org
>>  Cc: mail@david-bauer.net; Bernt Ø . Thorvaldsen
>>  <bernt.thorvaldsen@gmail.com>
>>  Subject: [PATCH] ramips: mt7621: fix R6850 EEPROM offsets
>> 
>>  The Netgear R6850 has its EEPROM data sitting at 0x28000 for the 5 
>> GHz radio
>>  and at 0x20000 for the 2,4 GHz radio. See forum topic for a hex 
>> dump [1].
> 
> The commit title/message does not really fit the code changes here.
> You are adding full pcieX block, not just swapping EEPROM data. 
> Please update to make clear what's going on.
> 

I was advised to override the whole block on IRC, rather than just 
overriding the &wifi block EEPROM property.
So just overriding that is enough?

Thanks

Stijn


> Best
> 
> Adrian
> 
>> 
>>  [1]  
>> https://forum.openwrt.org/t/netgear-r6850-very-low-transmit-power-
>>  on-5ghz/90984
>> 
>>  Signed-off-by: Stijn Segers <foss@volatilesystems.org>
>>  Tested-by: Bernt Ø. Thorvaldsen <bernt.thorvaldsen@gmail.com>
>>  ---
>>   .../linux/ramips/dts/mt7621_netgear_r6850.dts  | 18 
>> ++++++++++++++++++
>>   1 file changed, 18 insertions(+)
>> 
>>  diff --git a/target/linux/ramips/dts/mt7621_netgear_r6850.dts
>>  b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
>>  index 78e9093216..313fecf936 100644
>>  --- a/target/linux/ramips/dts/mt7621_netgear_r6850.dts
>>  +++ b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
>>  @@ -6,3 +6,21 @@
>>   	compatible = "netgear,r6850", "mediatek,mt7621-soc";
>>   	model = "Netgear R6850";
>>   };
>>  +
>>  +&pcie0 {
>>  +	wifi@0,0 {
>>  +		compatible = "mediatek,mt76";
>>  +		reg = <0x0 0 0 0 0>;
>>  +		mediatek,mtd-eeprom = <&factory 0x28000>;
>>  +		ieee80211-freq-limit = <5000000 6000000>;
>>  +	};
>>  +};
>>  +
>>  +&pcie1 {
>>  +	wifi@0,0 {
>>  +		compatible = "mediatek,mt76";
>>  +		reg = <0x0 0 0 0 0>;
>>  +		mediatek,mtd-eeprom = <&factory 0x20000>;
>>  +		ieee80211-freq-limit = <2400000 2500000>;
>>  +	};
>>  +};
>>  --
>>  2.30.1
>> 
>> 
>>  _______________________________________________
>>  openwrt-devel mailing list
>>  openwrt-devel@lists.openwrt.org
>>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff mbox series

Patch

diff --git a/target/linux/ramips/dts/mt7621_netgear_r6850.dts b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
index 78e9093216..313fecf936 100644
--- a/target/linux/ramips/dts/mt7621_netgear_r6850.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
@@ -6,3 +6,21 @@ 
 	compatible = "netgear,r6850", "mediatek,mt7621-soc";
 	model = "Netgear R6850";
 };
+
+&pcie0 {
+	wifi@0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x28000>;
+		ieee80211-freq-limit = <5000000 6000000>;
+	};
+};
+
+&pcie1 {
+	wifi@0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x20000>;
+		ieee80211-freq-limit = <2400000 2500000>;
+	};
+};