From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 1/2] staging: r8188eu: busetkipkey is boolean
Date: Tue, 7 Mar 2023 09:50:02 +0100 [thread overview]
Message-ID: <20230307085003.5025-2-straube.linux@gmail.com> (raw)
In-Reply-To: <20230307085003.5025-1-straube.linux@gmail.com>
The field busetkipkey of struct security_priv is set to boolean
values only. Remove unneeded comparisions from if statements that
use this field.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index fc7568cf948b..741c17121c9b 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -471,7 +471,7 @@ static struct recv_frame *decryptor(struct adapter *padapter, struct recv_frame
break;
}
} else if (prxattrib->bdecrypted == 1 && prxattrib->encrypt > 0 &&
- (psecuritypriv->busetkipkey == 1 || prxattrib->encrypt != _TKIP_))
+ (psecuritypriv->busetkipkey || prxattrib->encrypt != _TKIP_))
psecuritypriv->hw_decrypted = true;
if (res == _FAIL) {
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index df88b3e29e77..cc3894101673 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -626,7 +626,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
pattrib->iv_len = 8;
pattrib->icv_len = 4;
- if (padapter->securitypriv.busetkipkey == _FAIL) {
+ if (!padapter->securitypriv.busetkipkey) {
res = _FAIL;
goto exit;
}
--
2.39.2
next prev parent reply other threads:[~2023-03-07 8:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 8:50 [PATCH 0/2] staging: r8188eu: two simple cleanups Michael Straube
2023-03-07 8:50 ` Michael Straube [this message]
2023-03-07 8:50 ` [PATCH 2/2] staging: r8188eu: bgrpkey_handshake is set but never used Michael Straube
2023-03-07 19:11 ` [PATCH 0/2] staging: r8188eu: two simple cleanups Philipp Hortmann
2023-03-09 9:09 ` Greg KH
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=20230307085003.5025-2-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/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;
as well as URLs for NNTP newsgroup(s).