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

* [PATCH 2/9] wlanap.cgi: Add option to select 6 GHz band
  2026-04-29 19:49 [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts Michael Tremer
@ 2026-04-29 19:49 ` Michael Tremer
  2026-04-29 19:49 ` [PATCH 3/9] hostapd: Correctly parse capabilities for the " Michael Tremer
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 doc/language_issues.en  | 1 +
 doc/language_issues.es  | 1 +
 doc/language_issues.fr  | 1 +
 doc/language_issues.it  | 1 +
 doc/language_issues.nl  | 1 +
 doc/language_issues.pl  | 1 +
 doc/language_issues.ru  | 1 +
 doc/language_issues.tr  | 1 +
 doc/language_issues.tw  | 1 +
 doc/language_issues.zh  | 1 +
 doc/language_missings   | 9 +++++++++
 html/cgi-bin/wlanap.cgi | 5 ++++-
 langs/de/cgi-bin/de.pl  | 1 +
 langs/en/cgi-bin/en.pl  | 1 +
 14 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/doc/language_issues.en b/doc/language_issues.en
index 109dc0f39..61cd706c2 100644
--- a/doc/language_issues.en
+++ b/doc/language_issues.en
@@ -2434,6 +2434,7 @@ WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap channel = Channel
 WARNING: untranslated string: wlanap client isolation = Client Isolation
 WARNING: untranslated string: wlanap clients = unknown string
diff --git a/doc/language_issues.es b/doc/language_issues.es
index 0038f162f..042a89377 100644
--- a/doc/language_issues.es
+++ b/doc/language_issues.es
@@ -1274,6 +1274,7 @@ WARNING: untranslated string: wlanap 802.11be 80mhz = IEEE 802.11be @ 80 MHz
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap invalid band = Invalid band
 WARNING: untranslated string: wlanap invalid mode = Invalid mode
diff --git a/doc/language_issues.fr b/doc/language_issues.fr
index a00b1c646..b96f161ba 100644
--- a/doc/language_issues.fr
+++ b/doc/language_issues.fr
@@ -1325,6 +1325,7 @@ WARNING: untranslated string: wlanap 802.11be 80mhz = IEEE 802.11be @ 80 MHz
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap hide ssid = Hide SSID
 WARNING: untranslated string: wlanap invalid band = Invalid band
diff --git a/doc/language_issues.it b/doc/language_issues.it
index fd5542e1f..c72cab5b1 100644
--- a/doc/language_issues.it
+++ b/doc/language_issues.it
@@ -1680,6 +1680,7 @@ WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap client isolation = Client Isolation
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
diff --git a/doc/language_issues.nl b/doc/language_issues.nl
index 94750b660..fc5ca37b6 100644
--- a/doc/language_issues.nl
+++ b/doc/language_issues.nl
@@ -1670,6 +1670,7 @@ WARNING: untranslated string: wlan client method = Method
 WARNING: untranslated string: wlan client password = Password
 WARNING: untranslated string: wlan client tls cipher = TLS Cipher
 WARNING: untranslated string: wlan client tls version = TLS Version
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap client isolation = Client Isolation
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
diff --git a/doc/language_issues.pl b/doc/language_issues.pl
index a0556cf95..53ace2061 100644
--- a/doc/language_issues.pl
+++ b/doc/language_issues.pl
@@ -1948,6 +1948,7 @@ WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap client isolation = Client Isolation
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
diff --git a/doc/language_issues.ru b/doc/language_issues.ru
index 6d233a776..031dddcb8 100644
--- a/doc/language_issues.ru
+++ b/doc/language_issues.ru
@@ -1947,6 +1947,7 @@ WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap client isolation = Client Isolation
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
diff --git a/doc/language_issues.tr b/doc/language_issues.tr
index 622d52bb5..f72363706 100644
--- a/doc/language_issues.tr
+++ b/doc/language_issues.tr
@@ -1550,6 +1550,7 @@ WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap client isolation = Client Isolation
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap hide ssid = Hide SSID
diff --git a/doc/language_issues.tw b/doc/language_issues.tw
index cf7d0163e..708907128 100644
--- a/doc/language_issues.tw
+++ b/doc/language_issues.tw
@@ -1292,6 +1292,7 @@ WARNING: untranslated string: wlanap 802.11be 80mhz = IEEE 802.11be @ 80 MHz
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap invalid band = Invalid band
 WARNING: untranslated string: wlanap invalid mode = Invalid mode
diff --git a/doc/language_issues.zh b/doc/language_issues.zh
index cf7d0163e..708907128 100644
--- a/doc/language_issues.zh
+++ b/doc/language_issues.zh
@@ -1292,6 +1292,7 @@ WARNING: untranslated string: wlanap 802.11be 80mhz = IEEE 802.11be @ 80 MHz
 WARNING: untranslated string: wlanap band = Band
 WARNING: untranslated string: wlanap band 2.4ghz = 2.4 GHz
 WARNING: untranslated string: wlanap band 5ghz = 5 GHz
+WARNING: untranslated string: wlanap band 6ghz = 6 GHz
 WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap invalid band = Invalid band
 WARNING: untranslated string: wlanap invalid mode = Invalid mode
diff --git a/doc/language_missings b/doc/language_missings
index a505fdd5d..88a937e00 100644
--- a/doc/language_missings
+++ b/doc/language_missings
@@ -249,6 +249,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap invalid band
 < wlanap invalid mode
 ############################################################################
@@ -442,6 +443,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap hide ssid
 < wlanap invalid band
 < wlanap invalid mode
@@ -1100,6 +1102,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap client isolation
 < wlanap configuration
 < wlanap hide ssid
@@ -1797,6 +1800,7 @@
 < winbind daemon
 < wireguard
 < wireless network
+< wlanap band 6ghz
 < wlanap client isolation
 < wlanap configuration
 < wlanap hide ssid
@@ -2937,6 +2941,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap client isolation
 < wlanap configuration
 < wlanap country
@@ -4115,6 +4120,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap client isolation
 < wlanap configuration
 < wlanap country
@@ -4670,6 +4676,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap client isolation
 < wlanap hide ssid
 < wlanap invalid band
@@ -4814,6 +4821,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap invalid band
 < wlanap invalid mode
 < wlanap neighbor scan
@@ -4929,6 +4937,7 @@
 < wlanap band
 < wlanap band 2.4ghz
 < wlanap band 5ghz
+< wlanap band 6ghz
 < wlanap invalid band
 < wlanap invalid mode
 < wlanap neighbor scan
diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi
index a02b58b6d..2bb5efe8c 100644
--- a/html/cgi-bin/wlanap.cgi
+++ b/html/cgi-bin/wlanap.cgi
@@ -97,7 +97,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}") {
 	}
 
 	# Validate BAND
-	unless ($cgiparams{'BAND'} =~ m/^[25]g$/) {
+	unless ($cgiparams{'BAND'} =~ m/^[256]g$/) {
 		$errormessage .= "$Lang::tr{'wlanap invalid band'}<br />";
 	}
 
@@ -357,6 +357,9 @@ print <<END;
 				<td>$Lang::tr{'wlanap band'}</td>
 				<td>
 					<select name='BAND'>
+						<option value="6g" $selected{'BAND'}{'6g'}>
+							$Lang::tr{'wlanap band 6ghz'}
+						</option>
 						<option value="5g" $selected{'BAND'}{'5g'}>
 							$Lang::tr{'wlanap band 5ghz'}
 						</option>
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index d7f8148f3..74919b231 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -3108,6 +3108,7 @@
 'wlanap band' => 'Band',
 'wlanap band 2.4ghz' => '2.4 GHz',
 'wlanap band 5ghz' => '5 GHz',
+'wlanap band 6ghz' => '6 GHz',
 'wlanap channel' => 'Kanal',
 'wlanap client isolation' => 'Client-Isolierung',
 'wlanap configuration' => 'Access Point Konfiguration',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 1685a7032..0116d569f 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -3235,6 +3235,7 @@
 'wlanap band' => 'Band',
 'wlanap band 2.4ghz' => '2.4 GHz',
 'wlanap band 5ghz' => '5 GHz',
+'wlanap band 6ghz' => '6 GHz',
 'wlanap channel' => 'Channel',
 'wlanap client isolation' => 'Client Isolation',
 'wlanap configuration' => 'Wireless Access Point Configuration',
-- 
2.47.3



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

* [PATCH 3/9] hostapd: Correctly parse capabilities for the 6 GHz band
  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 ` Michael Tremer
  2026-04-29 19:49 ` [PATCH 4/9] hostapd: Add support " Michael Tremer
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

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

diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index 583a8eba4..0bd90bda2 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -174,6 +174,12 @@ write_config() {
 					break
 				fi
 				;;
+
+			"* 7115.0 MHz"*)
+				if [ "${CONFIG["BAND"]}" = "6g" ]; then
+					break
+				fi
+				;;
 		esac
 	done <<<"$(iw phy "${phy}" info)"
 
-- 
2.47.3



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

* [PATCH 4/9] hostapd: Add support for the 6 GHz band
  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 ` Michael Tremer
  2026-04-29 19:49 ` [PATCH 5/9] hostapd: Configure as indoor AP and increase transmit power Michael Tremer
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

This is mainly adding any center frequencies when the user manually
choses a channel.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/hostapd/config            |   4 +-
 src/initscripts/packages/hostapd | 129 ++++++++++++++++++++++++++++---
 2 files changed, 120 insertions(+), 13 deletions(-)

diff --git a/config/hostapd/config b/config/hostapd/config
index 8bf19375b..7bda725a7 100644
--- a/config/hostapd/config
+++ b/config/hostapd/config
@@ -375,9 +375,9 @@ CONFIG_MBO=y
 CONFIG_TAXONOMY=y
 
 # Fast Initial Link Setup (FILS) (IEEE 802.11ai)
-#CONFIG_FILS=y
+CONFIG_FILS=y
 # FILS shared key authentication with PFS
-#CONFIG_FILS_SK_PFS=y
+CONFIG_FILS_SK_PFS=y
 
 # Include internal line edit mode in hostapd_cli. This can be used to provide
 # limited command line editing and history support.
diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index 0bd90bda2..c8d3ffce1 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -125,6 +125,7 @@ write_config() {
 	local he_phy_flags=0
 	local eht_mac_flags=0
 	local eht_phy_flags=0
+	local channel_offset
 
 	# Set some default BAND if none is set
 	if [ -z "${CONFIG["BAND"]}" ]; then
@@ -332,6 +333,16 @@ write_config() {
 		esac
 	fi
 
+	# Set channel offset
+	case "${CONFIG["BAND"]}" in
+		6g)
+			channel_offset=1
+			;;
+		*)
+			channel_offset=0
+			;;
+	esac
+
 	# Header
 	echo "# Automatically generated configuration"
 	echo "# DO NOT EDIT"
@@ -391,7 +402,7 @@ write_config() {
 
 			# Compute the channel segment index
 			if [ "${CONFIG["CHANNEL"]}" -gt 0 ]; then
-				case "$(( (${CONFIG["CHANNEL"]} / 4) % 2 ))" in
+				case "$(( ((${CONFIG["CHANNEL"]} / 4) + channel_offset) % 2 ))" in
 					0)
 						vht_oper_centr_freq_seg0_idx="$(( ${CONFIG["CHANNEL"]} - 2 ))"
 						;;
@@ -409,7 +420,7 @@ write_config() {
 
 			# Compute the channel segment index
 			if [ "${CONFIG["CHANNEL"]}" -gt 0 ]; then
-				case "$(( (${CONFIG["CHANNEL"]} / 4) % 4 ))" in
+				case "$(( ((${CONFIG["CHANNEL"]} / 4) + channel_offset) % 4 ))" in
 					0)
 						vht_oper_centr_freq_seg0_idx="$(( ${CONFIG["CHANNEL"]} - 6 ))"
 						;;
@@ -433,15 +444,46 @@ write_config() {
 
 			# Compute the channel segment index
 			if [ "${CONFIG["CHANNEL"]}" -gt 0 ]; then
-				case "${CONFIG["CHANNEL"]}" in
-					36|40|44|48|52|56|60|64)
-						vht_oper_centr_freq_seg0_idx=50
-						;;
-					100|104|108|112|116|120|124|128)
-						vht_oper_centr_freq_seg0_idx=114
+				case "${CONFIG["BAND"]}" in
+					# 6 GHz
+					6g)
+						case "${CONFIG["CHANNEL"]}" in
+							1|5|9|13|17|21|25|29)
+								vht_oper_centr_freq_seg0_idx=15
+								;;
+							33|37|41|45|49|53|57|61)
+								vht_oper_centr_freq_seg0_idx=47
+								;;
+							65|69|73|77|81|85|89|93)
+								vht_oper_centr_freq_seg0_idx=79
+								;;
+							97|101|105|109|113|117|121|125)
+								vht_oper_centr_freq_seg0_idx=111
+								;;
+							129|133|137|141|145|149|153|157)
+								vht_oper_centr_freq_seg0_idx=143
+								;;
+							161|165|169|173|177|181|185|189)
+								vht_oper_centr_freq_seg0_idx=175
+								;;
+							193|197|201|205|209|213|217|221)
+								vht_oper_centr_freq_seg0_idx=207
+								;;
+						esac
 						;;
-					149|153|157|161|165|169|173|177)
-						vht_oper_centr_freq_seg0_idx=163
+					# 5 GHz
+					5g)
+						case "${CONFIG["CHANNEL"]}" in
+							36|40|44|48|52|56|60|64)
+								vht_oper_centr_freq_seg0_idx=50
+								;;
+							100|104|108|112|116|120|124|128)
+								vht_oper_centr_freq_seg0_idx=114
+								;;
+							149|153|157|161|165|169|173|177)
+								vht_oper_centr_freq_seg0_idx=163
+								;;
+						esac
 						;;
 				esac
 			fi
@@ -465,6 +507,31 @@ write_config() {
 	local eht_oper_centr_freq_seg0_idx="${he_oper_centr_freq_seg0_idx}"
 
 	case "${CONFIG["MODE"]}" in
+		EHT320)
+			enable_be=1
+			eht_oper_chwidth=9
+
+			# Compute the channel segment index
+			case "${CONFIG["BAND"]}" in
+				6g)
+					case "${CONFIG["CHANNEL"]}" in
+						1|5|9|13|17|21|25|29|33|37|41|45|49|53|57|61)
+							eht_oper_centr_freq_seg0_idx=31
+							;;
+						65|69|73|77|81|85|89|93|97|101|105|109|113|117|121|125)
+							eht_oper_centr_freq_seg0_idx=95
+							;;
+						129|133|137|141|145|149|153|157|161|165|169|173|177|181|185|189)
+							eht_oper_centr_freq_seg0_idx=159
+							;;
+						193|197|201|205|209|213|217|221)
+							eht_oper_centr_freq_seg0_idx=191
+							;;
+					esac
+					;;
+			esac
+			;;
+
 		EHT*)
 			enable_be=1
 			;;
@@ -472,7 +539,7 @@ write_config() {
 
 	# Set hardware mode
 	case "${CONFIG["BAND"]}" in
-		5g)
+		6g|5g)
 			echo "hw_mode=a"
 			;;
 		2g)
@@ -480,6 +547,46 @@ write_config() {
 			;;
 	esac
 
+	# Adjust settings for 6 GHz
+	case "${CONFIG["BAND"]}" in
+		6g)
+			# Disable 802.11ac
+			enable_ac=0
+
+			# Enable 802.11w management frame protection
+			CONFIG["IEEE80211W"]="on"
+
+			# Send FILS Discovery frames every 20 TUs (~20 ms)
+			# for faster AP detection by the clients
+			echo "fils_discovery_min_interval=20"
+			echo "fils_discovery_max_interval=20"
+			;;
+	esac
+
+	local op_class=
+
+	# Configure global operating class
+	case "${CONFIG["BAND"]}" in
+		6g)
+			case "${CONFIG["MODE"]}" in
+				EHT320)
+					op_class=137
+					;;
+				HE20|EHT20)
+					op_class=131
+					;;
+				HE*|EHT*)
+					op_class="$(( 132 + vht_oper_chwidth ))"
+					;;
+			esac
+			;;
+	esac
+
+	# Set global operating class
+	if [ -n "${op_class}" ]; then
+		echo "op_class=${op_class}"
+	fi
+
 	# Enable 802.11be?
 	if [ "${enable_be}" -eq 1 ]; then
 		echo "ieee80211be=1"
-- 
2.47.3



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

* [PATCH 5/9] hostapd: Configure as indoor AP and increase transmit power
  2026-04-29 19:49 [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts Michael Tremer
                   ` (2 preceding siblings ...)
  2026-04-29 19:49 ` [PATCH 4/9] hostapd: Add support " Michael Tremer
@ 2026-04-29 19:49 ` Michael Tremer
  2026-04-29 19:49 ` [PATCH 6/9] hostapd: Disable 802.11n in 6 GHz band, too Michael Tremer
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

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

diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index c8d3ffce1..33c2a7dc1 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -550,6 +550,9 @@ write_config() {
 	# Adjust settings for 6 GHz
 	case "${CONFIG["BAND"]}" in
 		6g)
+			# Indoor AP
+			echo "he_6ghz_reg_pwr_type=0"
+
 			# Disable 802.11ac
 			enable_ac=0
 
-- 
2.47.3



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

* [PATCH 6/9] hostapd: Disable 802.11n in 6 GHz band, too
  2026-04-29 19:49 [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts Michael Tremer
                   ` (3 preceding siblings ...)
  2026-04-29 19:49 ` [PATCH 5/9] hostapd: Configure as indoor AP and increase transmit power Michael Tremer
@ 2026-04-29 19:49 ` Michael Tremer
  2026-04-29 19:49 ` [PATCH 7/9] hostapd: Tell the AP that the antennas won't change Michael Tremer
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

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

diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index 33c2a7dc1..2b1c840f1 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -553,7 +553,8 @@ write_config() {
 			# Indoor AP
 			echo "he_6ghz_reg_pwr_type=0"
 
-			# Disable 802.11ac
+			# Disable 802.11n/ac
+			enable_n=0
 			enable_ac=0
 
 			# Enable 802.11w management frame protection
-- 
2.47.3



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

* [PATCH 7/9] hostapd: Tell the AP that the antennas won't change
  2026-04-29 19:49 [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts Michael Tremer
                   ` (4 preceding siblings ...)
  2026-04-29 19:49 ` [PATCH 6/9] hostapd: Disable 802.11n in 6 GHz band, too Michael Tremer
@ 2026-04-29 19:49 ` 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
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

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

diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index 2b1c840f1..eb00e11d3 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -617,6 +617,10 @@ write_config() {
 		if [ ${#he_caps[@]} -gt 0 ]; then
 			printf "%s\n" "${he_caps[@]}"
 		fi
+
+		# The antenna patterns don't change
+		he_6ghz_rx_ant_pat=1
+		he_6ghz_tx_ant_pat=1
 	fi
 
 	# Enable 802.11ac?
-- 
2.47.3



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

* [PATCH 8/9] hostapd: Fix 40 MHz flags when manually chosing the channel
  2026-04-29 19:49 [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts Michael Tremer
                   ` (5 preceding siblings ...)
  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 ` Michael Tremer
  2026-04-29 19:49 ` [PATCH 9/9] hostapd: Bump version Michael Tremer
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

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

diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index eb00e11d3..3d6ea4f69 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -189,6 +189,9 @@ write_config() {
 	local he_caps=()
 	local eht_caps=()
 
+	# Clear [HT40+][HT40-]
+	ht_flags="$(( ht_flags & ~0x0002 ))"
+
 	# HT Capabilities
 	for flag in ${!HT_CAPS[@]}; do
 		if (( ${ht_flags} & ${flag} )); then
@@ -381,8 +384,32 @@ write_config() {
 	local enable_n=0
 
 	case "${CONFIG["MODE"]}" in
-		HT*|VHT*|HE*|EHT*)
+		HT20|VHT20|HE20|EHT20)
+			enable_n=1
+			;;
+
+		*40|*80|*160|*320)
 			enable_n=1
+
+			case "${CONFIG["BAND"]}" in
+				6g|5g)
+					case "$(( ((${CONFIG["CHANNEL"]} / 4) + channel_offset) % 2 ))" in
+						0)
+							ht_caps+=( "[HT40-]" )
+							;;
+						1)
+							ht_caps+=( "[HT40+]" )
+							;;
+					esac
+					;;
+				2g)
+					if [ "${CONFIG["CHANNEL"]}" -lt 7 ]; then
+						ht_caps+=( "[HT40+]" )
+					else
+						ht_caps+=( "[HT40-]" )
+					fi
+					;;
+			esac
 			;;
 	esac
 
-- 
2.47.3



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

* [PATCH 9/9] hostapd: Bump version
  2026-04-29 19:49 [PATCH 1/9] hostapd: Force setting reg domain before hostapd starts Michael Tremer
                   ` (6 preceding siblings ...)
  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 ` Michael Tremer
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2026-04-29 19:49 UTC (permalink / raw)
  To: development; +Cc: Michael Tremer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 lfs/hostapd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lfs/hostapd b/lfs/hostapd
index b5347df9d..74f3e1703 100644
--- a/lfs/hostapd
+++ b/lfs/hostapd
@@ -33,7 +33,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = hostapd
-PAK_VER    = 74
+PAK_VER    = 75
 
 DEPS       =
 
-- 
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