mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value
@ 2017-04-02 14:35 Ivan Safonov
  2017-04-02 14:35 ` [PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct Ivan Safonov
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ivan Safonov @ 2017-04-02 14:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luca Ceresoli, Georgiana Rodica Chelu, devel, linux-kernel, Ivan Safonov

rtw_software_decrypt used only once and does not changed.
Replace it with 0.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 5f6a245..f1c8bbc 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -50,7 +50,6 @@ MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 static int rtw_debug = 1;
 
 static int rtw_software_encrypt;
-static int rtw_software_decrypt;
 
 static int rtw_acm_method;/*  0:By SW 1:By HW. */
 
@@ -167,7 +166,7 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
 	registry_par->ips_mode = (u8)rtw_ips_mode;
 	registry_par->mp_mode = 0;
 	registry_par->software_encrypt = (u8)rtw_software_encrypt;
-	registry_par->software_decrypt = (u8)rtw_software_decrypt;
+	registry_par->software_decrypt = 0;
 	registry_par->acm_method = (u8)rtw_acm_method;
 
 	 /* UAPSD */
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct
  2017-04-02 14:35 [PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value Ivan Safonov
@ 2017-04-02 14:35 ` Ivan Safonov
  2017-04-02 14:35 ` [PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct Ivan Safonov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Ivan Safonov @ 2017-04-02 14:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luca Ceresoli, Georgiana Rodica Chelu, devel, linux-kernel, Ivan Safonov

Value of this variable has no changes, and used once.
Replace software_decrypt with its value.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/include/drv_types.h | 1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu/include/drv_types.h
index 0fd2a2d..8bcb170 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -66,7 +66,6 @@ struct registry_priv {
 	u8	smart_ps;
 	u8	mp_mode;
 	u8	software_encrypt;
-	u8	software_decrypt;
 	u8	acm_method;
 	  /* UAPSD */
 	u8	wmm_enable;
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index f1c8bbc..451deb0 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -166,7 +166,6 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
 	registry_par->ips_mode = (u8)rtw_ips_mode;
 	registry_par->mp_mode = 0;
 	registry_par->software_encrypt = (u8)rtw_software_encrypt;
-	registry_par->software_decrypt = 0;
 	registry_par->acm_method = (u8)rtw_acm_method;
 
 	 /* UAPSD */
@@ -393,7 +392,7 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 	/* security_priv */
 	psecuritypriv->binstallGrpkey = _FAIL;
 	psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
-	psecuritypriv->sw_decrypt = pregistrypriv->software_decrypt;
+	psecuritypriv->sw_decrypt = 0;
 	psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
 	psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
 	psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct
  2017-04-02 14:35 [PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value Ivan Safonov
  2017-04-02 14:35 ` [PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct Ivan Safonov
@ 2017-04-02 14:35 ` Ivan Safonov
  2017-04-02 14:35 ` [PATCH 4/6] staging:r8188eu: replace rtw_software_encrypt with its default value Ivan Safonov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Ivan Safonov @ 2017-04-02 14:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luca Ceresoli, Georgiana Rodica Chelu, devel, linux-kernel, Ivan Safonov

sw_decrypt always is 0, so replace it with 0.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c        | 4 ++--
 drivers/staging/rtl8188eu/include/rtw_security.h | 1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c      | 1 -
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 96526fe..c6c4404 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -392,7 +392,7 @@ static struct recv_frame *decryptor(struct adapter *padapter,
 		}
 	}
 
-	if ((prxattrib->encrypt > 0) && ((prxattrib->bdecrypted == 0) || (psecuritypriv->sw_decrypt))) {
+	if ((prxattrib->encrypt > 0) && (prxattrib->bdecrypted == 0)) {
 		psecuritypriv->hw_decrypted = false;
 
 		switch (prxattrib->encrypt) {
@@ -1979,7 +1979,7 @@ static int recv_func(struct adapter *padapter, struct recv_frame *rframe)
 		/* check if need to enqueue into uc_swdec_pending_queue*/
 		if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
 		    !IS_MCAST(prxattrib->ra) && prxattrib->encrypt > 0 &&
-		    (prxattrib->bdecrypted == 0 || psecuritypriv->sw_decrypt) &&
+		    prxattrib->bdecrypted == 0 &&
 		    !is_wep_enc(psecuritypriv->dot11PrivacyAlgrthm) &&
 		    !psecuritypriv->busetkipkey) {
 			rtw_enqueue_recvframe(rframe, &padapter->recvpriv.uc_swdec_pending_queue);
diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h b/drivers/staging/rtl8188eu/include/rtw_security.h
index 7100d6b..2eda677 100644
--- a/drivers/staging/rtl8188eu/include/rtw_security.h
+++ b/drivers/staging/rtl8188eu/include/rtw_security.h
@@ -134,7 +134,6 @@ struct security_priv {
 	u8	bcheck_grpkey;
 	u8	bgrpkey_handshake;
 	s32	sw_encrypt;/* from registry_priv */
-	s32	sw_decrypt;/* from registry_priv */
 	s32	hw_decrypted;/* if the rx packets is hw_decrypted==false,i
 			      * it means the hw has not been ready. */
 
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 451deb0..8fee58f 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -392,7 +392,6 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 	/* security_priv */
 	psecuritypriv->binstallGrpkey = _FAIL;
 	psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
-	psecuritypriv->sw_decrypt = 0;
 	psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
 	psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
 	psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 4/6] staging:r8188eu: replace rtw_software_encrypt with its default value
  2017-04-02 14:35 [PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value Ivan Safonov
  2017-04-02 14:35 ` [PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct Ivan Safonov
  2017-04-02 14:35 ` [PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct Ivan Safonov
@ 2017-04-02 14:35 ` Ivan Safonov
  2017-04-02 14:35 ` [PATCH 5/6] staging:r8188eu: remove software_encrypt member of registry_priv struct Ivan Safonov
  2017-04-02 14:35 ` [PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct Ivan Safonov
  4 siblings, 0 replies; 6+ messages in thread
From: Ivan Safonov @ 2017-04-02 14:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luca Ceresoli, Georgiana Rodica Chelu, devel, linux-kernel, Ivan Safonov

rtw_software_encrypt used only once and does not changed.
Replace it with 0.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 8fee58f..ccae39f 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -49,8 +49,6 @@ MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 
 static int rtw_debug = 1;
 
-static int rtw_software_encrypt;
-
 static int rtw_acm_method;/*  0:By SW 1:By HW. */
 
 static int rtw_wmm_enable = 1;/*  default is set to enable the wmm. */
@@ -165,7 +163,7 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
 	registry_par->power_mgnt = (u8)rtw_power_mgnt;
 	registry_par->ips_mode = (u8)rtw_ips_mode;
 	registry_par->mp_mode = 0;
-	registry_par->software_encrypt = (u8)rtw_software_encrypt;
+	registry_par->software_encrypt = 0;
 	registry_par->acm_method = (u8)rtw_acm_method;
 
 	 /* UAPSD */
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 5/6] staging:r8188eu: remove software_encrypt member of registry_priv struct
  2017-04-02 14:35 [PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value Ivan Safonov
                   ` (2 preceding siblings ...)
  2017-04-02 14:35 ` [PATCH 4/6] staging:r8188eu: replace rtw_software_encrypt with its default value Ivan Safonov
@ 2017-04-02 14:35 ` Ivan Safonov
  2017-04-02 14:35 ` [PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct Ivan Safonov
  4 siblings, 0 replies; 6+ messages in thread
From: Ivan Safonov @ 2017-04-02 14:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luca Ceresoli, Georgiana Rodica Chelu, devel, linux-kernel, Ivan Safonov

Value of this variable does not changed after initialization.
Replace software_encrypt with its default value.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/include/drv_types.h | 1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu/include/drv_types.h
index 8bcb170..c3517c0 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -65,7 +65,6 @@ struct registry_priv {
 	u8	ips_mode;
 	u8	smart_ps;
 	u8	mp_mode;
-	u8	software_encrypt;
 	u8	acm_method;
 	  /* UAPSD */
 	u8	wmm_enable;
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index ccae39f..fecbedd 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -163,7 +163,6 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
 	registry_par->power_mgnt = (u8)rtw_power_mgnt;
 	registry_par->ips_mode = (u8)rtw_ips_mode;
 	registry_par->mp_mode = 0;
-	registry_par->software_encrypt = 0;
 	registry_par->acm_method = (u8)rtw_acm_method;
 
 	 /* UAPSD */
@@ -389,7 +388,7 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 
 	/* security_priv */
 	psecuritypriv->binstallGrpkey = _FAIL;
-	psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
+	psecuritypriv->sw_encrypt = 0;
 	psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
 	psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
 	psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct
  2017-04-02 14:35 [PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value Ivan Safonov
                   ` (3 preceding siblings ...)
  2017-04-02 14:35 ` [PATCH 5/6] staging:r8188eu: remove software_encrypt member of registry_priv struct Ivan Safonov
@ 2017-04-02 14:35 ` Ivan Safonov
  4 siblings, 0 replies; 6+ messages in thread
From: Ivan Safonov @ 2017-04-02 14:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luca Ceresoli, Georgiana Rodica Chelu, devel, linux-kernel, Ivan Safonov

sw_encrypt always is 0. Replace sw_encrypt with 0.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_xmit.c        | 10 ++++------
 drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c   |  3 +--
 drivers/staging/rtl8188eu/include/rtw_security.h |  1 -
 drivers/staging/rtl8188eu/os_dep/os_intfs.c      |  1 -
 4 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index 1dcb4eb..1470a2e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -587,15 +587,13 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
 	}
 
 	RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_,
-		 ("update_attrib: encrypt=%d  securitypriv.sw_encrypt=%d\n",
-		  pattrib->encrypt, padapter->securitypriv.sw_encrypt));
+		 ("update_attrib: encrypt=%d\n", pattrib->encrypt));
 
-	if (pattrib->encrypt &&
-	    (padapter->securitypriv.sw_encrypt || !psecuritypriv->hw_decrypted)) {
+	if (pattrib->encrypt && !psecuritypriv->hw_decrypted) {
 		pattrib->bswenc = true;
 		RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
-			 ("update_attrib: encrypt=%d securitypriv.hw_decrypted=%d bswenc = true\n",
-			  pattrib->encrypt, padapter->securitypriv.sw_encrypt));
+			 ("update_attrib: encrypt=%d bswenc = true\n",
+			  pattrib->encrypt));
 	} else {
 		pattrib->bswenc = false;
 		RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("update_attrib: bswenc = false\n"));
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
index c7e1955..a9912b6 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
@@ -346,7 +346,6 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
 	struct xmit_buf *pxmitbuf = pxmitframe->pxmitbuf;
 	struct pkt_attrib *pattrib = &pxmitframe->attrib;
 	struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
-	struct security_priv *psecuritypriv = &adapt->securitypriv;
 
 	if ((pxmitframe->frame_tag == DATA_FRAMETAG) &&
 	    (pxmitframe->attrib.ether_type != 0x0806) &&
@@ -366,7 +365,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
 			RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("pattrib->nr_frags=%d\n", pattrib->nr_frags));
 
 			sz = pxmitpriv->frag_len;
-			sz = sz - 4 - (psecuritypriv->sw_encrypt ? 0 : pattrib->icv_len);
+			sz = sz - 4 - pattrib->icv_len;
 		} else {
 			/* no frag */
 			sz = pattrib->last_txcmdsz;
diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h b/drivers/staging/rtl8188eu/include/rtw_security.h
index 2eda677..74fe664 100644
--- a/drivers/staging/rtl8188eu/include/rtw_security.h
+++ b/drivers/staging/rtl8188eu/include/rtw_security.h
@@ -133,7 +133,6 @@ struct security_priv {
 	u8	busetkipkey;
 	u8	bcheck_grpkey;
 	u8	bgrpkey_handshake;
-	s32	sw_encrypt;/* from registry_priv */
 	s32	hw_decrypted;/* if the rx packets is hw_decrypted==false,i
 			      * it means the hw has not been ready. */
 
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index fecbedd..add1ba0 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -388,7 +388,6 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 
 	/* security_priv */
 	psecuritypriv->binstallGrpkey = _FAIL;
-	psecuritypriv->sw_encrypt = 0;
 	psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
 	psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
 	psecuritypriv->dot11PrivacyKeyIndex = 0;
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-02 11:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-02 14:35 [PATCH 1/6] staging:r8188eu: replace rtw_software_decrypt with its value Ivan Safonov
2017-04-02 14:35 ` [PATCH 2/6] staging:r8188eu: remove software_decrypt member of registry_priv struct Ivan Safonov
2017-04-02 14:35 ` [PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct Ivan Safonov
2017-04-02 14:35 ` [PATCH 4/6] staging:r8188eu: replace rtw_software_encrypt with its default value Ivan Safonov
2017-04-02 14:35 ` [PATCH 5/6] staging:r8188eu: remove software_encrypt member of registry_priv struct Ivan Safonov
2017-04-02 14:35 ` [PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct Ivan Safonov

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®