Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2023 16:38:34 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: cf245c69978e - stable/13 - LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping
Message-ID:  <202311291638.3ATGcYhb046176@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=cf245c69978ed8a9aa43340d7c3285166730889d

commit cf245c69978ed8a9aa43340d7c3285166730889d
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-09-24 11:55:11 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-11-29 16:36:09 +0000

    LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping
    
    tid_to_mac80211_ac is an exported symbol in and likely based on iwlwifi,
    which leads to a symbol clash in NetBSD.  Rename our local LinuxKPI copy
    to a better name and add a comment where to find a copy of the mapping
    table.
    
    Sponsored by:   The FreeBSD Foundation
    Reported by:    Phil Nelson (phil netbsd org)
    
    (cherry picked from commit fb3c249ed93c834d70f8361215bc40a9e9004d3b)
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 98ffcbfbef74..4a641c296ed2 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -113,7 +113,8 @@ const uint8_t rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
 /* IEEE 802.11-05/0257r1 */
 const uint8_t bridge_tunnel_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
 
-const uint8_t tid_to_mac80211_ac[] = {
+/* IEEE 802.11e Table 20i-UP-to-AC mappings. */
+static const uint8_t ieee80211e_up_to_ac[] = {
 	IEEE80211_AC_BE,
 	IEEE80211_AC_BK,
 	IEEE80211_AC_BK,
@@ -239,7 +240,7 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN],
 			IMPROVE("AP/if we support non-STA here too");
 			ltxq->txq.ac = IEEE80211_AC_VO;
 		} else {
-			ltxq->txq.ac = tid_to_mac80211_ac[tid & 7];
+			ltxq->txq.ac = ieee80211e_up_to_ac[tid & 7];
 		}
 		ltxq->seen_dequeue = false;
 		ltxq->stopped = false;
@@ -3283,7 +3284,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m)
 		ac = IEEE80211_AC_BE;
 	} else {
 		skb->priority = tid & IEEE80211_QOS_CTL_TID_MASK;
-		ac = tid_to_mac80211_ac[tid & 7];
+		ac = ieee80211e_up_to_ac[tid & 7];
 	}
 	skb_set_queue_mapping(skb, ac);
 



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