From: Jouni Malinen Date: Tue, 8 Nov 2022 12:35:35 +0000 (+0200) Subject: MLO: Remove unnecessary debug prints about clearing AP RSNE/RSNXE X-Git-Tag: hostap_2_11~1541 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7febe33f6b054c46e61780b34ab69b66bdda59f;p=thirdparty%2Fhostap.git MLO: Remove unnecessary debug prints about clearing AP RSNE/RSNXE There is no help from seeing 32 lines of debug prints about clearing AP's RSNE/RSNXE information for each potential link when such information has not been set in the first place. These were printed even when there is no use of MLO whatsoever, so get rid of the prints for any case where the value has not yet been set. Signed-off-by: Jouni Malinen --- diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c index 0507c1a1d..cd6e7575b 100644 --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c @@ -4119,8 +4119,10 @@ int wpa_sm_set_mlo_params(struct wpa_sm *sm, const struct wpa_sm_mlo *mlo) len = mlo->links[i].ap_rsne_len; os_free(sm->mlo.links[i].ap_rsne); if (!ie || len == 0) { - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, - "RSN: Clearing MLO link[%u] AP RSNE", i); + if (sm->mlo.links[i].ap_rsne) + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "RSN: Clearing MLO link[%u] AP RSNE", + i); sm->mlo.links[i].ap_rsne = NULL; sm->mlo.links[i].ap_rsne_len = 0; } else { @@ -4138,8 +4140,10 @@ int wpa_sm_set_mlo_params(struct wpa_sm *sm, const struct wpa_sm_mlo *mlo) len = mlo->links[i].ap_rsnxe_len; os_free(sm->mlo.links[i].ap_rsnxe); if (!ie || len == 0) { - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, - "RSN: Clearing MLO link[%u] AP RSNXE", i); + if (sm->mlo.links[i].ap_rsnxe) + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "RSN: Clearing MLO link[%u] AP RSNXE", + i); sm->mlo.links[i].ap_rsnxe = NULL; sm->mlo.links[i].ap_rsnxe_len = 0; } else {