mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: gregkh@linuxfoundation.org
Cc: dan.carpenter@oracle.com, david.laight@aculab.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Fabio Aiuto <fabioaiuto83@gmail.com>
Subject: [PATCH v2 17/20] staging: rtl8723bs: remove macros updating unused fields in struct security_priv
Date: Sat, 27 Mar 2021 15:24:16 +0100	[thread overview]
Message-ID: <00c13a16f0034884a916855a7b7d782d6d05d4c1.1616854134.git.fabioaiuto83@gmail.com> (raw)
In-Reply-To: <cover.1616854134.git.fabioaiuto83@gmail.com>

remove macros updating statistic fields in struct security_priv

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_security.c | 68 -------------------
 1 file changed, 68 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 44e2b362c867..0ddd7667a986 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -29,63 +29,6 @@ const char *security_type_str(u8 value)
 	return NULL;
 }
 
-#ifdef DBG_SW_SEC_CNT
-#define WEP_SW_ENC_CNT_INC(sec, ra) \
-	if (is_broadcast_mac_addr(ra)) \
-		sec->wep_sw_enc_cnt_bc++; \
-	else if (is_multicast_mac_addr(ra)) \
-		sec->wep_sw_enc_cnt_mc++; \
-	else \
-		sec->wep_sw_enc_cnt_uc++;
-
-#define WEP_SW_DEC_CNT_INC(sec, ra) \
-	if (is_broadcast_mac_addr(ra)) \
-		sec->wep_sw_dec_cnt_bc++; \
-	else if (is_multicast_mac_addr(ra)) \
-		sec->wep_sw_dec_cnt_mc++; \
-	else \
-		sec->wep_sw_dec_cnt_uc++;
-
-#define TKIP_SW_ENC_CNT_INC(sec, ra) \
-	if (is_broadcast_mac_addr(ra)) \
-		sec->tkip_sw_enc_cnt_bc++; \
-	else if (is_multicast_mac_addr(ra)) \
-		sec->tkip_sw_enc_cnt_mc++; \
-	else \
-		sec->tkip_sw_enc_cnt_uc++;
-
-#define TKIP_SW_DEC_CNT_INC(sec, ra) \
-	if (is_broadcast_mac_addr(ra)) \
-		sec->tkip_sw_dec_cnt_bc++; \
-	else if (is_multicast_mac_addr(ra)) \
-		sec->tkip_sw_dec_cnt_mc++; \
-	else \
-		sec->tkip_sw_dec_cnt_uc++;
-
-#define AES_SW_ENC_CNT_INC(sec, ra) \
-	if (is_broadcast_mac_addr(ra)) \
-		sec->aes_sw_enc_cnt_bc++; \
-	else if (is_multicast_mac_addr(ra)) \
-		sec->aes_sw_enc_cnt_mc++; \
-	else \
-		sec->aes_sw_enc_cnt_uc++;
-
-#define AES_SW_DEC_CNT_INC(sec, ra) \
-	if (is_broadcast_mac_addr(ra)) \
-		sec->aes_sw_dec_cnt_bc++; \
-	else if (is_multicast_mac_addr(ra)) \
-		sec->aes_sw_dec_cnt_mc++; \
-	else \
-		sec->aes_sw_dec_cnt_uc++;
-#else
-#define WEP_SW_ENC_CNT_INC(sec, ra)
-#define WEP_SW_DEC_CNT_INC(sec, ra)
-#define TKIP_SW_ENC_CNT_INC(sec, ra)
-#define TKIP_SW_DEC_CNT_INC(sec, ra)
-#define AES_SW_ENC_CNT_INC(sec, ra)
-#define AES_SW_DEC_CNT_INC(sec, ra)
-#endif /* DBG_SW_SEC_CNT */
-
 /* WEP related ===== */
 
 struct arc4context {
@@ -256,8 +199,6 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
 				pframe = (u8 *)round_up((SIZE_PTR)(pframe), 4);
 			}
 		}
-
-		WEP_SW_ENC_CNT_INC(psecuritypriv, pattrib->ra);
 	}
 }
 
@@ -305,8 +246,6 @@ void rtw_wep_decrypt(struct adapter  *padapter, u8 *precvframe)
 					crc[1], payload[length - 3],
 					crc[0], payload[length - 4]));
 		}
-
-		WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 	}
 }
 
@@ -710,8 +649,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
 					pframe = (u8 *)round_up((SIZE_PTR)(pframe), 4);
 				}
 			}
-
-			TKIP_SW_ENC_CNT_INC(psecuritypriv, pattrib->ra);
 		}
 	}
 	return res;
@@ -812,8 +749,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
 						crc[0], payload[length - 4]));
 				res = _FAIL;
 			}
-
-			TKIP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 		} else {
 			RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
 			res = _FAIL;
@@ -1465,8 +1400,6 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
 				pframe = (u8 *)round_up((SIZE_PTR)(pframe), 4);
 			}
 		}
-
-		AES_SW_ENC_CNT_INC(psecuritypriv, pattrib->ra);
 	}
 	return res;
 }
@@ -1772,7 +1705,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
 
 			res = aes_decipher(prwskey, prxattrib->hdrlen, pframe, length);
 
-			AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
 		} else {
 			RT_TRACE(_module_rtl871x_security_c_,
 				 _drv_err_,
-- 
2.20.1


  parent reply	other threads:[~2021-03-27 14:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27 14:23 [PATCH v2 00/20] fix checkpatch error on macros Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 01/20] staging: rtl8723bs: remove unused macros in include/hal_com.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 02/20] staging: rtl8723bs: put parentheses on macro with complex values " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 03/20] staging: rtl8723bs: added spaces around operators in a macro " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 04/20] staging: rtl8723bs: remove unused macros in include/hal_com_reg.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 05/20] staging: rtl8723bs: remove unused macros in include/hal_data.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 06/20] staging: rtl8723bs: put parentheses on macros with complex values " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 07/20] staging: rtl8723bs: add spaces around operators " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 08/20] staging: rtl8723bs: remove unused macros in include/hal_phy.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 09/20] staging: rtl8723bs: put parentheses on macros with complex values in include/rtw_debug.h Fabio Aiuto
2021-03-28  8:39   ` Joe Perches
2021-03-28 12:08   ` Greg KH
2021-03-28 14:43     ` Fabio Aiuto
2021-03-28 14:54       ` Greg KH
2021-03-27 14:24 ` [PATCH v2 10/20] staging: rtl8723bs: remove unused macro in include/rtw_pwrctrl.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 11/20] staging: rtl8723bs: remove unused field in rereg_nd_name_data struct Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 12/20] staging: rtl8723bs: remove commented code line in os_dep/ioctl_linux.c Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 13/20] staging: rtl8723bs: put parentheses on macros with complex values in include/rtw_pwrctrl.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 14/20] staging: rtl8723bs: add spaces around operator " Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 15/20] staging: rtl8723bs: remove unused macros in include/wifi.h Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 16/20] staging: rtl8723bs: put parentheses on macros with complex values " Fabio Aiuto
2021-03-27 14:24 ` Fabio Aiuto [this message]
2021-03-27 14:24 ` [PATCH v2 18/20] staging: rtl8723bs: remove unused fields in struct security_priv Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 19/20] staging: rtl8723bs: include macro in a do - while loop in core/rtw_security.c Fabio Aiuto
2021-03-28 12:10   ` Greg KH
2021-03-28 14:23     ` Fabio Aiuto
2021-03-27 14:24 ` [PATCH v2 20/20] staging: rtl8723bs: remove unused macros in include/drv_types.c Fabio Aiuto

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=00c13a16f0034884a916855a7b7d782d6d05d4c1.1616854134.git.fabioaiuto83@gmail.com \
    --to=fabioaiuto83@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=david.laight@aculab.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®