Commit ebb02b8f authored by Phillip Potter's avatar Phillip Potter Committed by Greg Kroah-Hartman
Browse files

staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_security.c



Remove all RT_TRACE calls from core/rtw_security.c as this macro is
unnecessary, and these calls are dubious in terms of necessity.
Removing all calls will ultimately allow the removal of the macro
itself.

Signed-off-by: default avatarPhillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210625000756.6313-7-phil@philpotter.co.uk


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0bf20e53
Loading
Loading
Loading
Loading
+2 −19
Original line number Diff line number Diff line
@@ -591,8 +591,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
			stainfo = rtw_get_stainfo(&padapter->stapriv, &pattrib->ra[0]);

		if (stainfo) {
			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));

			if (is_multicast_ether_addr(pattrib->ra))
				prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
			else
@@ -611,9 +609,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, struct xmit_frame *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);
@@ -631,7 +626,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
				}
			}
		} else {
			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo==NULL!!!\n", __func__));
			res = _FAIL;
		}
	}
@@ -668,7 +662,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, struct recv_frame *precvframe)
				}
				prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
			} else {
				RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
				prwskey = &stainfo->dot118021x_UncstKey.skey[0];
			}

@@ -694,14 +687,9 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, struct recv_frame *precvframe)
			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 (%4ph)!=payload (%4ph)\n",
					 &crc, &payload[length - 4]));
			    crc[0] != payload[length - 4])
				res = _FAIL;
			}
		} else {
			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo==NULL!!!\n", __func__));
			res = _FAIL;
		}
	}
@@ -743,10 +731,8 @@ u32 rtw_aes_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
	else
		stainfo = rtw_get_stainfo(&padapter->stapriv, &pattrib->ra[0]);

	if (!stainfo) {
		RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo==NULL!!!\n", __func__));
	if (!stainfo)
		return _FAIL;
	}

	crypto_ops = lib80211_get_crypto_ops("CCMP");

@@ -771,8 +757,6 @@ u32 rtw_aes_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
		goto exit_crypto_ops_deinit;
	}

	RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));

	for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) {
		if (curfragnum + 1 == pattrib->nr_frags)
			length = pattrib->last_txcmdsz;
@@ -877,7 +861,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, struct recv_frame *precvframe)
			if (crypto_ops && crypto_private)
				crypto_ops->deinit(crypto_private);
		} else {
			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo==NULL!!!\n"));
			res = _FAIL;
		}
	}