Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1845508pxf; Sat, 3 Apr 2021 02:15:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcQuwVmVb6vdR/ylRTG8ZoaxPRv+7gtokm6m98hR+vdXAWLAhIcT434QI0Z1rL6QZDHivp X-Received: by 2002:a17:906:eb46:: with SMTP id mc6mr6137397ejb.303.1617441322170; Sat, 03 Apr 2021 02:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617441322; cv=none; d=google.com; s=arc-20160816; b=lgZ/Vmvbab0aioKVYD9LMfMOGD0lQral9Oo72CXJEO1h0TZcrxQonUPjOvdFVt4rJQ xpEsEvBFaa1CtyJReTFoL3tRL1Y9XVSbeNndTxbcDTk6gA7w/AvcRuvci2cjTDq3EupK wNT7dT8twIWft0gRD6stCdYpUxpv521N3UpcjBER9jOVhT6okxJgelq6/QKiFennWgT+ ISykLQJJvCJIgd8pMUaJywX/uuFXvbyvqfnIu3VPjZomWJ8okAS1oWkIXxGfn6gIHOCh sQZA/9Tl84LAoLWxSrlYWEziFZpunYEoVwMccFL6SHwFMMmH7158ro1ofChaecHsFAcj NXNA== 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=SnlRqa1pV52c6wUAyz/EYgtXOO506MKaz/mlftdWmZc=; b=RS5iL7fxf3JNs1n002Bl02pRzldqm7RXc/+VUjaf8OenEE97HjmcSHqVhVJaBdGV6/ xkVodnbFflPWkrRTAHC8p130xuKhMwMzr3jmTwe+nomFxLZl9koWPDqpv8Z0gim7Oqzj Gun42eIXl1Zmv/GmVJHyP6UUgD1kDR6YpGilmYJEfjpdaBU0F+J1aPSayJdktwXtgtfd R9cTuNL25XuH4r89iYHqKVcEU9tpi4vhgOzu6R9kO6VvgaD9FBMB0kYJFJLy7XF7y+L+ lZeOzWUWyYIlY+PiFUAj52RlSaU/DpVgHjLsivcFeUGm445b6X+EkrUBLa2HhfgjRn+y 7ajg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aBUQ6iRA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si2591688ejd.53.2021.04.03.02.14.59; Sat, 03 Apr 2021 02:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aBUQ6iRA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236426AbhDCJOZ (ORCPT + 99 others); Sat, 3 Apr 2021 05:14:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236133AbhDCJOW (ORCPT ); Sat, 3 Apr 2021 05:14:22 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6708BC0613E6 for ; Sat, 3 Apr 2021 02:14:20 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id e18so6533090wrt.6 for ; Sat, 03 Apr 2021 02:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SnlRqa1pV52c6wUAyz/EYgtXOO506MKaz/mlftdWmZc=; b=aBUQ6iRAOKzzmWHzIZ9cMJ4G00yoij6U+v6tpxsrc/AMweZh6DZq/wo47LZercCUL1 WO9RT0lmgtvqCSj21hGY4pQXtQjcfQO/KKd0qn467lktQAp0HGPYRaKftKVO04VXtxAq BympThFD+nUHHAcrIPmbofFayA9WPsQQNn6Ak378k3ylfi/0RZ+QtNDSPQX/+638f363 wBl060nyRlcH2CGfNuHaXmOEfqjAtAJww626fnFIyOZJbo/WGQZZkZ6BlHphOhKGvjWB lFX2/CRtz1dgiVKg8VN2kE2zsT1KpqZObqoeFYo9shSdko7rzQ0/fPW2j6ZvlbFIZqpL O++A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SnlRqa1pV52c6wUAyz/EYgtXOO506MKaz/mlftdWmZc=; b=Qr8iWyli6GdG/r217oAn/ucBsKsEB1T+VTq7Y8WWPHWTY1vPe6BjK7K9YFiIRNTe0r RKGpT5C84MMWqYo6qHdg5IJzUO+m+F6Q2dzgt+8IG4gZTBfzwOr3gunRlLknPL2Oy7da CHbifaP6OZNPRTULnHEui7x6Z9TvhbP42u0q4oqzQ+BKfH0lsmCz5Bd6p/1+9Pr8ZmvD Ue2b/Hx9Oa77qD//fVofKH2fg++G6uURlZ02hvAjd5rozFT0937hiOg4SA5KehA52Mg8 Yim8woF5vdFr2kvrXdqwnHZ5QqX5CTOT4tayBErtCR+Jj5CDZWbGQbNmeSfg6E5w+cPx l5/w== X-Gm-Message-State: AOAM530cqzw/bqgLzRsoIk+zG+XWD7eM6eQGVu43aaajKfX3KLUU1MxR eBK+BHBgR3qKYdl4ocJVjOw= X-Received: by 2002:a5d:50c7:: with SMTP id f7mr19786986wrt.18.1617441259096; Sat, 03 Apr 2021 02:14:19 -0700 (PDT) Received: from agape ([5.171.72.64]) by smtp.gmail.com with ESMTPSA id l1sm18778174wrv.87.2021.04.03.02.14.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 02:14:18 -0700 (PDT) From: Fabio Aiuto To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, joe@perches.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Fabio Aiuto Subject: [PATCH v3 03/30] staging: rtl8723bs: remove RT_TRACE logs in core/rtw_security.c Date: Sat, 3 Apr 2021 11:13:25 +0200 Message-Id: <14207c2b7ea789e8b0f3bd37d2758e979eff997c.1617440834.git.fabioaiuto83@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove all of the RT_TRACE logs in the core/rtw_security.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_security.c | 40 +------------------ 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index 8a447e149438..689419a76d94 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -236,16 +236,6 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe) /* calculate icv and compare the icv */ *((u32 *)crc) = le32_to_cpu(getcrc32(payload, length-4)); - if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) { - RT_TRACE(_module_rtl871x_security_c_, - _drv_err_, - ("%s:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n", - __func__, - crc[3], payload[length - 1], - crc[2], payload[length - 2], - crc[1], payload[length - 3], - crc[0], payload[length - 4])); - } } } @@ -609,8 +599,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) if (pattrib->encrypt == _TKIP_) { { - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__)); - if (IS_MCAST(pattrib->ra)) prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; else @@ -631,7 +619,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) if ((curfragnum+1) == pattrib->nr_frags) { /* 4 the last fragment */ length = pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len; - RT_TRACE(_module_rtl871x_security_c_, _drv_info_, ("pattrib->iv_len =%x, pattrib->icv_len =%x\n", pattrib->iv_len, pattrib->icv_len)); *((__le32 *)crc) = getcrc32(payload, length);/* modified by Amy*/ arcfour_init(&mycontext, rc4key, 16); @@ -739,18 +726,9 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) *((u32 *)crc) = le32_to_cpu(getcrc32(payload, length-4)); - if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) { - RT_TRACE(_module_rtl871x_security_c_, - _drv_err_, - ("rtw_wep_decrypt:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n", - crc[3], payload[length - 1], - crc[2], payload[length - 2], - crc[1], payload[length - 3], - crc[0], payload[length - 4])); + if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) res = _FAIL; - } } else { - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__)); res = _FAIL; } } @@ -1380,8 +1358,6 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) /* 4 start to encrypt each fragment */ if (pattrib->encrypt == _AES_) { - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__)); - if (IS_MCAST(pattrib->ra)) prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; else @@ -1611,13 +1587,6 @@ static signed int aes_decipher(u8 *key, uint hdrlen, /* compare the mic */ for (i = 0; i < 8; i++) { if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) { - RT_TRACE(_module_rtl871x_security_c_, - _drv_err_, - ("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n", - __func__, - i, - pframe[hdrlen + 8 + plen - 8 + i], - message[hdrlen + 8 + plen - 8 + i])); DBG_871X("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n", __func__, i, @@ -1649,10 +1618,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) if (prxattrib->encrypt == _AES_) { stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]); if (stainfo) { - RT_TRACE(_module_rtl871x_security_c_, - _drv_err_, - ("%s: stainfo!= NULL!!!\n", __func__)); - if (IS_MCAST(prxattrib->ra)) { static unsigned long start; static u32 no_gkey_bc_cnt; @@ -1706,9 +1671,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) res = aes_decipher(prwskey, prxattrib->hdrlen, pframe, length); } else { - RT_TRACE(_module_rtl871x_security_c_, - _drv_err_, - ("%s: stainfo == NULL!!!\n", __func__)); res = _FAIL; } } -- 2.20.1