[Solved] Reg domain TX-power on R7800 (5GHz) vs dd-wrt

Hi.

I am currently transitioning from dd-wrt to OpenWRT. One of the discrepancies which I can see on a Netgear R7800 running dd-wrt and one running OpenWRT is the TX power on 5GHz (VHT160 @ channel 100).

The DD-WRT will claim 30dBm while OpenWRT claims 26dBm. As far as I understand this should be regulated by the wireless interface's firmware which loads a regulatory domain table which then OpenWRT invokes based on user settings?

OpenWRT claims the following:

# 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)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

# iw dev wlan0 info
Interface wlan0
        ifindex 35
        wdev 0x6
        addr 3c:37:86:xx:xx:xx
        ssid xxx-50-test
        type AP
        wiphy 0
        channel 100 (5500 MHz), width: 160 MHz, center1: 5570 MHz
        txpower 26.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

DD-WRT claims;

# 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
        (5250 - 5350 @ 80), (N/A, 20), (N/A), NO-OUTDOOR
        (5470 - 5725 @ 160), (N/A, 30), (N/A)
        (5725 - 5875 @ 80), (N/A, 14), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

# iw dev ath0 info
Interface ath0
        ifindex 30
        wdev 0x6
        addr 78:d2:94:xx:xx:xx
        ssid xxx-50
        type AP
        wiphy 0
        channel 100 (5500 MHz), width: 160 MHz, center1: 5570 MHz
        txpower 30.00 dBm
        multicast TXQ:
                qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                0       0       1100765 0       0       0       321     163059281               1116232

Any idea why this would be and what can be done as a remedy? :slight_smile: How does it look on your R7800's? Could it be revision specific for the hardware itself?

This thread swiched to just curiosity. I found that regulatory domain Panama (PA) according to OpenWRT supports 30dBm (1000mW) txpower on both 2.4GHz and 5GHz frequencies.

country PA: DFS-FCC
	(2400 - 2483.5 @ 40), (36)
	(5150 - 5250 @ 80), (36), AUTO-BW
	(5250 - 5350 @ 80), (30), AUTO-BW
	(5470 - 5725 @ 160), (30)
	(5725 - 5850 @ 80), (36)
	(57000 - 64000 @ 2160), (43)

Ref: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/tree/db.txt?id=HEAD

Another curiosity is why OpenWRT does not allow up to 36dBm on 2.4GHz with this regulatory domain? Hardware limitation? 1000mW is a quite high txpower as is.

I think the discripancy you pointed at for frequencies between 5470 to 5725 will bill down to TPC and DFS (I don't know if the hardware or either of the firmwares support them or not, but the regulations is consistent with the difference.

1 Like

Thanks for the input!

The only thing which baffles me is that they are both the same hardware and model. Netgear R7800. Same wifi chipset and manufacturer. QCA9984 based hardware. Running in the same building (as for if it would be affected by DFS at any given moment).

As for TPC I should still see a max allowed transmit power for my regulatory domain. Here I expect the raw data to actually match.

For DFS it's as far as I know a radar scan detection which could force it to turn off transmits on colliding channels. Again; it should not affect reported txpower for the regulatory domain.

The db.txt from kernel.org supports dd-wrt's definition of the regulatory domain, and OpenWRT seems to have a discrepancy. As far as I can tell.

The regulatory domain specifies the maximum power. Therefore, if the hardware doesn't support TPC or DFS (or if that's not implemented in the firmware), then the maximum power will be limited to the figures mentioned.

A third possibility would be that they are implemented, but for some reason it's not reflecting on the regulated domains file it reads from.

I do believe that the R7800 supports regulatory domains, as the txpower increased when switching to Panama. As such I agree with you that it bottles down to the definition file it reads it from. And that's what I would believe might be a discrepancy identified.

ddwrt does things like TPC which can account for small discrepancies like this.
They reference the same regulatory database.
Or at least they have last time I looked. Navigating ddwrt svn is like navigating a Japanese interchange.

Why don't you ask at ddwrt what is done differently, then report back.

1 Like

It's a fair question.

While drilling down the rabbit hole as to why I thought dd-wrt better reflected db.txt found at git.kernel.org I noticed my mistake in all of this;

country DE: DFS-ETSI
	(2400 - 2483.5 @ 40), (100 mW)
	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
	# short range devices (ETSI EN 300 440-1)
	(5725 - 5875 @ 80), (25 mW)
	# 60 GHz band channels 1-4 (ETSI EN 302 567)
	(57000 - 66000 @ 2160), (40)

500mW should be 27dBm, not 30dBm. As such OpenWRT's regulatory domain shown in "iw reg get" is a lot closer than DD-WRT's one. The reason I mistook this was because the values in db.txt was written in mW for this particular regulatory domain. I mistook and thought 500mW equaled 30dBm and thought DD-WRT and the db above lined up.

30dBm is in fact 1000mW which is double the txpower allowed in Germany.

I guess one good takeaway from this exercise is that Panama is a great regulatory domain to use both for 2.4GHz and 5GHz. :wink: Also; they don't seem to have any DFS requirements on the channel. Of course using it if you are outside of Panama would be strictly discouraged and potentially illegal depending on regulations.

Thanks again to @Hegabo and @lantis1008 on all of your input in this thread. It's as always greatly appreciated :slight_smile:

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like

Channels from 100 to 140 are part of the second RLAN band and have an EIRP power limit of 30 dBm (1000 mW) for TPC and 27 dBm (500 mW) for non-TPC devices or 20 dBm (100 mW) for devices without any TPC or DFS support

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.