From: Jouni Malinen Date: Sun, 15 Mar 2020 15:06:35 +0000 (+0200) Subject: nl80211: Add more TX status details in debug log in AP mode X-Git-Tag: hostap_2_10~1622 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81fa7730d3ee1eb89c404f16a7e7b571284a2b10;p=thirdparty%2Fhostap.git nl80211: Add more TX status details in debug log in AP mode The actual TX status (whether ACK frame was received) was not included in the debug log in AP mode. Add that for all cases. In addition, add some more details in the debug log to make the log more helpful in debugging issues related to frame delivery. Signed-off-by: Jouni Malinen --- diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index f4b0580f4..b634a2d12 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -685,20 +685,26 @@ static void mlme_event_mgmt_tx_status(struct wpa_driver_nl80211_data *drv, union wpa_event_data event; const struct ieee80211_hdr *hdr = (const struct ieee80211_hdr *) frame; u16 fc = le_to_host16(hdr->frame_control); + u64 cookie_val = 0; - wpa_printf(MSG_DEBUG, "nl80211: Frame TX status event"); + if (cookie) + cookie_val = nla_get_u64(cookie); + wpa_printf(MSG_DEBUG, + "nl80211: Frame TX status event A1=" MACSTR + " %sstype=%d cookie=0x%llx%s ack=%d", + MAC2STR(hdr->addr1), + WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ? "not-mgmt " : "", + WLAN_FC_GET_STYPE(fc), (long long unsigned int) cookie_val, + cookie ? "" : "(N/A)", ack != NULL); if (WLAN_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT) return; if (!is_ap_interface(drv->nlmode) && WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION) { - u64 cookie_val; - if (!cookie) return; - cookie_val = nla_get_u64(cookie); wpa_printf(MSG_DEBUG, "nl80211: Frame TX status: cookie=0x%llx%s (ack=%d)", (long long unsigned int) cookie_val,