From: Ivan Safonov Date: Sun, 2 Apr 2017 14:35:40 +0000 (+0300) Subject: staging:r8188eu: remove sw_encrypt member of security_priv struct X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1375baa965590bbd3ce7656a6d643e4b3590fd37;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging:r8188eu: remove sw_encrypt member of security_priv struct sw_encrypt always is 0. Replace sw_encrypt with 0. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index 1dcb4eb415f5..1470a2eb506d 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 c7e195555c9c..a9912b60eb59 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 2eda6778b409..74fe664787e5 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 fecbeddaf4ab..add1ba00f3e9 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;