From: Ivan Safonov <insafonov@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Luca Ceresoli <luca@lucaceresoli.net>,
Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Ivan Safonov <insafonov@gmail.com>
Subject: [PATCH 6/6] staging:r8188eu: remove sw_encrypt member of security_priv struct
Date: Sun, 2 Apr 2017 17:35:40 +0300 [thread overview]
Message-ID: <20170402143540.4954-6-insafonov@gmail.com> (raw)
In-Reply-To: <20170402143540.4954-1-insafonov@gmail.com>
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
prev parent reply other threads:[~2017-04-02 11:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Ivan Safonov [this message]
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=20170402143540.4954-6-insafonov@gmail.com \
--to=insafonov@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=georgiana.chelu93@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@lucaceresoli.net \
/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®