git: 470aaf42c3c0 - main - LinuxKPI: 802.11: make struct ieee80211_tx_info a bit more packed
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 16 Feb 2025 22:40:43 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=470aaf42c3c0661821a8744ae7c29b096adb4aa3
commit 470aaf42c3c0661821a8744ae7c29b096adb4aa3
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-01-26 19:37:54 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-02-16 22:24:53 +0000
LinuxKPI: 802.11: make struct ieee80211_tx_info a bit more packed
Given I was looking at the struct make it more packed at the beginning
at least. In fact it did not shrink but the tx_time_est got expanded.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/compat/linuxkpi/common/include/linux/ieee80211.h | 2 +-
sys/compat/linuxkpi/common/include/linux/nl80211.h | 2 +-
sys/compat/linuxkpi/common/include/net/mac80211.h | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
index 20527a8174f5..ca1493e666c6 100644
--- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h
+++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
@@ -413,7 +413,7 @@ enum ieee80211_tx_info_flags {
IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(18),
IEEE80211_TX_CTL_LDPC = BIT(19),
IEEE80211_TX_CTL_STBC = BIT(20),
-};
+} __packed;
enum ieee80211_tx_status_flags {
IEEE80211_TX_STATUS_ACK_SIGNAL_VALID = BIT(0),
diff --git a/sys/compat/linuxkpi/common/include/linux/nl80211.h b/sys/compat/linuxkpi/common/include/linux/nl80211.h
index 254ed6e13f5c..1babd23d65fe 100644
--- a/sys/compat/linuxkpi/common/include/linux/nl80211.h
+++ b/sys/compat/linuxkpi/common/include/linux/nl80211.h
@@ -133,7 +133,7 @@ enum nl80211_band {
/* Keep this last. */
NUM_NL80211_BANDS
-};
+} __packed;
enum nl80211_chan_flags {
/* XXX TODO */
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index 43df740b0bd0..f1b1ec97cbbc 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -879,11 +879,11 @@ struct ieee80211_prep_tx_info {
/* XXX-BZ too big, over-reduce size to u8, and array sizes to minuimum to fit in skb->cb. */
/* Also warning: some sizes change by pointer size! This is 64bit only. */
struct ieee80211_tx_info {
- enum ieee80211_tx_info_flags flags;
+ enum ieee80211_tx_info_flags flags; /* 32 bits */
/* TODO FIXME */
- u8 band;
- u8 hw_queue;
- bool tx_time_est;
+ enum nl80211_band band; /* 3 bits */
+ uint16_t hw_queue:4, /* 4 bits */
+ tx_time_est:10; /* 10 bits */
union {
struct {
struct ieee80211_tx_rate rates[4];