Skip to contentSkip to conversation

staging: rtl8723bs: Clean-up in rtw_security.c

PATCH Superseded Javier F. Arias 2 participants 14 messages Oct 11, 2019 – Oct 25, 2019 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: Clean-up in rtw_security.c

This patchset would improve the formatting, style and remove unnecessary code.

Javier F. Arias (6):
staging: rtl8723bs: Replace string with identifier
staging: rtl8723bs: Fix lines over 80 characters
staging: rtl8723bs: Add spaces between operators
staging: rtl8723bs: Remove commented code
staging: rtl8723bs: Fix indentation warnings
staging: rtl8723bs: Fix function call format

 drivers/staging/rtl8723bs/core/rtw_security.c | 121 ++++++++----------
 1 file changed, 52 insertions(+), 69 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/6 staging: rtl8723bs: Replace string with identifier

Replace the hardcoded function names with the corresponding predefined identifiers.
Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +11 -11
index 5ffaf9bfa6e8..4c92a3abb2c8 100644
@@ -303,8 +303,8 @@ 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_, ("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]));
+			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]));
 		}
 
 		WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
@@ -695,7 +695,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 				return _FAIL;
 			}
 */
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo!= NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
 			if (IS_MCAST(pattrib->ra))
 				prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
@@ -853,7 +853,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 
 			TKIP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
 			res = _FAIL;
 		}
 
@@ -1543,7 +1543,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_, ("rtw_aes_encrypt: stainfo!= NULL!!!\n"));
+		RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
 		if (IS_MCAST(pattrib->ra))
 			prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
@@ -1834,10 +1834,10 @@ static sint 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_871X("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]);
+			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, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
 			res = _FAIL;
 		}
 	}
@@ -1868,7 +1868,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 != NULL) {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
 			if (IS_MCAST(prxattrib->ra)) {
 				static unsigned long start;
@@ -1926,7 +1926,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 
 			AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo == NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
 			res = _FAIL;
 		}
 	}
Signature · 1 line
2.20.1
#2 lore raw

Re: [Outreachy kernel] [PATCH 1/6] staging: rtl8723bs: Replace string with identifier

Quoted 2 lines · Javier F. Arias

Replace the hardcoded function names with the corresponding predefined identifiers.

It could have been better to address the 80 character issues first, to make this patch more understandable.

julia

Quoted 90 lines

Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +11 -12
index 5ffaf9bfa6e8..4c92a3abb2c8 100644
@@ -303,8 +303,8 @@ 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_, ("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]));
+			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]));
 		}
 
 		WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
@@ -695,7 +695,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 				return _FAIL;
 			}
 */
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo!= NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
 			if (IS_MCAST(pattrib->ra))
 				prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
@@ -853,7 +853,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 
 			TKIP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
 			res = _FAIL;
 		}
 
@@ -1543,7 +1543,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_, ("rtw_aes_encrypt: stainfo!= NULL!!!\n"));
+		RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
 		if (IS_MCAST(pattrib->ra))
 			prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
@@ -1834,10 +1834,10 @@ static sint 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_871X("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]);
+			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, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
 			res = _FAIL;
 		}
 	}
@@ -1868,7 +1868,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 != NULL) {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
 
 			if (IS_MCAST(prxattrib->ra)) {
 				static unsigned long start;
@@ -1926,7 +1926,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 
 			AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo == NULL!!!\n"));
+			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
 			res = _FAIL;
 		}
 	}
--

2.20.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/b2ff6a52a7140480c9fdb6486a6ac6b4eb51203b.1570768179.git.jarias.linux%40gmail.com.

#3 lore raw

PATCH 2/6 staging: rtl8723bs: Fix lines over 80 characters

In reply to Javier F. Arias

Fix lines over 80 characters by wrapping arguments in function calls, improving the format for a better code readability.
Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 40 ++++++++++++++-----
 1 file changed, 31 insertions(+), 9 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +31 -9
index 4c92a3abb2c8..605155ea724c 100644
@@ -303,8 +303,14 @@ 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",
-						__func__, 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]));
 		}
 
 		WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
@@ -845,9 +851,13 @@ 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_,
+				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]));
+						crc[3], payload[length-1],
+						crc[2], payload[length-2],
+						crc[1], payload[length-3],
+						crc[0], payload[length-4]));
 				res = _FAIL;
 			}
 
@@ -1834,10 +1844,18 @@ static sint 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]));
+			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, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
+					__func__,
+					i,
+					pframe[hdrlen+8+plen-8+i],
+					message[hdrlen+8+plen-8+i]);
 			res = _FAIL;
 		}
 	}
@@ -1868,7 +1886,9 @@ 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_, ("%s: stainfo!= NULL!!!\n", __func__));
+			RT_TRACE(_module_rtl871x_security_c_,
+				 _drv_err_,
+				 ("%s: stainfo!= NULL!!!\n", __func__));
 
 			if (IS_MCAST(prxattrib->ra)) {
 				static unsigned long start;
@@ -1926,7 +1946,9 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 
 			AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 		} else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
+			RT_TRACE(_module_rtl871x_security_c_,
+				 _drv_err_,
+				 ("%s: stainfo == NULL!!!\n", __func__));
 			res = _FAIL;
 		}
 	}
Signature · 1 line
2.20.1
#4 lore raw

PATCH 3/6 staging: rtl8723bs: Add spaces between operators

In reply to Javier F. Arias

Add spaces between operators for a better readability. Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +12 -12
index 605155ea724c..0529a21c9740 100644
@@ -307,10 +307,10 @@ void rtw_wep_decrypt(struct adapter  *padapter, u8 *precvframe)
 				 _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]));
+					crc[3], payload[length - 1],
+					crc[2], payload[length - 2],
+					crc[1], payload[length - 3],
+					crc[0], payload[length - 4]));
 		}
 
 		WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
@@ -854,10 +854,10 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 				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]));
+						crc[3], payload[length - 1],
+						crc[2], payload[length - 2],
+						crc[1], payload[length - 3],
+						crc[0], payload[length - 4]));
 				res = _FAIL;
 			}
 
@@ -1849,13 +1849,13 @@ static sint aes_decipher(u8 *key, uint	hdrlen,
 				 ("%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]));
+					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,
-					pframe[hdrlen+8+plen-8+i],
-					message[hdrlen+8+plen-8+i]);
+					pframe[hdrlen + 8 + plen - 8 + i],
+					message[hdrlen + 8 + plen - 8 + i]);
 			res = _FAIL;
 		}
 	}
Signature · 1 line
2.20.1
#5 lore raw

PATCH 4/6 staging: rtl8723bs: Remove commented code

In reply to Javier F. Arias

Remove commented code for a cleaner file.
Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 56 +++----------------
 1 file changed, 9 insertions(+), 47 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +9 -47
index 0529a21c9740..4f6802b3ade1 100644
@@ -666,7 +666,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 
 	u8 *pframe, *payload, *iv, *prwskey;
 	union pn48 dot11txpn;
-	/* struct	sta_info 	*stainfo; */
 	struct	pkt_attrib	 *pattrib = &((struct xmit_frame *)pxmitframe)->attrib;
 	struct	security_priv *psecuritypriv = &padapter->securitypriv;
 	struct	xmit_priv 	*pxmitpriv = &padapter->xmitpriv;
@@ -681,32 +680,12 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 	/* 4 start to encrypt each fragment */
 	if (pattrib->encrypt == _TKIP_) {
 
-/*
-		if (pattrib->psta)
 		{
-			stainfo = pattrib->psta;
-		}
-		else
-		{
-			DBG_871X("%s, call rtw_get_stainfo()\n", __func__);
-			stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0]);
-		}
-*/
-		/* if (stainfo!= NULL) */
-		{
-/*
-			if (!(stainfo->state &_FW_LINKED))
-			{
-				DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, stainfo->state);
-				return _FAIL;
-			}
-*/
 			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
-				/* prwskey =&stainfo->dot118021x_UncstKey.skey[0]; */
 				prwskey = pattrib->dot118021x_UncstKey.skey;
 
 			prwskeylen = 16;
@@ -747,13 +726,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 
 			TKIP_SW_ENC_CNT_INC(psecuritypriv, pattrib->ra);
 		}
-/*
-		else {
-			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo == NULL!!!\n"));
-			DBG_871X("%s, psta ==NUL\n", __func__);
-			res = _FAIL;
-		}
-*/
 
 	}
 	return res;
@@ -777,7 +749,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 	struct	sta_info 	*stainfo;
 	struct	rx_pkt_attrib	 *prxattrib = &((union recv_frame *)precvframe)->u.hdr.attrib;
 	struct	security_priv *psecuritypriv = &padapter->securitypriv;
-/* 	struct	recv_priv 	*precvpriv =&padapter->recvpriv; */
 	u32 	res = _SUCCESS;
 
 	pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
@@ -822,8 +793,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 				no_gkey_bc_cnt = 0;
 				no_gkey_mc_cnt = 0;
 
-				/* DBG_871X("rx bc/mc packets, to perform sw rtw_tkip_decrypt\n"); */
-				/* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
 				prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
 				prwskeylen = 16;
 			} else {
@@ -1435,7 +1404,7 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 	aes128k128d(key, chain_buffer, aes_out);
 
 	for (i = 0; i < num_blocks; i++) {
-		bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);/* bitwise_xor(aes_out, &message[payload_index], chain_buffer); */
+		bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
 
 		payload_index += 16;
 		aes128k128d(key, chain_buffer, aes_out);
@@ -1446,7 +1415,7 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 		for (j = 0; j < 16; j++)
 			padded_buffer[j] = 0x00;
 		for (j = 0; j < payload_remainder; j++) {
-			padded_buffer[j] = pframe[payload_index++];/* padded_buffer[j] = message[payload_index++]; */
+			padded_buffer[j] = pframe[payload_index++];
 		}
 		bitwise_xor(aes_out, padded_buffer, chain_buffer);
 		aes128k128d(key, chain_buffer, aes_out);
@@ -1458,7 +1427,7 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 
 	/* Insert MIC into payload */
 	for (j = 0; j < 8; j++)
-		pframe[payload_index+j] = mic[j];	/* message[payload_index+j] = mic[j]; */
+		pframe[payload_index+j] = mic[j];
 
 	payload_index = hdrlen + 8;
 	for (i = 0; i < num_blocks; i++) {
@@ -1472,9 +1441,9 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 			frtype
 		); /*  add for CONFIG_IEEE80211W, none 11w also can use */
 		aes128k128d(key, ctr_preload, aes_out);
-		bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);/* bitwise_xor(aes_out, &message[payload_index], chain_buffer); */
+		bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
 		for (j = 0; j < 16; j++)
-			pframe[payload_index++] = chain_buffer[j];/* for (j = 0; j<16;j++) message[payload_index++] = chain_buffer[j]; */
+			pframe[payload_index++] = chain_buffer[j];
 	}
 
 	if (payload_remainder > 0) {
@@ -1493,12 +1462,12 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 		for (j = 0; j < 16; j++)
 			padded_buffer[j] = 0x00;
 		for (j = 0; j < payload_remainder; j++)
-			padded_buffer[j] = pframe[payload_index+j];/* padded_buffer[j] = message[payload_index+j]; */
+			padded_buffer[j] = pframe[payload_index+j];
 
 		aes128k128d(key, ctr_preload, aes_out);
 		bitwise_xor(aes_out, padded_buffer, chain_buffer);
 		for (j = 0; j < payload_remainder; j++)
-			pframe[payload_index++] = chain_buffer[j];/* for (j = 0; j<payload_remainder;j++) message[payload_index++] = chain_buffer[j]; */
+			pframe[payload_index++] = chain_buffer[j];
 	}
 
 	/* Encrypt the MIC */
@@ -1515,12 +1484,12 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 	for (j = 0; j < 16; j++)
 		padded_buffer[j] = 0x00;
 	for (j = 0; j < 8; j++)
-		padded_buffer[j] = pframe[j+hdrlen+8+plen];/* padded_buffer[j] = message[j+hdrlen+8+plen]; */
+		padded_buffer[j] = pframe[j+hdrlen+8+plen];
 
 	aes128k128d(key, ctr_preload, aes_out);
 	bitwise_xor(aes_out, padded_buffer, chain_buffer);
 	for (j = 0; j < 8; j++)
-		 pframe[payload_index++] = chain_buffer[j];/* for (j = 0; j<8;j++) message[payload_index++] = chain_buffer[j]; */
+		 pframe[payload_index++] = chain_buffer[j];
 
 	return _SUCCESS;
 }
@@ -1537,12 +1506,10 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
 	u32 prwskeylen;
 	u8 *pframe, *prwskey;	/*  *payload,*iv */
 	u8   hw_hdr_offset = 0;
-	/* struct	sta_info 	*stainfo = NULL; */
 	struct	pkt_attrib	 *pattrib = &((struct xmit_frame *)pxmitframe)->attrib;
 	struct	security_priv *psecuritypriv = &padapter->securitypriv;
 	struct	xmit_priv 	*pxmitpriv = &padapter->xmitpriv;
 
-/* 	uint	offset = 0; */
 	u32 res = _SUCCESS;
 
 	if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
@@ -1558,7 +1525,6 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
 		if (IS_MCAST(pattrib->ra))
 			prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
 		else
-			/* prwskey =&stainfo->dot118021x_UncstKey.skey[0]; */
 			prwskey = pattrib->dot118021x_UncstKey.skey;
 
 		prwskeylen = 16;
@@ -1602,7 +1568,6 @@ static sint aes_decipher(u8 *key, uint	hdrlen,
 	u8 mic[8];
 
 
-/* 	uint	offset = 0; */
 	uint	frtype  = GetFrameType(pframe);
 	uint	frsubtype  = GetFrameSubType(pframe);
 
@@ -1878,7 +1843,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 	struct	sta_info 	*stainfo;
 	struct	rx_pkt_attrib	 *prxattrib = &((union recv_frame *)precvframe)->u.hdr.attrib;
 	struct	security_priv *psecuritypriv = &padapter->securitypriv;
-/* 	struct	recv_priv 	*precvpriv =&padapter->recvpriv; */
 	u32 res = _SUCCESS;
 
 	pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
@@ -1895,8 +1859,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 				static u32 no_gkey_bc_cnt;
 				static u32 no_gkey_mc_cnt;
 
-				/* DBG_871X("rx bc/mc packets, to perform sw rtw_aes_decrypt\n"); */
-				/* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
 				if (psecuritypriv->binstallGrpkey == false) {
 					res = _FAIL;
 
Signature · 1 line
2.20.1
#6 lore raw

PATCH 5/6 staging: rtl8723bs: Fix indentation warnings

In reply to Javier F. Arias

Fix indentation warnings to improve the code formatting. Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +2 -2
index 4f6802b3ade1..08570e78d5e2 100644
@@ -1489,7 +1489,7 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 	aes128k128d(key, ctr_preload, aes_out);
 	bitwise_xor(aes_out, padded_buffer, chain_buffer);
 	for (j = 0; j < 8; j++)
-		 pframe[payload_index++] = chain_buffer[j];
+		pframe[payload_index++] = chain_buffer[j];
 
 	return _SUCCESS;
 }
@@ -1625,7 +1625,7 @@ static sint aes_decipher(u8 *key, uint	hdrlen,
 	payload_index = hdrlen + 8; /*  8 is for extiv */
 
 	for (i = 0; i < num_blocks; i++) {
-			construct_ctr_preload(
+		construct_ctr_preload(
 				ctr_preload,
 				a4_exists,
 				qc_exists,
Signature · 1 line
2.20.1
#7 lore raw

PATCH 6/6 staging: rtl8723bs: Fix function call format

In reply to Javier F. Arias

Fix function call format by following the coding style guidelines for argument wrapping in function calls.
Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +8 -9
index 08570e78d5e2..a809521da53d 100644
@@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint	hdrlen,
 	payload_index = hdrlen + 8; /*  8 is for extiv */
 
 	for (i = 0; i < num_blocks; i++) {
-		construct_ctr_preload(
-				ctr_preload,
-				a4_exists,
-				qc_exists,
-				pframe,
-				pn_vector,
-				i+1,
-				frtype /*  add for CONFIG_IEEE80211W, none 11w also can use */
-			);
+		construct_ctr_preload(ctr_preload,
+				      a4_exists,
+				      qc_exists,
+				      pframe,
+				      pn_vector,
+				      i+1,
+				      frtype); /*  add for CONFIG_IEEE80211W, none 11w also can use */
+
 
 			aes128k128d(key, ctr_preload, aes_out);
 			bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
Signature · 1 line
2.20.1
#8 lore raw

Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format

Quoted 24 lines · Javier F. Arias

Fix function call format by following the coding style guidelines for argument wrapping in function calls.
Issue found by checkpatch.

---
 drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/staging/rtl8723bs/core/rtw_security.c +0 -7
index 08570e78d5e2..a809521da53d 100644
@@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint	hdrlen,
 	payload_index = hdrlen + 8; /*  8 is for extiv */
 
 	for (i = 0; i < num_blocks; i++) {
-		construct_ctr_preload(
-				ctr_preload,
-				a4_exists,
-				qc_exists,
-				pframe,
-				pn_vector,
-				i+1,

drivers/staging/rtl8723bs/core/rtw_security.c static sint aes_decipher(u8 *key, uint hdrlen, · line 1635

Quoted 10 lines
drivers/staging/rtl8723bs/core/rtw_security.c +8 -2
-				frtype /*  add for CONFIG_IEEE80211W, none 11w also can use */
-			);
+		construct_ctr_preload(ctr_preload,
+				      a4_exists,
+				      qc_exists,
+				      pframe,
+				      pn_vector,
+				      i+1,
+				      frtype); /*  add for CONFIG_IEEE80211W, none 11w also can use */
+

It could be more readable with more arguments on one line.

Also, the i+1 seems like it should have been fixed in a previous patch in the series?

julia

Quoted 11 lines
drivers/staging/rtl8723bs/core/rtw_security.c +0 -1
 			aes128k128d(key, ctr_preload, aes_out);
 			bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
--

2.20.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.

#9 lore raw

Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format

Hello Julia,

Thanks for your feedback. I rebased so the i+1 is now addressed by a previous patch, but I'm afraid that changing the order of the "80 character issue" commit as the first one would affect the line number for the other commits.

Should I resend the patch with the fix only or should I drop this/start again?

Quoted 68 lines · Julia Lawall

Review

Quoted 10 lines · Javier F. Arias

Fix function call format by following the coding style guidelines for argument wrapping in function calls.
Issue found by checkpatch.

Signed-off-by Javier F. Arias <[email protected] <javascript:>>

---

 drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++--------- 
 1 file changed, 8 insertions(+), 9 deletions(-) 
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/core/rtw_security.c

drivers/staging/rtl8723bs/core/rtw_security.c static sint aes_decipher(u8 *key,

Quoted 4 lines

index 08570e78d5e2..a809521da53d 100644

drivers/staging/rtl8723bs/core/rtw_security.c +0 -0
@@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, 

uint hdrlen,

drivers/staging/rtl8723bs/core/rtw_security.c static sint aes_decipher(u8 *key, uint hdrlen,

Quoted 11 lines
drivers/staging/rtl8723bs/core/rtw_security.c +0 -8
         payload_index = hdrlen + 8; /*  8 is for extiv */ 
 
         for (i = 0; i < num_blocks; i++) { 
-                construct_ctr_preload( 
-                                ctr_preload, 
-                                a4_exists, 
-                                qc_exists, 
-                                pframe, 
-                                pn_vector, 
-                                i+1, 
-                                frtype /*  add for CONFIG_IEEE80211W, 

none 11w also can use */

drivers/staging/rtl8723bs/core/rtw_security.c static sint aes_decipher(u8 *key, uint hdrlen,

Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_security.c +7 -1
-                        ); 
+                construct_ctr_preload(ctr_preload, 
+                                      a4_exists, 
+                                      qc_exists, 
+                                      pframe, 
+                                      pn_vector, 
+                                      i+1, 
+                                      frtype); /*  add for 

CONFIG_IEEE80211W, none 11w also can use */

drivers/staging/rtl8723bs/core/rtw_security.c static sint aes_decipher(u8 *key, uint hdrlen, · line 1635

Quoted 1 line
drivers/staging/rtl8723bs/core/rtw_security.c +1 -0
+ 

It could be more readable with more arguments on one line.

Also, the i+1 seems like it should have been fixed in a previous patch in the series?

julia

drivers/staging/rtl8723bs/core/rtw_security.c static sint aes_decipher(u8 *key, · line 1637

Quoted 3 lines
drivers/staging/rtl8723bs/core/rtw_security.c +0 -0
                         aes128k128d(key, ctr_preload, aes_out); 
                         bitwise_xor(aes_out, &pframe[payload_index], 

chain_buffer);

Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_security.c +0 -1
-- 

2.20.1

Signature · 1 line
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.

Quoted 1 line
#10 lore raw

Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format

Quoted 3 lines · Javier Arias

Hello Julia,

Thanks for your feedback. I rebased so the i+1 is now addressed by a previous patch, but I'm afraid that changing the order of the "80 character issue" commit as the first one would affect the line number for the other commits.

There are two cases:

1. Greg has accepted your previous patch. Then you can forget about your previous patch and make the new one on top of Greg's latest tree.

2. Greg has not accepted your previous patch yet. Then you can send a new patch series with v2. It doesn't matter if things move around between different numbers in the series, as Greg is only going to look at the latest version (highest v number).

julia

Quoted 68 lines

Should I resend the patch with the fix only or should I drop this/start again?

On Friday, 11 October 2019 01:05:22 UTC-5, Julia Lawall wrote:

      On Thu, 10 Oct 2019, Javier F. Arias wrote:

      > Fix function call format by following the coding style guidelines
      > for argument wrapping in function calls.
      > Issue found by checkpatch.
      >
      > Signed-off-by: Javier F. Arias <[email protected]>
      > ---
      >  drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
      >  1 file changed, 8 insertions(+), 9 deletions(-)
      >
      > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
      > index 08570e78d5e2..a809521da53d 100644
      > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
      > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
      > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint        hdrlen,
      >          payload_index = hdrlen + 8; /*  8 is for extiv */
      >
      >          for (i = 0; i < num_blocks; i++) {
      > -                construct_ctr_preload(
      > -                                ctr_preload,
      > -                                a4_exists,
      > -                                qc_exists,
      > -                                pframe,
      > -                                pn_vector,
      > -                                i+1,
      > -                                frtype /*  add for CONFIG_IEEE80211W, none 11w also can use */
      > -                        );
      > +                construct_ctr_preload(ctr_preload,
      > +                                      a4_exists,
      > +                                      qc_exists,
      > +                                      pframe,
      > +                                      pn_vector,
      > +                                      i+1,
      > +                                      frtype); /*  add for CONFIG_IEEE80211W, none 11w also can use */
      > +

      It could be more readable with more arguments on one line.

      Also, the i+1 seems like it should have been fixed in a previous patch in
      the series?

      julia

      >
      >                          aes128k128d(key, ctr_preload, aes_out);
      >                          bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
      > --
      > 2.20.1
      >
      > --
      > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
      > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
      > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
      >

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.

#11 lore raw

Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format

In reply to Javier Arias
Quoted 9 lines · Javier Arias

Hello Julia,

Thanks for your feedback. I rebased so the i+1 is now addressed by a previous patch, but I'm afraid that changing the order of the "80 character issue" commit as the first one would affect the line number for the other commits.

Should I resend the patch with the fix only or should I drop this/start again?

On Friday, 11 October 2019 01:05:22 UTC-5, Julia Lawall wrote:

Quoted 16 lines
      On Thu, 10 Oct 2019, Javier F. Arias wrote:

      > Fix function call format by following the coding style guidelines
      > for argument wrapping in function calls.
      > Issue found by checkpatch.
      >
      > Signed-off-by: Javier F. Arias <[email protected]>
      > ---
      >  drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
      >  1 file changed, 8 insertions(+), 9 deletions(-)
      >
      > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
      > index 08570e78d5e2..a809521da53d 100644
      > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
      > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
      > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint        hdrlen,

Actually, while you are on this file, there seems to be something weird about the hdrlen parameter in the line above. There is a lot of space between it and its type. Maybe there is a tab that should be a space?

julia

Quoted 46 lines
      >          payload_index = hdrlen + 8; /*  8 is for extiv */
      >
      >          for (i = 0; i < num_blocks; i++) {
      > -                construct_ctr_preload(
      > -                                ctr_preload,
      > -                                a4_exists,
      > -                                qc_exists,
      > -                                pframe,
      > -                                pn_vector,
      > -                                i+1,
      > -                                frtype /*  add for CONFIG_IEEE80211W, none 11w also can use */
      > -                        );
      > +                construct_ctr_preload(ctr_preload,
      > +                                      a4_exists,
      > +                                      qc_exists,
      > +                                      pframe,
      > +                                      pn_vector,
      > +                                      i+1,
      > +                                      frtype); /*  add for CONFIG_IEEE80211W, none 11w also can use */
      > +

      It could be more readable with more arguments on one line.

      Also, the i+1 seems like it should have been fixed in a previous patch in
      the series?

      julia

      >
      >                          aes128k128d(key, ctr_preload, aes_out);
      >                          bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
      > --
      > 2.20.1
      >
      > --
      > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
      > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
      > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
      >

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.

#12 lore raw

Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format

Ok I'm on it.

About the commit order, my concern was that as the "80 character issue" is changing the line numbers in the file (add new lines) if I switch the order of the first 2 commits it will break. I experimented a bit and in deed had a issue with rebase. So I'll be leaving it as 2nd commit and will have your suggestion into account for the next patch.

Quoted 104 lines · Julia Lawall
Quoted 3 lines · Javier Arias

Hello Julia,

Thanks for your feedback. I rebased so the i+1 is now addressed by a

previous patch, but I'm afraid that changing the order of the "80 character issue" commit as the first one would affect the line number for the other commits.

Quoted 2 lines

Should I resend the patch with the fix only or should I drop this/start

again?

Quoted 7 lines · Julia Lawall

On Thu, 10 Oct 2019, Javier F. Arias wrote:

> Fix function call format by following the coding style

guidelines

Quoted 6 lines

> for argument wrapping in function calls.
> Issue found by checkpatch.
>
> Signed-off-by: Javier F. Arias <[email protected]> > ---
> drivers/staging/rtl8723bs/core/rtw_security.c | 17

++++++++---------

Quoted 3 lines
      >  1 file changed, 8 insertions(+), 9 deletions(-) 
      > 
      > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c 

b/drivers/staging/rtl8723bs/core/rtw_security.c

Quoted 4 lines
      > index 08570e78d5e2..a809521da53d 100644 
      > --- a/drivers/staging/rtl8723bs/core/rtw_security.c 
      > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c 
      > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, 

uint hdrlen,

Actually, while you are on this file, there seems to be something weird about the hdrlen parameter in the line above. There is a lot of space between it and its type. Maybe there is a tab that should be a space?

julia

Quoted 11 lines

> payload_index = hdrlen + 8; /* 8 is for extiv */
>
> for (i = 0; i < num_blocks; i++) {
> - construct_ctr_preload(
> - ctr_preload,
> - a4_exists,
> - qc_exists,
> - pframe,
> - pn_vector,
> - i+1,
> - frtype /* add for

CONFIG_IEEE80211W, none 11w also can use */

Quoted 8 lines

> - );
> + construct_ctr_preload(ctr_preload,
> + a4_exists,
> + qc_exists,
> + pframe,
> + pn_vector,
> + i+1,
> + frtype); /* add for

CONFIG_IEEE80211W, none 11w also can use */

Quoted 5 lines

> +

It could be more readable with more arguments on one line.

Also, the i+1 seems like it should have been fixed in a previous

patch in

Quoted 7 lines
      the series? 

      julia 

      > 
      >                          aes128k128d(key, ctr_preload, aes_out); 
      >                          bitwise_xor(aes_out, 

&pframe[payload_index], chain_buffer);

Quoted 5 lines
      > -- 
      > 2.20.1 
      > 
      > -- 
      > You received this message because you are subscribed to the 

Google Groups "outreachy-kernel" group.

Quoted 1 line

> To unsubscribe from this group and stop receiving emails from

it, send an email to [email protected].

Quoted 1 line

> To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.

Quoted 4 lines
      > 
Signature · 1 line
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.

Quoted 2 lines
#13 lore raw

Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format

In reply to Julia Lawall

Hello Julia,

I didn't receive feedback nor acceptance in this patchset either.

Quoted 104 lines · Julia Lawall
Quoted 3 lines · Javier Arias

Hello Julia,

Thanks for your feedback. I rebased so the i+1 is now addressed by a

previous patch, but I'm afraid that changing the order of the "80 character issue" commit as the first one would affect the line number for the other commits.

Quoted 2 lines

Should I resend the patch with the fix only or should I drop this/start

again?

Quoted 7 lines · Julia Lawall

On Thu, 10 Oct 2019, Javier F. Arias wrote:

> Fix function call format by following the coding style

guidelines

Quoted 6 lines

> for argument wrapping in function calls.
> Issue found by checkpatch.
>
> Signed-off-by: Javier F. Arias <[email protected]> > ---
> drivers/staging/rtl8723bs/core/rtw_security.c | 17

++++++++---------

Quoted 3 lines
      >  1 file changed, 8 insertions(+), 9 deletions(-) 
      > 
      > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c 

b/drivers/staging/rtl8723bs/core/rtw_security.c

Quoted 4 lines
      > index 08570e78d5e2..a809521da53d 100644 
      > --- a/drivers/staging/rtl8723bs/core/rtw_security.c 
      > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c 
      > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, 

uint hdrlen,

Actually, while you are on this file, there seems to be something weird about the hdrlen parameter in the line above. There is a lot of space between it and its type. Maybe there is a tab that should be a space?

julia

Quoted 11 lines

> payload_index = hdrlen + 8; /* 8 is for extiv */
>
> for (i = 0; i < num_blocks; i++) {
> - construct_ctr_preload(
> - ctr_preload,
> - a4_exists,
> - qc_exists,
> - pframe,
> - pn_vector,
> - i+1,
> - frtype /* add for

CONFIG_IEEE80211W, none 11w also can use */

Quoted 8 lines

> - );
> + construct_ctr_preload(ctr_preload,
> + a4_exists,
> + qc_exists,
> + pframe,
> + pn_vector,
> + i+1,
> + frtype); /* add for

CONFIG_IEEE80211W, none 11w also can use */

Quoted 5 lines

> +

It could be more readable with more arguments on one line.

Also, the i+1 seems like it should have been fixed in a previous

patch in

Quoted 7 lines
      the series? 

      julia 

      > 
      >                          aes128k128d(key, ctr_preload, aes_out); 
      >                          bitwise_xor(aes_out, 

&pframe[payload_index], chain_buffer);

Quoted 5 lines
      > -- 
      > 2.20.1 
      > 
      > -- 
      > You received this message because you are subscribed to the 

Google Groups "outreachy-kernel" group.

Quoted 1 line

> To unsubscribe from this group and stop receiving emails from

it, send an email to [email protected].

Quoted 1 line

> To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.

Quoted 4 lines
      > 
Signature · 1 line
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.

Quoted 2 lines