public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts
@ 2026-04-29 19:49 Michael Tremer
  2026-04-29 19:49 ` [PATCH 2/9] wlanap.cgi: Add option to select 6 GHz band Michael Tremer
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

When the system boots up, it could happen that hostapd didn't come up
the first time:

Apr 28 15:18:10 ipfire-test hostapd: green0: interface state UNINITIALIZED->COUNTRY_UPDATE
Apr 28 15:18:10 ipfire-test hostapd: ACS: Automatic channel selection started, this may take a bit
Apr 28 15:18:10 ipfire-test hostapd: ACS: No available channels found
Apr 28 15:18:10 ipfire-test hostapd: green0: IEEE 802.11 Configured channel (0) or frequency (0) (secondary_channel=1) not found from the channel list of the current mode (2) IEEE 802.11a
Apr 28 15:18:10 ipfire-test hostapd: green0: IEEE 802.11 Hardware does not support configured channel
Apr 28 15:18:10 ipfire-test hostapd: Could not select hw_mode and channel. (-3)
Apr 28 15:18:10 ipfire-test hostapd: green0: interface state COUNTRY_UPDATE->DISABLED
Apr 28 15:18:10 ipfire-test hostapd: green0: AP-DISABLED
Apr 28 15:18:10 ipfire-test hostapd: green0: interface state DISABLED->DISABLED
Apr 28 15:18:10 ipfire-test hostapd: green0: AP-DISABLED
Apr 28 15:18:10 ipfire-test hostapd: green0: CTRL-EVENT-TERMINATING
Apr 28 15:18:10 ipfire-test hostapd: hostapd_free_hapd_data: Interface green0 wasn't started
Apr 28 15:18:10 ipfire-test hostapd: nl80211: deinit ifname=green0 disabled_11b_rates=0

A second start always was successful. By explicitely setting the reg
domain this problem is being worked around.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 src/initscripts/packages/hostapd | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index 93ddae72f..583a8eba4 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -685,6 +685,11 @@ case "${1}" in
 			exit 1
 		fi
 
+		# Force setting the regulatory domain
+		if [ -n "${CONFIG["COUNTRY"]}" ]; then
+			iw reg set "${CONFIG["COUNTRY"]}" &>/dev/null
+		fi
+
 		# Compose the command line
 		args=(
 			/usr/bin/hostapd
-- 
2.47.3



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-04-29 19:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-29 19:49 [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts Michael Tremer
2026-04-29 19:49 ` [PATCH 2/9] wlanap.cgi: Add option to select 6 GHz band Michael Tremer
2026-04-29 19:49 ` [PATCH 3/9] hostapd: Correctly parse capabilities for the " Michael Tremer
2026-04-29 19:49 ` [PATCH 4/9] hostapd: Add support " Michael Tremer
2026-04-29 19:49 ` [PATCH 5/9] hostapd: Configure as indoor AP and increase transmit power Michael Tremer
2026-04-29 19:49 ` [PATCH 6/9] hostapd: Disable 802.11n in 6 GHz band, too Michael Tremer
2026-04-29 19:49 ` [PATCH 7/9] hostapd: Tell the AP that the antennas won't change Michael Tremer
2026-04-29 19:49 ` [PATCH 8/9] hostapd: Fix 40 MHz flags when manually chosing the channel Michael Tremer
2026-04-29 19:49 ` [PATCH 9/9] hostapd: Bump version Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox