LinuxKPI: 802.11: add print masks for tx status flags

Add print masks for tx status flags and use them in the TX tracing
in order to more easily debug TX problems.

As a result it was easier to determine that some dirver like the mt7921
(or mt76) do not always zero the status bits of the tx status information
(it is a union with the control bits passed on TX) and thus we get bogus
values back (rather than having flags in a different place than we thought).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb
2026-06-10 11:50:03 +00:00
parent 142cba958b
commit 0cb3b92298
2 changed files with 15 additions and 4 deletions
@@ -466,9 +466,20 @@ enum ieee80211_tx_info_flags {
IEEE80211_TX_CTL_STBC = BIT(20),
} __packed;
#define IEEE80211_TX_INFO_FLAGS \
"\010\1CTL_AMPDU\2CTL_ASSIGN_SEQ\3CTL_NO_ACK\4CTL_SEND_AFTER_DTIM" \
"\5CTL_TX_OFFCHAN\6CTL_REQ_TX_STATUS" \
"\7STATUS_EOSP\10STAT_ACK\11STAT_AMPDU\12STAT_AMPDU_NO_BACK" \
"\13STAT_TX_FILTERED\14STAT_NOACK_TRANSMITTED" \
"\15CTL_FIRST_FRAGMENT\16INTFL_DONT_ENCRYPT\17CTL_NO_CCK_RATE" \
"\20CTL_INJECTED\21CTL_HW_80211_ENCAP\22CTL_USE_MINRATE" \
"\23CTL_RATE_CTRL_PROBE\24CTL_LDPC\25CTL_STBC"
enum ieee80211_tx_status_flags {
IEEE80211_TX_STATUS_ACK_SIGNAL_VALID = BIT(0),
};
#define IEEE80211_TX_STATUS_FLAGS \
"\010\1ACK_SIGNAL_VALID"
enum ieee80211_tx_control_flags {
/* XXX TODO .. right shift numbers */
+4 -4
View File
@@ -8804,13 +8804,13 @@ linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *hw,
#ifdef LINUXKPI_DEBUG_80211
if (linuxkpi_debug_80211 & D80211_TRACE_TX)
printf("TX-STATUS: %s: hw %p skb %p status %d : flags %#x "
printf("TX-STATUS: %s: hw %p skb %p status %d : flags %b "
"band %u hw_queue %u tx_time_est %d : "
"rates [ %u %u %#x, %u %u %#x, %u %u %#x, %u %u %#x ] "
"ack_signal %u ampdu_ack_len %u ampdu_len %u antenna %u "
"tx_time %u flags %#x "
"tx_time %u flags %b "
"status_driver_data [ %p %p ]\n",
__func__, hw, skb, status, info->flags,
__func__, hw, skb, status, info->flags, IEEE80211_TX_INFO_FLAGS,
info->band, info->hw_queue, info->tx_time_est,
info->status.rates[0].idx, info->status.rates[0].count,
info->status.rates[0].flags,
@@ -8822,7 +8822,7 @@ linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *hw,
info->status.rates[3].flags,
info->status.ack_signal, info->status.ampdu_ack_len,
info->status.ampdu_len, info->status.antenna,
info->status.tx_time, info->status.flags,
info->status.tx_time, info->status.flags, IEEE80211_TX_STATUS_FLAGS,
info->status.status_driver_data[0],
info->status.status_driver_data[1]);
#endif