git: f1aeb5d850cf - main - LinuxKPI: 802.11: add a print mask for ieee80211_rx_status_flags bits
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 07 Jan 2025 14:51:24 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f1aeb5d850cf26418fb70a16d1304b92c45b5f1d commit f1aeb5d850cf26418fb70a16d1304b92c45b5f1d Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-01-07 12:16:57 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-01-07 14:51:03 +0000 LinuxKPI: 802.11: add a print mask for ieee80211_rx_status_flags bits Add a print mask for use with %b to aid debugging. It is a lot easier to read names than numbers. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/mac80211.h | 11 +++++++++++ sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index dff152caf140..3aa383554e93 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -625,6 +625,17 @@ enum ieee80211_rx_status_flags { RX_FLAG_FAILED_PLCP_CRC = BIT(31), }; +#define IEEE80211_RX_STATUS_FLAGS_BITS \ + "\20\1ALLOW_SAME_PN\2AMPDU_DETAILS\3AMPDU_EOF_BIT\4AMPDU_EOF_BIT_KNOWN" \ + "\5DECRYPTED\6DUP_VALIDATED\7FAILED_FCS_CRC\10ICV_STRIPPED" \ + "\11MACTIME_PLCP_START\12MACTIME_START\13MIC_STRIPPED" \ + "\14MMIC_ERROR\15MMIC_STRIPPED\16NO_PSDU\17PN_VALIDATED" \ + "\20RADIOTAP_HE\21RADIOTAP_HE_MU\22RADIOTAP_LSIG\23RADIOTAP_VENDOR_DATA" \ + "\24NO_SIGNAL_VAL\25IV_STRIPPED\26AMPDU_IS_LAST\27AMPDU_LAST_KNOWN" \ + "\30AMSDU_MORE\31MACTIME_END\32ONLY_MONITOR\33SKIP_MONITOR" \ + "\348023\35RADIOTAP_TLV_AT_END\36MACTIME\37MACTIME_IS_RTAP_TS64" \ + "\40FAILED_PLCP_CRC" + enum mac80211_rx_encoding { RX_ENC_LEGACY = 0, RX_ENC_HT, diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d66bc40f40f6..77e23775ba19 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5333,13 +5333,13 @@ linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, /* Implement a dump_rxcb() !!! */ if (linuxkpi_debug_80211 & D80211_TRACE_RX) - printf("TRACE-RX: %s: RXCB: %ju %ju %u, %#0x, %u, %#0x, %#0x, " + printf("TRACE-RX: %s: RXCB: %ju %ju %u, %b, %u, %#0x, %#0x, " "%u band %u, %u { %d %d %d %d }, %d, %#x %#x %#x %#x %u %u %u\n", __func__, (uintmax_t)rx_status->boottime_ns, (uintmax_t)rx_status->mactime, rx_status->device_timestamp, - rx_status->flag, + rx_status->flag, IEEE80211_RX_STATUS_FLAGS_BITS, rx_status->freq, rx_status->bw, rx_status->encoding,