git: 7563a2b96f56 - stable/14 - net80211/ifconfig: swap IEEE80211_FVHT_USEVHT160 and 80P80

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Mon, 24 Feb 2025 20:27:04 UTC
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=7563a2b96f567018d63744a957a33e546aa39ed1

commit 7563a2b96f567018d63744a957a33e546aa39ed1
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-02-15 12:40:16 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-02-24 20:26:47 +0000

    net80211/ifconfig: swap IEEE80211_FVHT_USEVHT160 and 80P80
    
    ieee80211_setupcurchan() compares the flags in a greater than manner.
    In this case VHT160 should be > VHT80P80 as it is preferable.
    Swap the two flags and add a comment to note this.
    
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    adrian
    Differential Revision: https://reviews.freebsd.org/D48976
    
    (cherry picked from commit 8f2e5b6ef32304ce340b91057b1eb4b191dbeac1)
---
 sbin/ifconfig/ifieee80211.c  | 4 ++--
 sys/net80211/ieee80211_var.h | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index d4dcfdf63254..9f66281931c0 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -133,8 +133,8 @@
 #define	IEEE80211_FVHT_VHT	0x000000001	/* CONF: VHT supported */
 #define	IEEE80211_FVHT_USEVHT40	0x000000002	/* CONF: Use VHT40 */
 #define	IEEE80211_FVHT_USEVHT80	0x000000004	/* CONF: Use VHT80 */
-#define	IEEE80211_FVHT_USEVHT160 0x000000008	/* CONF: Use VHT160 */
-#define	IEEE80211_FVHT_USEVHT80P80 0x000000010	/* CONF: Use VHT 80+80 */
+#define	IEEE80211_FVHT_USEVHT80P80 0x000000008	/* CONF: Use VHT 80+80 */
+#define	IEEE80211_FVHT_USEVHT160 0x000000010	/* CONF: Use VHT160 */
 #define	IEEE80211_FVHT_STBC_TX  0x00000020	/* CONF: STBC tx enabled */
 #define	IEEE80211_FVHT_STBC_RX  0x00000040	/* CONF: STBC rx enabled */
 #endif
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 4c5dbcb7cfc0..afd3beeb5d73 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -728,11 +728,15 @@ MALLOC_DECLARE(M_80211_VAP);
 
 #define	IEEE80211_FVEN_BITS	"\20"
 
+/*
+ * These flags are compared in ieee80211_setupcurchan().
+ * Thus 160 should be > 80P80.
+ */
 #define	IEEE80211_FVHT_VHT	0x000000001	/* CONF: VHT supported */
 #define	IEEE80211_FVHT_USEVHT40	0x000000002	/* CONF: Use VHT40 */
 #define	IEEE80211_FVHT_USEVHT80	0x000000004	/* CONF: Use VHT80 */
-#define	IEEE80211_FVHT_USEVHT160	0x000000008	/* CONF: Use VHT160 */
-#define	IEEE80211_FVHT_USEVHT80P80	0x000000010	/* CONF: Use VHT 80+80 */
+#define	IEEE80211_FVHT_USEVHT80P80	0x000000008	/* CONF: Use VHT 80+80 */
+#define	IEEE80211_FVHT_USEVHT160	0x000000010	/* CONF: Use VHT160 */
 #define	IEEE80211_FVHT_STBC_TX	0x00000020	/* CONF: STBC tx enabled */
 #define	IEEE80211_FVHT_STBC_RX	0x00000040	/* CONF: STBC rx enabled */