Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp259273pxf; Wed, 31 Mar 2021 02:41:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2y4d/vJ6jWtcEaQgJzWJROJYQSgaCfRQUZjhIrysCVu9UHAjVFT+RmNNcahxlT+IphctU X-Received: by 2002:a17:906:2c44:: with SMTP id f4mr2469580ejh.508.1617183710832; Wed, 31 Mar 2021 02:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617183710; cv=none; d=google.com; s=arc-20160816; b=a8obNIr6r46U/0adqc3TXLfqa0A+1M6EeYnDTpkEGEpSsogVtuMRgQPbdqKCrWXOzY S4oRQzFdvN2a8xdeTiMXHVeP5t3nOicM627feXauLrnvgvBVJEmbWjMg7vG2XcPkm0UY t+k2dsQMFjU8GS58729HvbGj/SialgyPrOqyHcPWajO8Uu3MKPu+EhHTOr2D0VmKRCD8 EBnhNTci3n+ZFiE917K1fUB3+WOWQviFGRRfcGg+FCugXkmmwdgR9XegrXrrEwjH+NYh Jq6golPykGZWhHiNVt1ubsBRHO9L+8dw5YTcypo+Z3Fv+dVHG5e5iwxzd392tEiS/BX6 xJpw== 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=EOd2VJooCVoEiBmjBW7G58vH0HOhKflugc8+m2NKCTM=; b=RSn2sUmP35tSUFqeqPI7AnHmUsWhgVXBIii2D6GKh4DpQsSRSEEkgrEA9d0DwIdcOa xNAkA/w9KQmbubcaPMM1mGrz9+fBNM/y1I2roQpqeHrdptWxv6tnQkcgiMnVrhPulUoT 7FxADfBHVrbGcUZMVbAQ632LLhFgvVxa5jgrd3gTfEvOsjSzA2Q/A6Z5HIbj0FNF16w9 7Yp70m9procmpxkp5vXPRpDiPTDkyT4drjlAR/TdkbNxI7CWxeXWJdB+pmnCOWy7bSSm t6qIFa0qwHdYpJ3z6hwTpNLsZPzTWkjpVJTYBtTOdcavfFG1g93FoqA3DilFO/cBn8CO iwjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vaDGrBBU; 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 b9si1201380ejg.509.2021.03.31.02.41.27; Wed, 31 Mar 2021 02:41:50 -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=vaDGrBBU; 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 S234802AbhCaJk1 (ORCPT + 99 others); Wed, 31 Mar 2021 05:40:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234723AbhCaJkR (ORCPT ); Wed, 31 Mar 2021 05:40:17 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A2DDC061574 for ; Wed, 31 Mar 2021 02:40:17 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id u5so29090206ejn.8 for ; Wed, 31 Mar 2021 02:40:17 -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=EOd2VJooCVoEiBmjBW7G58vH0HOhKflugc8+m2NKCTM=; b=vaDGrBBU8lahs5xbCyKMHnaqeesduOiyCB/BJr1px9I/1D/ChRR044R6dE56RC012C 9njw54rJMqWskE6oaimcnM2ihMEPZpQ7pzQihKVA9PHGcQnZX+5UpFTzZhI49dvZkfon ZhJbyi3Y/6IsB/gql8vJPIzi3c/VfKGGBOveLpRVIZVOeBhtTOqETeJ7tecCz7uZpfcW WWqgfL99/zmqa3u1vWJZClP5x65lcGUB9d2i/UdLGSp6I3fkkDXedmr4aiMkJq2tIWZl 6rbKKLEWZ6fyQhkBinXMF3yX2k2jDsye71mP/WXSu2y5uyW7xXhqVuk4vRpJMUUqfN3Z sV7Q== 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=EOd2VJooCVoEiBmjBW7G58vH0HOhKflugc8+m2NKCTM=; b=t1thvfjqJPfZpY4XhDee3RsdMuQ+u8xuK7cAhM6xz2vzlnEWUcjgW8yqpI8wLLGLwv dLG2yXd6w+I+2/5p08wgZ1DkUiZAXSFK67KNsrdLU9xZFYmuE+25oWLHntMJX19zLf/9 MNVkXaY9LmvyLaCHKY3K7vJVMZFspkLvYqjRuMgGcKn+jX+l+PjEoTQ4eLNj7gn72P36 lIcoBLQrK3rIA2pvrhgNkL+8CWQzI+DN9iacNLGgQSMieGykrTV2k6G4zYF6yKs4rBgd Kbw4w1JttnM1QvKSQgTZ8oLbSVXChsKwWIEWZVJWXi7oM/AnoK5+OBNsLfUIVNMgk8p+ E5vQ== X-Gm-Message-State: AOAM532rRgWmYdxZZVb7VIpohSUr9DJHcSnYz6M4hITfRu7eao60OapX 4K/tDExnZqiSSAJh/gOIdsjyd75aUqI75Q== X-Received: by 2002:a17:906:1352:: with SMTP id x18mr2463421ejb.545.1617183616296; Wed, 31 Mar 2021 02:40:16 -0700 (PDT) Received: from agape ([5.171.73.44]) by smtp.gmail.com with ESMTPSA id mc10sm828852ejb.56.2021.03.31.02.40.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 02:40:16 -0700 (PDT) From: Fabio Aiuto To: gregkh@linuxfoundation.org Cc: joe@perches.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Fabio Aiuto Subject: [PATCH 02/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_security.c Date: Wed, 31 Mar 2021 11:39:30 +0200 Message-Id: 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 replace private macro RT_TRACE for tracing with in-kernel pr_* printk wrappers Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_security.c | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index 8a447e149438..5bdde7b8de01 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -237,14 +237,13 @@ void rtw_wep_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_, - ("%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", + pr_err("%s %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", + DRIVER_PREFIX, __func__, crc[3], payload[length - 1], crc[2], payload[length - 2], crc[1], payload[length - 3], - crc[0], payload[length - 4])); + crc[0], payload[length - 4]); } } } @@ -609,7 +608,7 @@ 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__)); + pr_err("%s %s: stainfo!= NULL!!!\n", DRIVER_PREFIX, __func__); if (IS_MCAST(pattrib->ra)) prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; @@ -631,7 +630,8 @@ 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)); + pr_info("%s %s: pattrib->iv_len =%x, pattrib->icv_len =%x\n", + DRIVER_PREFIX, __func__, pattrib->iv_len, pattrib->icv_len); *((__le32 *)crc) = getcrc32(payload, length);/* modified by Amy*/ arcfour_init(&mycontext, rc4key, 16); @@ -740,17 +740,16 @@ 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", + pr_err("%s %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", + DRIVER_PREFIX, __func__, crc[3], payload[length - 1], crc[2], payload[length - 2], crc[1], payload[length - 3], - crc[0], payload[length - 4])); + crc[0], payload[length - 4]); res = _FAIL; } } else { - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__)); + pr_err("%s %s: stainfo == NULL!!!\n", DRIVER_PREFIX, __func__); res = _FAIL; } } @@ -1380,7 +1379,7 @@ 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__)); + pr_err("%s %s: stainfo!= NULL!!!\n", DRIVER_PREFIX, __func__); if (IS_MCAST(pattrib->ra)) prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; @@ -1611,13 +1610,12 @@ 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", + pr_err("%s %s:mic check error mic[%d]: pframe(%x) != message(%x)\n", + DRIVER_PREFIX, __func__, i, pframe[hdrlen + 8 + plen - 8 + i], - message[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,9 +1647,7 @@ 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__)); + pr_err("%s %s: stainfo!= NULL!!!\n", DRIVER_PREFIX, __func__); if (IS_MCAST(prxattrib->ra)) { static unsigned long start; @@ -1706,9 +1702,7 @@ 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__)); + pr_err("%s %s: stainfo == NULL!!!\n", DRIVER_PREFIX, __func__); res = _FAIL; } } -- 2.20.1