From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 3/9] staging: r8188eu: reorder assignments, clarify the header format
Date: Sun, 6 Nov 2022 13:48:55 +0100 [thread overview]
Message-ID: <20221106124901.720785-4-martin@kaiser.cx> (raw)
In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx>
Reorder some of the assignments in update_recvframe_attrib_88e.
This should make it a bit easier to understand the format of the header
that is added by the chip's firmware.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
index 9a61eef8550b..d1ac2960f1c4 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
@@ -66,28 +66,25 @@ void update_recvframe_attrib_88e(struct recv_frame *precvframe, struct recv_stat
if (pattrib->pkt_rpt_type == NORMAL_RX) {
pattrib->pkt_len = le32_to_cpu(prxstat->rxdw0) & 0x00003fff;
+ pattrib->icv_err = (le32_to_cpu(prxstat->rxdw0) >> 15) & 0x1;
pattrib->drvinfo_sz = ((le32_to_cpu(prxstat->rxdw0) >> 16) & 0xf) * 8;
-
+ pattrib->encrypt = (u8)((le32_to_cpu(prxstat->rxdw0) >> 20) & 0x7);
+ pattrib->qos = (le32_to_cpu(prxstat->rxdw0) >> 23) & 0x1;
+ pattrib->shift_sz = (le32_to_cpu(prxstat->rxdw0) >> 24) & 0x3;
pattrib->physt = (le32_to_cpu(prxstat->rxdw0) >> 26) & 0x1;
-
pattrib->bdecrypted = (le32_to_cpu(prxstat->rxdw0) & BIT(27)) ? 0 : 1;
- pattrib->encrypt = (le32_to_cpu(prxstat->rxdw0) >> 20) & 0x7;
- pattrib->qos = (le32_to_cpu(prxstat->rxdw0) >> 23) & 0x1;
pattrib->priority = (le32_to_cpu(prxstat->rxdw1) >> 8) & 0xf;
-
pattrib->amsdu = (le32_to_cpu(prxstat->rxdw1) >> 13) & 0x1;
+ pattrib->mdata = (le32_to_cpu(prxstat->rxdw1) >> 26) & 0x1;
+ pattrib->mfrag = (le32_to_cpu(prxstat->rxdw1) >> 27) & 0x1;
pattrib->seq_num = le32_to_cpu(prxstat->rxdw2) & 0x00000fff;
pattrib->frag_num = (le32_to_cpu(prxstat->rxdw2) >> 12) & 0xf;
- pattrib->mfrag = (le32_to_cpu(prxstat->rxdw1) >> 27) & 0x1;
- pattrib->mdata = (le32_to_cpu(prxstat->rxdw1) >> 26) & 0x1;
pattrib->mcs_rate = le32_to_cpu(prxstat->rxdw3) & 0x3f;
pattrib->rxht = (le32_to_cpu(prxstat->rxdw3) >> 6) & 0x1;
- pattrib->icv_err = (le32_to_cpu(prxstat->rxdw0) >> 15) & 0x1;
- pattrib->shift_sz = (le32_to_cpu(prxstat->rxdw0) >> 24) & 0x3;
} else if (pattrib->pkt_rpt_type == TX_REPORT1) { /* CCX */
pattrib->pkt_len = TX_RPT1_PKT_LEN;
} else if (pattrib->pkt_rpt_type == TX_REPORT2) {
--
2.30.2
next prev parent reply other threads:[~2022-11-06 12:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-06 12:48 [PATCH 0/9] staging: r8188eu: another round of cleanups Martin Kaiser
2022-11-06 12:48 ` [PATCH 1/9] staging: r8188eu: don't store addba request Martin Kaiser
2022-11-06 12:48 ` [PATCH 2/9] staging: r8188eu: remove some obsolete comments Martin Kaiser
2022-11-06 12:48 ` Martin Kaiser [this message]
2022-11-06 12:48 ` [PATCH 4/9] staging: r8188eu: reformat a function header Martin Kaiser
2022-11-06 12:48 ` [PATCH 5/9] staging: r8188eu: remove state checks in rtw_led_control Martin Kaiser
2022-11-06 12:48 ` [PATCH 6/9] staging: r8188eu: clean up rtw_hal_init Martin Kaiser
2022-11-06 12:48 ` [PATCH 7/9] staging: r8188eu: remove get_fwstate Martin Kaiser
2022-11-06 12:49 ` [PATCH 8/9] staging: r8188eu: merge two rtw_free_network_nolock functions Martin Kaiser
2022-11-06 12:49 ` [PATCH 9/9] staging: r8188eu: remove checks in dump_mgntframe Martin Kaiser
2022-11-07 6:22 ` [PATCH 0/9] staging: r8188eu: another round of cleanups Philipp Hortmann
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=20221106124901.720785-4-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/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®