Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp507596imw; Wed, 13 Jul 2022 02:47:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTZeoCj6p2sa6bMe00R48q9auLUZSP0XO2OmtXUiQgLnHuea3PZWR8f6ipaxOgKuILLNg3 X-Received: by 2002:a17:902:c7cb:b0:16b:dc5d:8959 with SMTP id r11-20020a170902c7cb00b0016bdc5d8959mr2661609pla.87.1657705640895; Wed, 13 Jul 2022 02:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705640; cv=none; d=google.com; s=arc-20160816; b=No8UahTFUw1VVF/SGESv2Y+FUteujsetsttwHSY+XTWTimpTmsBuinpCcvB8juCAvN LvAEWvhA/GhVjUH5lYL/9QoHj7fPqTdxi1UsvWFBrEmWxLIGCB4CuPFs1ldq7yaNIdHR O/YDvT0RMHZtuKdjjGDQmg5C9G3O11WixQukA2d+yRRKxfz4a+1FpP7y7MzcQ+ghHANN RCelxxbEqIdoyN96uZERJOuJwz3wQmSD+tZCoc17+k0eRpLsmm4TPYLsELU/S7k4haGy x+vhb+RpRafYLbh9zeG/u1+/vFPa2fMXR792/2hlJJ75rlTy23ZC23UjNbZzt3FjEBpn 0bmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0QXAjhtNKCNLBGSjrnu/gHm8SdohvgsRG4xI36+PkdY=; b=bs8/z9ObCHsbnbuyI6x1BXZJoJgePMWIMHsJKNyAP6LZfHJs5xoNP8E3ysJYScs1Xy QbZxiB1Ub7poGqnC2pKj8WWEoUcc7ww9N8rGEvvOl6AFKc+OmSbTtzx0y8o7JNBNBjEh HIV/stHQWk57ZCan0Jn/oHkrgx9zpvKue+lNNtPxgi4GOd+cJtLjCeyNoHWcKatOuZWj 9JGSbJDX0txSVGqlzvHscXIkzik3wBAr535nadtbmSvpa85QMJU6OGeMPyzAhZ9afz6J uvDLqXYaZHRL5tjOboVoEnKCeRkyfU/OWoZ7B+sBO3Way71l6i9UtKjJYhXJYHbrbRk0 saHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=U0fggS+q; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w18-20020a1709027b9200b0016c2d91db1esi14202275pll.77.2022.07.13.02.47.13; Wed, 13 Jul 2022 02:47:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=U0fggS+q; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236237AbiGMJpe (ORCPT + 65 others); Wed, 13 Jul 2022 05:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235251AbiGMJpN (ORCPT ); Wed, 13 Jul 2022 05:45:13 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109A4C04F4 for ; Wed, 13 Jul 2022 02:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=0QXAjhtNKCNLBGSjrnu/gHm8SdohvgsRG4xI36+PkdY=; t=1657705512; x=1658915112; b=U0fggS+qGDMvXtrCjaZ9RK8/VULB7SMoEs8zetX4iukTsxZ W8tVJpn8W2nkmOMI3kKAftlJ7i+kIcmQfsxFT5BIwQt6jhBDDP/pZsUXpb1yYZ83hydTxEKrEuwo+ ZdtHzoAIVcbdzixp5i2Z1EnVceXKB2/hDKzegxdeddTH8xddyVPGgc+d7U6ZbOo8sducOUmQzyN+E VIeddQRF38ArYbJjhdqKuz/VJJIm6EYmH0+IoiPTSS70H4VgEGILWEVPCbqzyy6hYoRv3/jqUaO9f kZuZ4rrqXq+jI0bQxcvwzm7GtLLt/8I6amoFw/DAOR1b0VsplB5toGcebM5SkWyg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYve-00EgvB-8h; Wed, 13 Jul 2022 11:45:10 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 19/76] wifi: mac80211: debug: omit link if non-MLO connection Date: Wed, 13 Jul 2022 11:44:05 +0200 Message-Id: <20220713114425.b7500d0c97ea.Ie2d8ee2b81cdc3929768633b0e23b9de63fc43cb@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg If we don't really have multiple links, omit the link ID from link debug prints, otherwise we change the format for all of the existing drivers (most of which might never support MLO), and also have extra noise in the logs. Signed-off-by: Johannes Berg --- net/mac80211/debug.h | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/net/mac80211/debug.h b/net/mac80211/debug.h index 3302e8da0314..b4c20f5e778e 100644 --- a/net/mac80211/debug.h +++ b/net/mac80211/debug.h @@ -135,14 +135,33 @@ do { \ _sdata_dbg(1, sdata, fmt, ##__VA_ARGS__) #define link_info(link, fmt, ...) \ - _sdata_info((link)->sdata, "[link %d] " fmt, (link)->link_id, \ - ##__VA_ARGS__) + do { \ + if ((link)->sdata->vif.valid_links) \ + _sdata_info((link)->sdata, "[link %d] " fmt, \ + (link)->link_id, \ + ##__VA_ARGS__); \ + else \ + _sdata_info((link)->sdata, fmt, ##__VA_ARGS__); \ + } while (0) #define link_err(link, fmt, ...) \ - _sdata_err((link)->sdata, "[link %d] " fmt, (link)->link_id, \ - ##__VA_ARGS__) + do { \ + if ((link)->sdata->vif.valid_links) \ + _sdata_err((link)->sdata, "[link %d] " fmt, \ + (link)->link_id, \ + ##__VA_ARGS__); \ + else \ + _sdata_err((link)->sdata, fmt, ##__VA_ARGS__); \ + } while (0) #define link_dbg(link, fmt, ...) \ - _sdata_dbg(1, (link)->sdata, "[link %d] " fmt, (link)->link_id, \ - ##__VA_ARGS__) + do { \ + if ((link)->sdata->vif.valid_links) \ + _sdata_dbg(1, (link)->sdata, "[link %d] " fmt, \ + (link)->link_id, \ + ##__VA_ARGS__); \ + else \ + _sdata_dbg(1, (link)->sdata, fmt, \ + ##__VA_ARGS__); \ + } while (0) #define ht_dbg(sdata, fmt, ...) \ _sdata_dbg(MAC80211_HT_DEBUG, \ -- 2.36.1