OpenWRT Boot Times Affected by WiFi: Difference between revisions

wiki.TerraBase.info
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
== OpenWRT Wireless Regulatory Flags ==
...wondering about long boot times for OpenWRT 25.x.y on a WRT32X or similar?


OpenWRT uses the Linux wireless regulatory database to decide which channels, channel widths, and transmit powers are allowed for a selected country code.
Could it be WiFi related?  Believe it or not: YES!


A regulatory rule has this general form:
=== /lib/firmware/regulatory.db ===


<pre>
<pre>
(frequency_start - frequency_end @ maximum_channel_width), (maximum_power), optional_flags
country US: DFS-FCC
</pre>
# S1G Channel 1-3
 
(902 - 904 @ 2), (30)
Example:
# S1G Channel 5-35
 
(904 - 920 @ 16), (30)
<pre>
# S1G Channel 37-51
(5250 - 5350 @ 80), (24), DFS, AUTO-BW
(920 - 928 @ 8), (30)
</pre>
(2400 - 2472 @ 40), (30)
 
# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
In that example:
(5150 - 5250 @ 80), (23), AUTO-BW
 
(5250 - 5350 @ 80), (24), DFS, AUTO-BW
* <code>5250 - 5350</code> is the allowed frequency range in MHz.
# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
* <code>@ 80</code> means the maximum allowed channel width is 80 MHz.
# Since 5725 ~ 5730 MHz belongs to the next range which has looser
* <code>(24)</code> means the maximum transmit power is 24 dBm.
# requirements, we can extend the range by 5 MHz to make the kernel
* <code>DFS</code> means Dynamic Frequency Selection is required.
# happy and be able to use channel 144.
* <code>AUTO-BW</code> affects how the regulatory code handles bandwidth across adjacent ranges.
(5470 - 5730 @ 160), (24), DFS
 
(5730 - 5850 @ 80), (31), AUTO-BW
=== Flag Meanings ===
# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
 
# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
<code>DFS</code> means Dynamic Frequency Selection. The radio must check for radar before using that channel as an access point. This can delay wireless startup.
(5850 - 5895 @ 40), (27), NO-OUTDOOR, AUTO-BW, NO-IR
# 6g band
# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
(5925 - 7125 @ 320), (12), NO-OUTDOOR, NO-IR
# 60g band
# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
# channels 1-6 EIRP=40dBm(43dBm peak)
(57240 - 71000 @ 2160), (40)
</pre><code>DFS</code> means Dynamic Frequency Selection. The radio must check for radar before using that channel as an access point. This can delay wireless startup.


<code>AUTO-BW</code> means automatic bandwidth handling inside the regulatory code. It helps determine whether wider channels are allowed across compatible frequency ranges. It does not mean automatic channel selection.
<code>AUTO-BW</code> means automatic bandwidth handling inside the regulatory code. It helps determine whether wider channels are allowed across compatible frequency ranges. It does not mean automatic channel selection.
Line 37: Line 45:
<code>wmmrule=ETSI</code> applies ETSI Wireless Multimedia parameters. This affects Quality of Service / contention behavior, not DFS startup delay.
<code>wmmrule=ETSI</code> applies ETSI Wireless Multimedia parameters. This affects Quality of Service / contention behavior, not DFS startup delay.


=== Practical Effect ===
=== Try This (For Boot Speed Testing ONLY!  Transmit Power ONLY changed to verify if OpenWRT does indeed read new config) ===
 
<syntaxhighlight lang="text">
These flags do affect final wireless behavior. They can determine whether OpenWRT, the kernel, the wireless driver, and hostapd allow a radio to start on a given channel.
 
For DFS startup testing, the important item is the <code>DFS</code> flag. If the same frequency range starts faster after removing <code>DFS</code>, then DFS/radar handling was part of the delay.
 
Changing transmit power alone is not a direct DFS test.
 
=== US Regulatory Block ===
 
<pre>
country US: DFS-FCC
country US: DFS-FCC
# S1G Channel 1-3
# S1G Channel 1-3
(902 - 904 @ 2), (30)
(902 - 904 @ 2), (33)
# S1G Channel 5-35
# S1G Channel 5-35
(904 - 920 @ 16), (30)
(904 - 920 @ 16), (33)
# S1G Channel 37-51
# S1G Channel 37-51
(920 - 928 @ 8), (30)
(920 - 928 @ 8), (33)
(2400 - 2472 @ 40), (30)
(2400 - 2472 @ 40), (33)
# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
(5150 - 5250 @ 80), (23), AUTO-BW
(5150 - 5250 @ 80), (33), AUTO-BW
(5250 - 5350 @ 80), (24), DFS, AUTO-BW
(5250 - 5350 @ 80), (33), AUTO-BW
# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
# Since 5725 ~ 5730 MHz belongs to the next range which has looser
# Since 5725 ~ 5730 MHz belongs to the next range which has looser
# requirements, we can extend the range by 5 MHz to make the kernel
# requirements, we can extend the range by 5 MHz to make the kernel
# happy and be able to use channel 144.
# happy and be able to use channel 144.
(5470 - 5730 @ 160), (24), DFS
(5470 - 5730 @ 160), (33), AUTO-BW
(5730 - 5850 @ 80), (31), AUTO-BW
(5730 - 5850 @ 80), (33), AUTO-BW
# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
(5850 - 5895 @ 40), (27), NO-OUTDOOR, AUTO-BW, NO-IR
(5850 - 5895 @ 40), (33), AUTO-BW
# 6g band
# 6g band
# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
(5925 - 7125 @ 320), (12), NO-OUTDOOR, NO-IR
(5925 - 7125 @ 320), (12), AUTO-BW
# 60g band
# 60g band
# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
# channels 1-6 EIRP=40dBm(43dBm peak)
# channels 1-6 EIRP=40dBm(43dBm peak)
(57240 - 71000 @ 2160), (40)
(57240 - 71000 @ 2160), (40)
</pre>
</syntaxhighlight>See?  Now change it back to be legal.

Revision as of 01:47, 29 June 2026

...wondering about long boot times for OpenWRT 25.x.y on a WRT32X or similar?

Could it be WiFi related? Believe it or not: YES!

/lib/firmware/regulatory.db

country US: DFS-FCC
	# S1G Channel 1-3
	(902 - 904 @ 2), (30)
	# S1G Channel 5-35
	(904 - 920 @ 16), (30)
	# S1G Channel 37-51
	(920 - 928 @ 8), (30)
	(2400 - 2472 @ 40), (30)
	# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
	(5150 - 5250 @ 80), (23), AUTO-BW
	(5250 - 5350 @ 80), (24), DFS, AUTO-BW
	# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
	# Since 5725 ~ 5730 MHz belongs to the next range which has looser
	# requirements, we can extend the range by 5 MHz to make the kernel
	# happy and be able to use channel 144.
	(5470 - 5730 @ 160), (24), DFS
	(5730 - 5850 @ 80), (31), AUTO-BW
	# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
	# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
	(5850 - 5895 @ 40), (27), NO-OUTDOOR, AUTO-BW, NO-IR
	# 6g band
	# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
	(5925 - 7125 @ 320), (12), NO-OUTDOOR, NO-IR
	# 60g band
	# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
	# channels 1-6 EIRP=40dBm(43dBm peak)
	(57240 - 71000 @ 2160), (40)

DFS means Dynamic Frequency Selection. The radio must check for radar before using that channel as an access point. This can delay wireless startup.

AUTO-BW means automatic bandwidth handling inside the regulatory code. It helps determine whether wider channels are allowed across compatible frequency ranges. It does not mean automatic channel selection.

NO-OUTDOOR means outdoor use is not allowed for that frequency range.

NO-IR means No Initiating Radiation. The device is not allowed to initiate transmissions on that range. In practice, this can prevent access point mode or active scanning.

NO-OFDM means Orthogonal Frequency-Division Multiplexing is not allowed. This is mostly relevant to special legacy restrictions.

wmmrule=ETSI applies ETSI Wireless Multimedia parameters. This affects Quality of Service / contention behavior, not DFS startup delay.

Try This (For Boot Speed Testing ONLY! Transmit Power ONLY changed to verify if OpenWRT does indeed read new config)

country US: DFS-FCC
	# S1G Channel 1-3
	(902 - 904 @ 2), (33)
	# S1G Channel 5-35
	(904 - 920 @ 16), (33)
	# S1G Channel 37-51
	(920 - 928 @ 8), (33)
	(2400 - 2472 @ 40), (33)
	# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
	(5150 - 5250 @ 80), (33), AUTO-BW
	(5250 - 5350 @ 80), (33), AUTO-BW
	# This range ends at 5725 MHz, but channel 144 extends to 5730 MHz.
	# Since 5725 ~ 5730 MHz belongs to the next range which has looser
	# requirements, we can extend the range by 5 MHz to make the kernel
	# happy and be able to use channel 144.
	(5470 - 5730 @ 160), (33), AUTO-BW
	(5730 - 5850 @ 80), (33), AUTO-BW
	# https://www.federalregister.gov/documents/2021/05/03/2021-08802/use-of-the-5850-5925-ghz-band
	# max. 33 dBm AP @ 20MHz, 36 dBm AP @ 40Mhz+, 6 dB less for clients
	(5850 - 5895 @ 40), (33), AUTO-BW
	# 6g band
	# https://www.federalregister.gov/documents/2020/05/26/2020-11236/unlicensed-use-of-the-6ghz-band
	(5925 - 7125 @ 320), (12), AUTO-BW
	# 60g band
	# reference: section IV-D https://docs.fcc.gov/public/attachments/FCC-16-89A1.pdf
	# channels 1-6 EIRP=40dBm(43dBm peak)
	(57240 - 71000 @ 2160), (40)

See? Now change it back to be legal.