[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ccf35a6c05b91d7de847288cd20d803ac009e0d8.1617183374.git.fabioaiuto83@gmail.com>
Date: Wed, 31 Mar 2021 11:39:30 +0200
From: Fabio Aiuto <fabioaiuto83@...il.com>
To: gregkh@...uxfoundation.org
Cc: joe@...ches.com, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org, Fabio Aiuto <fabioaiuto83@...il.com>
Subject: [PATCH 02/40] staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_security.c
replace private macro RT_TRACE for tracing with in-kernel
pr_* printk wrappers
Signed-off-by: Fabio Aiuto <fabioaiuto83@...il.com>
---
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
Powered by blists - more mailing lists