Fix regulatory domain persistence for 5GHz AP on boot

Problem: wlan1 regulatory domain not set on boot, defaults to 2.4GHz-only mode,
preventing channel 149 (5GHz) from being available. hostapd fails on startup.

Solution:
1. Modified regdomain.service to:
   - Run BEFORE hostapd/hostapd-2g services (Before= directive)
   - Run earlier in boot (After= sysinit.target)
   - RemainAfterExit=yes to persist setting

2. Added 80-regdomain.rules udev rule:
   - Triggers on regulatory device changes
   - Executes 'iw reg set CA' automatically

3. Added hostapd drop-in config:
   - Explicitly requires regdomain.service
   - Adds Wants= to ensure it starts

This ensures the regulatory domain is set BEFORE hostapd attempts to use
channel 149, fixing the boot-time AP failure loop.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-18 18:45:59 -04:00
co-authored by Claude Haiku 4.5
parent 2b00157642
commit 1002f86172
4 changed files with 13 additions and 2 deletions
+3
View File
@@ -0,0 +1,3 @@
# Set wireless regulatory domain on boot
# Trigger when regulatory device appears
SUBSYSTEM=="regulatory", ACTION=="change", RUN+="/usr/sbin/iw reg set CA"