linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Potter <phil@philpotter.co.uk>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, martin@kaiser.cx
Subject: [PATCH 10/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_security.c
Date: Sun,  1 Aug 2021 20:04:32 +0100	[thread overview]
Message-ID: <20210801190437.82017-11-phil@philpotter.co.uk> (raw)
In-Reply-To: <20210801190437.82017-1-phil@philpotter.co.uk>

Remove RT_TRACE macro calls from core/rtw_security.c, so that ultimately the
macro definition itself can eventually be removed.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/core/rtw_security.c | 37 +--------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
index 2c1b9a6dcdf2..1305031c0908 100644
--- a/drivers/staging/r8188eu/core/rtw_security.c
+++ b/drivers/staging/r8188eu/core/rtw_security.c
@@ -170,15 +170,6 @@ void rtw_wep_decrypt(struct adapter  *padapter, u8 *precvframe)
 
 		/* calculate icv and compare the icv */
 		crc.f0 = cpu_to_le32(~crc32_le(~0, payload, length));
-
-		if (crc.f1[3] != payload[length-1] ||
-		    crc.f1[2] != payload[length-2] ||
-		    crc.f1[1] != payload[length-3] ||
-		    crc.f1[0] != payload[length-4]) {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
-				 ("rtw_wep_decrypt:icv error crc (%4ph)!=payload (%4ph)\n",
-				 &crc, &payload[length-4]));
-		}
 	}
 
 	return;
@@ -556,8 +547,6 @@ u32	rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 			stainfo = rtw_get_stainfo(&padapter->stapriv, &pattrib->ra[0]);
 
 		if (stainfo != NULL) {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo!= NULL!!!\n"));
-
 			if (IS_MCAST(pattrib->ra))
 				prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
 			else
@@ -576,9 +565,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));
 					crc.f0 = cpu_to_le32(~crc32_le(~0, payload, length));
 
 					arcfour_init(&mycontext, rc4key, 16);
@@ -597,7 +583,6 @@ u32	rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 				}
 			}
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo==NULL!!!\n"));
 			res = _FAIL;
 		}
 	}
@@ -640,7 +625,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 				}
 				prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
 			} else {
-				RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo!= NULL!!!\n"));
 				prwskey = &stainfo->dot118021x_UncstKey.skey[0];
 			}
 
@@ -666,14 +650,9 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 			if (crc.f1[3] != payload[length-1] ||
 			    crc.f1[2] != payload[length-2] ||
 			    crc.f1[1] != payload[length-3] ||
-			    crc.f1[0] != payload[length-4]) {
-				RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
-					 ("rtw_wep_decrypt:icv error crc (%4ph)!=payload (%4ph)\n",
-					 &crc, &payload[length-4]));
+			    crc.f1[0] != payload[length-4])
 				res = _FAIL;
-			}
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo==NULL!!!\n"));
 			res = _FAIL;
 		}
 	}
@@ -1218,8 +1197,6 @@ u32	rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
 			stainfo = rtw_get_stainfo(&padapter->stapriv, &pattrib->ra[0]);
 
 		if (stainfo != NULL) {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo!= NULL!!!\n"));
-
 			if (IS_MCAST(pattrib->ra))
 				prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
 			else
@@ -1238,7 +1215,6 @@ u32	rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
 				}
 			}
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo==NULL!!!\n"));
 			res = _FAIL;
 		}
 	}
@@ -1430,9 +1406,6 @@ static 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_,
-				 ("aes_decipher:mic check error mic[%d]: pframe(%x)!=message(%x)\n",
-				 i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]));
 			DBG_88E("aes_decipher:mic check error mic[%d]: pframe(%x)!=message(%x)\n",
 				i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
 			res = _FAIL;
@@ -1457,8 +1430,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 != NULL) {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
-
 			if (IS_MCAST(prxattrib->ra)) {
 				/* in concurrent we should use sw descrypt in group key, so we remove this message */
 				if (!psecuritypriv->binstallGrpkey) {
@@ -1479,7 +1450,6 @@ u32	rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 			length = ((struct recv_frame *)precvframe)->len-prxattrib->hdrlen-prxattrib->iv_len;
 			res = aes_decipher(prwskey, prxattrib->hdrlen, pframe, length);
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo==NULL!!!\n"));
 			res = _FAIL;
 		}
 	}
@@ -1691,10 +1661,5 @@ void rtw_use_tkipkey_handler(void *FunctionContext)
 {
 	struct adapter *padapter = (struct adapter *)FunctionContext;
 
-	RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("^^^rtw_use_tkipkey_handler ^^^\n"));
-
 	padapter->securitypriv.busetkipkey = true;
-
-	RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n", padapter->securitypriv.busetkipkey));
-
 }
-- 
2.31.1


  parent reply	other threads:[~2021-08-01 19:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 19:04 [PATCH 00/15] staging: r8188eu: remove core dir RT_TRACE calls Phillip Potter
2021-08-01 19:04 ` [PATCH 01/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_cmd.c Phillip Potter
2021-08-01 19:04 ` [PATCH 02/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_pwrctrl.c Phillip Potter
2021-08-01 19:04 ` [PATCH 03/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_wlan_util.c Phillip Potter
2021-08-01 19:04 ` [PATCH 04/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_ieee80211.c Phillip Potter
2021-08-01 19:04 ` [PATCH 05/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_io.c Phillip Potter
2021-08-01 19:04 ` [PATCH 06/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_ioctl_set.c Phillip Potter
2021-08-01 19:04 ` [PATCH 07/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_mlme.c Phillip Potter
2021-08-01 19:04 ` [PATCH 08/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_mlme_ext.c Phillip Potter
2021-08-01 19:04 ` [PATCH 09/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_mp.c Phillip Potter
2021-08-01 19:04 ` Phillip Potter [this message]
2021-08-01 19:04 ` [PATCH 11/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_sta_mgt.c Phillip Potter
2021-08-01 19:04 ` [PATCH 12/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_xmit.c Phillip Potter
2021-08-01 19:04 ` [PATCH 13/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_led.c Phillip Potter
2021-08-01 19:04 ` [PATCH 14/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_mp_ioctl.c Phillip Potter
2021-08-01 19:04 ` [PATCH 15/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_recv.c Phillip Potter
2021-08-05 10:43 ` [PATCH 00/15] staging: r8188eu: remove core dir RT_TRACE calls Greg KH
2021-08-05 12:37   ` Phillip Potter
2021-08-05 12:46     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210801190437.82017-11-phil@philpotter.co.uk \
    --to=phil@philpotter.co.uk \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --subject='Re: [PATCH 10/15] staging: r8188eu: remove RT_TRACE calls from core/rtw_security.c' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox