Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2897711pxf; Sun, 28 Mar 2021 05:32:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7/ixTNsFBmRxm0X3DAY32fK6X3bwzJd5aCrJ4Zbd9urGOoUfO5RnaIR2uVDpHqj2SQUVJ X-Received: by 2002:a05:6402:26ce:: with SMTP id x14mr23935285edd.359.1616934749971; Sun, 28 Mar 2021 05:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616934749; cv=none; d=google.com; s=arc-20160816; b=m1wsgYWBZEH3IO3VoU1gcEa7GRtPAfDDC3+vjpeJNF7qtJyUMsV6IHgc3w+phhNaAv FAj52RrHIhGNhbs+1SHD1hX+/gVYLnuFoHez83yiQh6eAeot0Q0yeHW8p72hp8qfVD+I ZmlkdnGVhcUzRhucJfOJj57JISZb3TnIS6hyMP811UPaxSIoDqgoEYFFtyekNgfJjm73 e/VjI3Lg6F2jtmUnNaDGIkPUvB+mFj1zX16elbaxiW4i0E0RrXLRjKAuBoRYTuLb8qTs j/ivBbospnxh7bAZ3oyLZZSdeV2W6Hlu8kZbgbJc4WK0gKXNALenyD+n0gEOImiW1y6r WH1w== 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 :message-id:date:subject:to:from:dkim-signature; bh=LmOaA+qG3kp/Cd6KttDCu/vz2MQC2txR191H0I3M3KY=; b=CN2a6mPuRMheh0yAXn8YYQpXtkLyKQ7Ngx+1V7bD4ImbAajzTWCyCoTDSTIdF8+D3w 8C3MDm0qVNCaAY+HxP1U1DarGGjEl0Qf7JRI8YljUHhZVV74XOUpiTRI5G5CQKZcFT/4 4bFuuYB5Pb2a6Ejv2DonK3i1cGPfyU4gtNWJS/69oNFnrydHpztF4n4DvqnMkmpwYqEY BOoXz/VjRALfNE2+E7JmAYC6uRKQ1hLdxXYjakW4MxaYHNPlvryW9T271esPYvzHAaGe MapJhqwe1fWEphkRE2CYvNFj6qzGdxIp5HEteRRIs4pvEEawGoEJJ3InA1e86Pt4rMA2 87AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="fFOn/QNe"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si10963996ede.192.2021.03.28.05.32.02; Sun, 28 Mar 2021 05:32:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="fFOn/QNe"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230144AbhC1Mbt (ORCPT + 99 others); Sun, 28 Mar 2021 08:31:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbhC1MbQ (ORCPT ); Sun, 28 Mar 2021 08:31:16 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD3BC0613B1 for ; Sun, 28 Mar 2021 05:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LmOaA+qG3kp/Cd6KttDCu/vz2MQC2txR191H0I3M3KY=; b=fFOn/QNeu84Z868auMk7VZYabr OZhA+kg5NzOMrgARgE4lQwXhqYWnB3x907GRmzpNrS5OMVUPdhfcoeCLympcl63JXFQnxM4bd+FL/ h9UlUCyrqJNfv4XxR4bx1X1/+x3wi7c7UCUpZD+nNKkNSDnmNcOLTff3k3E+2kLZldYo=; Received: from p4ff13c8d.dip0.t-ipconnect.de ([79.241.60.141] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lQUZQ-0001Tv-Un for linux-wireless@vger.kernel.org; Sun, 28 Mar 2021 14:31:09 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 1/2] mt76: mt7615: limit firmware log message printk to buffer length Date: Sun, 28 Mar 2021 14:31:06 +0200 Message-Id: <20210328123107.74828-1-nbd@nbd.name> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Avoid including garbage from previous rx data Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 3855acbd4a5d..600c5366c099 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -424,7 +424,8 @@ mt7615_mcu_rx_log_message(struct mt7615_dev *dev, struct sk_buff *skb) break; } - wiphy_info(mt76_hw(dev)->wiphy, "%s: %s", type, data); + wiphy_info(mt76_hw(dev)->wiphy, "%s: %*s", type, + (int)(skb->len - sizeof(*rxd)), data); } static void -- 2.30.1