public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 28f9ea8606918fa54e2bd7baae36201be6170f40
@ 2025-10-08 14:36 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2025-10-08 14:36 UTC (permalink / raw)
  To: ipfire-scm

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  28f9ea8606918fa54e2bd7baae36201be6170f40 (commit)
       via  0c6f6f182d0b2ac78d869582e7e2e2f8babecab5 (commit)
      from  258c24466c5c88ceac576f9b22dd94dd0a4682e6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 28f9ea8606918fa54e2bd7baae36201be6170f40
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Oct 8 15:10:12 2025 +0100

    hostapd: Remove filters now that we have the right flags
    
    These are no longer required on my system because the script no longer
    tries to enable features that are not supported.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 0c6f6f182d0b2ac78d869582e7e2e2f8babecab5
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Oct 8 15:03:41 2025 +0100

    hostapd: Fix bitmaps for HT caps
    
    Nothing made any sense it seems.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 src/initscripts/packages/hostapd | 64 ++++++++++++++++------------------------
 1 file changed, 25 insertions(+), 39 deletions(-)

Difference in files:
diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd
index 8362883fe..44d697aeb 100644
--- a/src/initscripts/packages/hostapd
+++ b/src/initscripts/packages/hostapd
@@ -27,37 +27,24 @@ declare -A HT_CAPS=(
 	[0x0001]="[LDPC]"
 	# 40 MHz Channel Width
 	[0x0002]="[HT40+][HT40-]"
-	# SM Power Save
-	# [0x0004] - not supported by hostapd
 	# Greenfield
-	[0x0008]="[GF]"
+	[0x0010]="[GF]"
 	# Short Guard Interval (SGI) for 20 MHz
-	[0x0010]="[SHORT-GI-20]"
+	[0x0020]="[SHORT-GI-20]"
 	# Short Guard Interval (SGI) for 40 MHz
-	[0x0020]="[SHORT-GI-40]"
+	[0x0040]="[SHORT-GI-40]"
 	# TX STBC support
-	[0x0040]="[TX-STBC]"
-	# RX STBC support (1 stream)
-	[0x0080]="[RX-STBC1]"
+	[0x0080]="[TX-STBC]"
 	# HT-delayed Block Ack
-	[0x0100]="[DELAYED-BA]"
+	[0x0400]="[DELAYED-BA]"
 	# Max A-MSDU length (7935 vs. 3839 bytes)
-	[0x0200]="[MAX-AMSDU-7935]"
+	[0x0800]="[MAX-AMSDU-7935]"
 	# DSSS/CCK Mode in 40 MHz
-	[0x0400]="[DSSS_CCK-40]"
-	# PSMP support
-	# [0x0800] - not supported by hostapd
+	[0x1000]="[DSSS_CCK-40]"
 	# 40 MHz Intolerant
-	[0x1000]="[40-INTOLERANT]"
+	[0x4000]="[40-INTOLERANT]"
 	# L-SIG TXOP protection support
-	[0x2000]="[LSIG-TXOP-PROT]"
-)
-
-declare -A HT_CAPS_DRIVER_FILTERS=(
-	# ath1[012]k does not support Greenfield or Delayed Block Ack
-	[ath10k_pci]="$(( 0xffff & ~0x0008 & ~0x0100 ))"
-	[ath11k_pci]="$(( 0xffff & ~0x0008 & ~0x0100 ))"
-	[ath12k_pci]="$(( 0xffff & ~0x0008 & ~0x0100 ))"
+	[0x8000]="[LSIG-TXOP-PROT]"
 )
 
 declare -A VHT_CAPS=(
@@ -87,11 +74,6 @@ declare -A VHT_CAPS=(
 	[0x20000000]="[TX-ANTENNA-PATTERN]"
 )
 
-declare -A VHT_CAPS_DRIVER_FILTERS=(
-	# ath12k does not support Short GI for 160 MHz
-	[ath12k_pci]="$(( 0xffffffff & ~0x00000020 ))"
-)
-
 declare -A HE_MAC_CAPS=(
 	# Nothing, yet
 )
@@ -178,18 +160,6 @@ write_config() {
 		esac
 	done <<<"$(iw phy "${phy}" info)"
 
-	# Fix the HT caps because some drivers don't support everything
-	# that the actual hardware supports (or have it turned off because of bugs).
-	if [ -n "${HT_CAPS_DRIVER_FILTERS[${driver}]}" ]; then
-		ht_flags="$(( ${ht_flags} & ${HT_CAPS_DRIVER_FILTERS[${driver}]} ))"
-	fi
-
-	# Fix the VHT caps because some drivers don't support everything
-	# that the actual hardware supports (or have it turned off because of bugs).
-	if [ -n "${VHT_CAPS_DRIVER_FILTERS[${driver}]}" ]; then
-		vht_flags="$(( ${vht_flags} & ${VHT_CAPS_DRIVER_FILTERS[${driver}]} ))"
-	fi
-
 	# HT Capabilities
 	for flag in ${!HT_CAPS[@]}; do
 		if (( ${ht_flags} & ${flag} )); then
@@ -197,6 +167,22 @@ write_config() {
 		fi
 	done
 
+	# RX STBC
+	case "$(( (${ht_flags} >> 8) & 0x03 ))" in
+		0)
+			# No spacial stream support
+			;;
+		1)
+			ht_caps+=( "[RX-STBC1]" )
+			;;
+		2)
+			ht_caps+=( "[RX-STBC12]" )
+			;;
+		3)
+			ht_caps+=( "[RX-STBC123]" )
+			;;
+	esac
+
 	# VHT Capabilities
 	for flag in ${!VHT_CAPS[@]}; do
 		if (( ${vht_flags} & ${flag} )); then


hooks/post-receive
--
IPFire 2.x development tree


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-08 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-08 14:36 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 28f9ea8606918fa54e2bd7baae36201be6170f40 Michael Tremer

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