From f6dcd326fea79d379c9398a08d03a4f8cb5567b1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 31 Aug 2023 12:33:45 +0300 Subject: [PATCH] wlantest: Indicate ToDS/FromDS values for BSS DATA entries This makes it a bit more convenient to debug decryption issues. Signed-off-by: Jouni Malinen --- wlantest/rx_data.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c index a3dca3e16..f1d46495e 100644 --- a/wlantest/rx_data.c +++ b/wlantest/rx_data.c @@ -791,18 +791,22 @@ static void rx_data_bss(struct wlantest *wt, const struct ieee80211_hdr *hdr, if (qos) { u8 ack = (qos[0] & 0x60) >> 5; wpa_printf(MSG_MSGDUMP, "BSS DATA: " MACSTR " -> " MACSTR - " len=%u%s tid=%u%s%s", + " len=%u%s tid=%u%s%s%s%s", MAC2STR(src), MAC2STR(dst), (unsigned int) len, prot ? " Prot" : "", qos[0] & 0x0f, + (fc & WLAN_FC_TODS) ? " ToDS" : "", + (fc & WLAN_FC_FROMDS) ? " FromDS" : "", (qos[0] & 0x10) ? " EOSP" : "", ack == 0 ? "" : (ack == 1 ? " NoAck" : (ack == 2 ? " NoExpAck" : " BA"))); } else { wpa_printf(MSG_MSGDUMP, "BSS DATA: " MACSTR " -> " MACSTR - " len=%u%s", + " len=%u%s%s%s", MAC2STR(src), MAC2STR(dst), (unsigned int) len, - prot ? " Prot" : ""); + prot ? " Prot" : "", + (fc & WLAN_FC_TODS) ? " ToDS" : "", + (fc & WLAN_FC_FROMDS) ? " FromDS" : ""); } if (prot)