From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Cc: Michael Tremer <michael.tremer@ipfire.org>
Subject: [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts
Date: Wed, 29 Apr 2026 19:49:26 +0000 [thread overview]
Message-ID: <20260429194934.863108-1-michael.tremer@ipfire.org> (raw)
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
next reply other threads:[~2026-04-29 19:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 19:49 Michael Tremer [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260429194934.863108-1-michael.tremer@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox