git: b70179a93208 - stable/14 - LinuxKPI: 802.11: correct HT protection fields

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sun, 18 Feb 2024 21:11:30 UTC
The branch stable/14 has been updated by bz:

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

commit b70179a93208653f1228d34dc65942f187f8d9df
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-01-29 22:35:08 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-02-18 18:31:16 +0000

    LinuxKPI: 802.11: correct HT protection fields
    
    It seems during the initial buildup of the file, the defines were
    either mixed or not flagged as "FIXME".
    Define the values through to the net80211 definitions and also
    annotate them by at least some standards reference.
    
    Fixes:          6b4cac814e32f
    Reviewed by:    cc
    Differential Revision: https://reviews.freebsd.org/D43658
    
    (cherry picked from commit 53eb2c63c9628f7f19d88d759e1932c10c9f08af)
---
 sys/compat/linuxkpi/common/include/linux/ieee80211.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
index 09487a318811..2000e7480ff8 100644
--- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h
+++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
@@ -197,11 +197,12 @@ enum ieee80211_min_mpdu_start_spacing {
 #define	IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK	8 /* TODO FIXME ax? */
 #define	IEEE80211_HE_PPE_THRES_INFO_HEADER_SIZE		16	/* TODO FIXME ax? */
 
-#define	IEEE80211_HT_OP_MODE_PROTECTION			0x03	/* MASK */
-#define	IEEE80211_HT_OP_MODE_PROTECTION_NONE		0x00
-#define	IEEE80211_HT_OP_MODE_PROTECTION_20MHZ		0x01
-#define	IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED	0x02
-#define	IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER	0x03
+/* 802.11-2012, Table 8-130-HT Operation element fields and subfields, HT Protection */
+#define	IEEE80211_HT_OP_MODE_PROTECTION			IEEE80211_HTINFO_OPMODE		/* Mask. */
+#define	IEEE80211_HT_OP_MODE_PROTECTION_NONE		IEEE80211_HTINFO_OPMODE_PURE	/* No protection */
+#define	IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER	IEEE80211_HTINFO_OPMODE_PROTOPT	/* Nonmember protection */
+#define	IEEE80211_HT_OP_MODE_PROTECTION_20MHZ		IEEE80211_HTINFO_OPMODE_HT20PR	/* 20 MHz protection */
+#define	IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED	IEEE80211_HTINFO_OPMODE_MIXED	/* Non-HT mixed */
 
 
 /* 9.6.13.1, Table 9-342 TDLS Action field values. */