Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388AbdDBLkD (ORCPT ); Sun, 2 Apr 2017 07:40:03 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:35449 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbdDBLkB (ORCPT ); Sun, 2 Apr 2017 07:40:01 -0400 From: Ivan Safonov To: Greg Kroah-Hartman Cc: Luca Ceresoli , Georgiana Rodica Chelu , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Ivan Safonov Subject: [PATCH 3/6] staging:r8188eu: remove sw_decrypt member of security_priv struct Date: Sun, 2 Apr 2017 17:35:37 +0300 Message-Id: <20170402143540.4954-3-insafonov@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170402143540.4954-1-insafonov@gmail.com> References: <20170402143540.4954-1-insafonov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2612 Lines: 57 sw_decrypt always is 0, so replace it with 0. Signed-off-by: Ivan Safonov --- 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