Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2022 14:01:30 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4e1153c4c3be - stable/13 - net80211 / drivers: rename to IEEE80211_FC0_SUBTYPE_QOS_DATA
Message-ID:  <202209211401.28LE1UXE000263@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bz:

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

commit 4e1153c4c3be5b4cb1644698aeff3ef627c62996
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-08-31 22:19:32 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-09-21 11:46:46 +0000

    net80211 / drivers: rename to IEEE80211_FC0_SUBTYPE_QOS_DATA
    
    Going through the Frame (Sub)types the "QOS Data" being called "QOS"
    scheme leads to a naming conflict for QOS_CFPOLL and QOS_CFACKPOLL
    (if added).   Rename QOS* to QOS_DATA* to avoid the conflict and
    to also better match the standards name.
    
    No functional changes intended.
    
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    hselasky
    Differential Revision: https://reviews.freebsd.org/D36409
    
    (cherry picked from commit c9b7e9df18e413a27bbddd776315a595255453f1)
---
 sys/compat/linuxkpi/common/include/linux/ieee80211.h |  8 ++++----
 sys/dev/ral/rt2661.c                                 |  2 +-
 sys/net80211/ieee80211.h                             | 14 +++++++-------
 sys/net80211/ieee80211_adhoc.c                       |  4 ++--
 sys/net80211/ieee80211_crypto_tkip.c                 |  2 +-
 sys/net80211/ieee80211_hostap.c                      |  4 ++--
 sys/net80211/ieee80211_output.c                      |  2 +-
 sys/net80211/ieee80211_sta.c                         |  4 ++--
 sys/net80211/ieee80211_wds.c                         |  4 ++--
 9 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
index 6698b84dc1ca..4259018a179a 100644
--- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h
+++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
@@ -171,7 +171,7 @@ enum ieee80211_min_mpdu_start_spacing {
 #define	IEEE80211_STYPE_AUTH			IEEE80211_FC0_SUBTYPE_AUTH
 #define	IEEE80211_STYPE_DEAUTH			IEEE80211_FC0_SUBTYPE_DEAUTH
 #define	IEEE80211_STYPE_ACTION			IEEE80211_FC0_SUBTYPE_ACTION
-#define	IEEE80211_STYPE_QOS_DATA		IEEE80211_FC0_SUBTYPE_QOS
+#define	IEEE80211_STYPE_QOS_DATA		IEEE80211_FC0_SUBTYPE_QOS_DATA
 
 #define	IEEE80211_NUM_ACS			4	/* net8021::WME_NUM_AC */
 
@@ -669,7 +669,7 @@ ieee80211_is_data_qos(__le16 fc)
 {
 	__le16 v;
 
-	fc &= htole16(IEEE80211_FC0_SUBTYPE_QOS | IEEE80211_FC0_TYPE_MASK |
+	fc &= htole16(IEEE80211_FC0_SUBTYPE_QOS_DATA | IEEE80211_FC0_TYPE_MASK |
 	    IEEE80211_FC0_VERSION_MASK);
 	v = htole16(IEEE80211_FC0_QOSDATA);
 
@@ -711,9 +711,9 @@ ieee80211_hdrlen(__le16 fc)
 		if ((fc & htole16(IEEE80211_FC1_DIR_MASK << 8)) ==
 		    htole16(IEEE80211_FC1_DIR_DSTODS << 8))
 			size += IEEE80211_ADDR_LEN;
-		if ((fc & htole16(IEEE80211_FC0_SUBTYPE_QOS |
+		if ((fc & htole16(IEEE80211_FC0_SUBTYPE_QOS_DATA |
 		    IEEE80211_FC0_TYPE_MASK)) ==
-		    htole16(IEEE80211_FC0_SUBTYPE_QOS |
+		    htole16(IEEE80211_FC0_SUBTYPE_QOS_DATA |
 		    IEEE80211_FC0_TYPE_DATA))
 			size += sizeof(uint16_t);
 	}
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index 4625121ae0a5..9587497e8c60 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -1443,7 +1443,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0,
 	}
 	rate &= IEEE80211_RATE_VAL;
 
-	if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS)
+	if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS_DATA)
 		noack = !! ieee80211_wme_vap_ac_is_noack(vap, ac);
 
 	if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h
index 31d55a540e6b..38f15a810d4f 100644
--- a/sys/net80211/ieee80211.h
+++ b/sys/net80211/ieee80211.h
@@ -158,10 +158,10 @@ struct ieee80211_qosframe_addr4 {
 #define	IEEE80211_FC0_SUBTYPE_CFACK		0x50
 #define	IEEE80211_FC0_SUBTYPE_CFPOLL		0x60
 #define	IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK	0x70
-#define	IEEE80211_FC0_SUBTYPE_QOS		0x80
-#define	IEEE80211_FC0_SUBTYPE_QOS_CFACK		0x90
-#define	IEEE80211_FC0_SUBTYPE_QOS_CFPOLL	0xa0
-#define	IEEE80211_FC0_SUBTYPE_QOS_CFACKPOLL	0xb0
+#define	IEEE80211_FC0_SUBTYPE_QOS_DATA		0x80
+#define	IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACK	0x90
+#define	IEEE80211_FC0_SUBTYPE_QOS_DATA_CFPOLL	0xa0
+#define	IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACKPOLL 0xb0
 #define	IEEE80211_FC0_SUBTYPE_QOS_NULL		0xc0
 
 #define	IEEE80211_IS_MGMT(wh)					\
@@ -175,7 +175,7 @@ struct ieee80211_qosframe_addr4 {
 	    == IEEE80211_FC0_TYPE_DATA))
 
 #define	IEEE80211_FC0_QOSDATA \
-	(IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS|IEEE80211_FC0_VERSION_0)
+	(IEEE80211_FC0_TYPE_DATA|IEEE80211_FC0_SUBTYPE_QOS_DATA|IEEE80211_FC0_VERSION_0)
 
 #define	IEEE80211_IS_QOSDATA(wh) \
 	((wh)->i_fc[0] == IEEE80211_FC0_QOSDATA)
@@ -244,8 +244,8 @@ struct ieee80211_qosframe_addr4 {
 /* does frame have QoS sequence control data */
 #define	IEEE80211_QOS_HAS_SEQ(wh) \
 	(((wh)->i_fc[0] & \
-	  (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_QOS)) == \
-	  (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
+	  (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_QOS_DATA)) == \
+	  (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS_DATA))
 
 /*
  * WME/802.11e information element.
diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c
index 57e46dd5ad0b..1c1197e15bb3 100644
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -341,7 +341,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m,
 		wh = mtod(m, struct ieee80211_frame *);
 		type = IEEE80211_FC0_TYPE_DATA;
 		dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
-		subtype = IEEE80211_FC0_SUBTYPE_QOS;
+		subtype = IEEE80211_FC0_SUBTYPE_QOS_DATA;
 		hdrspace = ieee80211_hdrspace(ic, wh);	/* XXX optimize? */
 		goto resubmit_ampdu;
 	}
@@ -522,7 +522,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m,
 		/*
 		 * Save QoS bits for use below--before we strip the header.
 		 */
-		if (subtype == IEEE80211_FC0_SUBTYPE_QOS)
+		if (subtype == IEEE80211_FC0_SUBTYPE_QOS_DATA)
 			qos = ieee80211_getqos(wh)[0];
 		else
 			qos = 0;
diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c
index cfd1392e2075..8e5431db9a60 100644
--- a/sys/net80211/ieee80211_crypto_tkip.c
+++ b/sys/net80211/ieee80211_crypto_tkip.c
@@ -862,7 +862,7 @@ michael_mic_hdr(const struct ieee80211_frame *wh0, uint8_t hdr[16])
 		break;
 	}
 
-	if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) {
+	if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS_DATA) {
 		const struct ieee80211_qosframe *qwh =
 			(const struct ieee80211_qosframe *) wh;
 		hdr[12] = qwh->i_qos[0] & IEEE80211_QOS_TID;
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index ec3336ed5535..00864fd23ed4 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -507,7 +507,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m,
 		wh = mtod(m, struct ieee80211_frame *);
 		type = IEEE80211_FC0_TYPE_DATA;
 		dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
-		subtype = IEEE80211_FC0_SUBTYPE_QOS;
+		subtype = IEEE80211_FC0_SUBTYPE_QOS_DATA;
 		hdrspace = ieee80211_hdrspace(ic, wh);	/* XXX optimize? */
 		goto resubmit_ampdu;
 	}
@@ -710,7 +710,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m,
 		/*
 		 * Save QoS bits for use below--before we strip the header.
 		 */
-		if (subtype == IEEE80211_FC0_SUBTYPE_QOS)
+		if (subtype == IEEE80211_FC0_SUBTYPE_QOS_DATA)
 			qos = ieee80211_getqos(wh)[0];
 		else
 			qos = 0;
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 42dab8e75a5c..4cc76e8d09da 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1809,7 +1809,7 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni,
 		else
 #endif
 			qos[1] = 0;
-		wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS;
+		wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS_DATA;
 
 		/*
 		 * If this is an A-MSDU then ensure we set the
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index 9e103f6877c4..b91350e39aee 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -600,7 +600,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m,
 		 */
 		type = IEEE80211_FC0_TYPE_DATA;
 		dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
-		subtype = IEEE80211_FC0_SUBTYPE_QOS;
+		subtype = IEEE80211_FC0_SUBTYPE_QOS_DATA;
 		hdrspace = ieee80211_hdrspace(ic, wh);	/* XXX optimize? */
 		goto resubmit_ampdu;
 	}
@@ -794,7 +794,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m,
 		/*
 		 * Save QoS bits for use below--before we strip the header.
 		 */
-		if (subtype == IEEE80211_FC0_SUBTYPE_QOS)
+		if (subtype == IEEE80211_FC0_SUBTYPE_QOS_DATA)
 			qos = ieee80211_getqos(wh)[0];
 		else
 			qos = 0;
diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c
index c48c957313c8..1693e0a32102 100644
--- a/sys/net80211/ieee80211_wds.c
+++ b/sys/net80211/ieee80211_wds.c
@@ -442,7 +442,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m,
 		wh = mtod(m, struct ieee80211_frame *);
 		type = IEEE80211_FC0_TYPE_DATA;
 		dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
-		subtype = IEEE80211_FC0_SUBTYPE_QOS;
+		subtype = IEEE80211_FC0_SUBTYPE_QOS_DATA;
 		hdrspace = ieee80211_hdrspace(ic, wh);	/* XXX optimize? */
 		goto resubmit_ampdu;
 	}
@@ -583,7 +583,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m,
 		/*
 		 * Save QoS bits for use below--before we strip the header.
 		 */
-		if (subtype == IEEE80211_FC0_SUBTYPE_QOS)
+		if (subtype == IEEE80211_FC0_SUBTYPE_QOS_DATA)
 			qos = ieee80211_getqos(wh)[0];
 		else
 			qos = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209211401.28LE1UXE000263>