]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MLO: Remove unnecessary debug prints about clearing AP RSNE/RSNXE
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 8 Nov 2022 12:35:35 +0000 (14:35 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 8 Nov 2022 12:35:35 +0000 (14:35 +0200)
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 <quic_jouni@quicinc.com>
src/rsn_supp/wpa.c

index 0507c1a1deb54389e0a3cf0cf4682d4f2bd95931..cd6e7575b8ba519f385be39c5d360b4ecabf62e5 100644 (file)
@@ -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 {