staging:r8188eu: remove sw_encrypt member of security_priv struct
authorIvan Safonov <insafonov@gmail.com>
Sun, 2 Apr 2017 14:35:40 +0000 (17:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 15:11:54 +0000 (17:11 +0200)
sw_encrypt always is 0. Replace sw_encrypt with 0.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
drivers/staging/rtl8188eu/include/rtw_security.h
drivers/staging/rtl8188eu/os_dep/os_intfs.c

index 1dcb4eb415f545594fc79b8df37cf66c45467780..1470a2eb506d678781d385bcbfd37403b8dd57fb 100644 (file)
@@ -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"));
index c7e195555c9cdadcb4562fd021280f087f0f54c0..a9912b60eb5999632053a4dabce1e687cc30e23a 100644 (file)
@@ -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;
index 2eda6778b4094ab53e27910ded34fd7de1f8952e..74fe664787e52e76eb6a81f05de60c3f156f51a0 100644 (file)
@@ -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. */
 
index fecbeddaf4ab8f59bb9a1e8911b30bf82b665fe7..add1ba00f3e9ab7c5111f6c3846fa582ed243e53 100644 (file)
@@ -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;