Mt7615e - txpower stacks at 6 dB

Hallo, I’ve been trying for days to increase the performance of the mt7615 network card in our bpi R64. I’ve tried it with an dts-overlay as proposed here 802.11ac module gives max 6dbi transmitter power - #10 by frank-w and BPI-R64 new image: Debian10 and Ubuntu18.04 Linux kernel 5.4.0 2020-05-08 - #13 by frank-w. However, if I try to increase the transmission power of the mt7615e with the following command it stagnates at 6dB: sudo iw phy0 set txpower fixed 7000

it stucks at 6 dB

iw dev:
phy#1
Interface wifi0.1
ifindex 15
wdev 0x100000002
addr b6:27:7a:d5:c0:d0
type AP/VLAN
channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz
txpower 20.00 dBm
Interface wifi0
ifindex 12
wdev 0x100000001
addr b6:27:7a:d5:c0:d0
ssid WiFi_BSB_24
type AP
channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz
txpower 20.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
phy#0
Interface wifi1.1
ifindex 14
wdev 0x2
addr ea:92:cb:bb:98:cb
type AP/VLAN
channel 44 (5220 MHz), width: 80 MHz, center1: 5210 MHz
txpower 6.00 dBm
Interface wifi1
ifindex 11
wdev 0x1
addr ea:92:cb:bb:98:cb
ssid WiFi_BSB_50
type AP
channel 44 (5220 MHz), width: 80 MHz, center1: 5210 MHz
txpower 6.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0

afair it was an issue in eeprom…so you need to pass a modified eeprom via dtoverlay, file or whatever…have you found a eeprom or did you modify it by yourself (max-power-fields have to be changed manually)? but i do not remember the byte-positions…

We found: https://github.com/openwrt/mt76/blob/master/mt7615/eeprom.h

Based on eeprom provided by ryder.lee: https://forum.banana-pi.org/t/bpi-r64-new-image-debian10-and-ubuntu18-04-linux-kernel-5-4-0-2020-05-08/11106/16

Which we modified and put to a dedicated dts overlay file, see attached file wmac-eeprom_7615.dts (4.4 KB)

However this did not work and we couldn’t find any reason why… :thinking:

Unfortunately, I am still experimenting, but the transmission power does not go above 6 dBm. Setting it lower, on the other hand, works… Maybe someone here still has an idea?

Does it have to do with your country code? What’s the output of:

iw reg get

iw list | grep -A 15 Frequencies:

I also find:

However, setting the regdomain may not alter your settings. Some devices have a regdomain set in firmware/EEPROM, which dictates the limits of the device, meaning that setting regdomain in software can only increase restrictions, not decrease them. For example, a CN device could be set in software to the US regdomain, but because CN has an EIRP maximum of 20dBm, the device will not be able to transmit at the US maximum of 30dBm.

But I don;t know if this is applicable to the device…

Thanks for your tip. How can I find out if the country code is set in the eeprom or firmware? :thinking:

iw reg get:

global country DE: DFS-ETSI (2400 - 2483 @ 40), (N/A, 20), (N/A) (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS (5725 - 5875 @ 80), (N/A, 13), (N/A) (5945 - 6425 @ 160), (N/A, 23), (N/A), NO-OUTDOOR (57000 - 66000 @ 2160), (N/A, 40), (N/A)

iw list | grep -A 15 Frequencies:

Frequencies:

  • 2412 MHz [1] (20.0 dBm)
  • 2417 MHz [2] (20.0 dBm)
  • 2422 MHz [3] (20.0 dBm)
  • 2427 MHz [4] (20.0 dBm)
  • 2432 MHz [5] (20.0 dBm)
  • 2437 MHz [6] (20.0 dBm)
  • 2442 MHz [7] (20.0 dBm)
  • 2447 MHz [8] (20.0 dBm)
  • 2452 MHz [9] (20.0 dBm)
  • 2457 MHz [10] (20.0 dBm)
  • 2462 MHz [11] (20.0 dBm)
  • 2467 MHz [12] (20.0 dBm)
  • 2472 MHz [13] (20.0 dBm)
  • 2484 MHz [14] (disabled) Supported commands: – Frequencies:
  • 2412 MHz [1] (6.0 dBm)
  • 2417 MHz [2] (6.0 dBm)
  • 2422 MHz [3] (6.0 dBm)
  • 2427 MHz [4] (6.0 dBm)
  • 2432 MHz [5] (6.0 dBm)
  • 2437 MHz [6] (6.0 dBm)
  • 2442 MHz [7] (6.0 dBm)
  • 2447 MHz [8] (6.0 dBm)
  • 2452 MHz [9] (6.0 dBm)
  • 2457 MHz [10] (6.0 dBm)
  • 2462 MHz [11] (6.0 dBm)
  • 2467 MHz [12] (6.0 dBm)
  • 2472 MHz [13] (6.0 dBm)
  • 2484 MHz [14] (disabled) Band 2: – Frequencies:
  • 5180 MHz [36] (6.0 dBm)
  • 5200 MHz [40] (6.0 dBm)
  • 5220 MHz [44] (6.0 dBm)
  • 5240 MHz [48] (6.0 dBm)
  • 5260 MHz [52] (6.0 dBm) (radar detection)
  • 5280 MHz [56] (6.0 dBm) (radar detection)
  • 5300 MHz [60] (6.0 dBm) (radar detection)
  • 5320 MHz [64] (6.0 dBm) (radar detection)
  • 5500 MHz [100] (6.0 dBm) (radar detection)
  • 5520 MHz [104] (6.0 dBm) (radar detection)
  • 5540 MHz [108] (6.0 dBm) (radar detection)
  • 5560 MHz [112] (6.0 dBm) (radar detection)
  • 5580 MHz [116] (6.0 dBm) (radar detection)
  • 5600 MHz [120] (6.0 dBm) (radar detection)
  • 5620 MHz [124] (6.0 dBm) (radar detection)

With the great help of @ericwoud we were able to finally load the eeprom data for the mt7615e by using the latest sources of Eric’s branch and building the AUR package on our own which has also already been merged by Eric:

_gitbranch="bpir-rolling-stable"
_gitroot="https://github.com/ericwoud/linux.git"

Furthermore it was needed to pull the following two files and put them into the /lib/firmware/mediatek directory: https://github.com/ericwoud/buildR64ubuntu/tree/master/linux-5.16-rc3/firmware/mediatek

This is originally based on @frank-w 's patch. Thank you also for that.

With that in place, no overlays are needed for this anymore and for PCIe devices this is probably even not possible to apply dts overlay files.

Have you changed anything in the eeprom file or does @ericwoud change it in his files?

We used the eeprom file from here https://github.com/openwrt/mt76/blob/master/mt7615/eeprom.h

This is no eeprom blob, only the header file (and pls do not post links pointing to your gmx :wink: )…

Sorry, I meant the two files from here; we used them unchanged:

What do you mean with gmx? (I only know this abbreviation for the email provider :grimacing: )

ah, sorry it was web.de (and yes the german mail provider)…i edited your link…previously it was pointing to deref-web.de :wink:

@ericwoud have you already patched these files? wonder why they increase the TX power without modification

I haven’t patched any eeprom file. But it was a while ago, so I am also not sure where I got them from, probably here in some post. I remember there was a topic, where the db strength was pointed out which numbers they are in the file, described in a table (in an image)

Using the correct eeprom should get 20db… But I do not have a mt7615 card, so never tried it myself.