From patchwork Sun Nov 6 12:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 16125 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1476888wru; Sun, 6 Nov 2022 04:51:03 -0800 (PST) X-Google-Smtp-Source: AMsMyM6kGQ9kfRxFyr8uWKbiKWQm5AEzUGEwbw4w3FyTzVeySrY/Gsj8liv0A4+XbIZodpad1zYI X-Received: by 2002:a17:90b:2393:b0:213:ecb2:2e04 with SMTP id mr19-20020a17090b239300b00213ecb22e04mr34506082pjb.100.1667739062902; Sun, 06 Nov 2022 04:51:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739062; cv=none; d=google.com; s=arc-20160816; b=cTBrYYIhInKDy4PuhSlSsWZc3sCZ5eh9UVodN3rteBIAmUlq6pWpAhnXso5Jovf3ad qHgG+BXMzbGtJlmgDoJQpwUfDtXk7y0Y/B25DLNGkheX91dMeHqM3rQdH+oSDMyai08g P4OX8lDGNbTl00xP2V3Xco2jqR3YoZ+8HanrX6Nh16fOP15J1a971ioe6Xm6FQ5xsSNz BcdE1PSVzdxuGSvHhjNjtglOrP5UIz36iaivGOQ89GomcRBkkP4PAI9S5Rcfpx+wxv7A 9YGQochHxNBMCVhPOM3cvyFfSKluNvnsFPRnX6X42UYYOzt9enLd5fwjt/megqo9wYy/ d89A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+921zLhrnFjYtEqI1rjpvCPG0slEe9dQtJzgWp4BacA=; b=Lzu/IcYOQf1rT2EYbq9+3Jy1GAbxtOf64jfF81OewfahCvt4Jc4m2te94xMOhOd4oc 11EQocSGfn/9ZloXQTnlR0UD3IoNHfXRNH4cPQFgkgtHUfTDz6B2HWihJr/xK2kJBlYc F01Qy2u6K/liYlLmCXbqKUGEnBr9tbnGUyjPM6araZAHZHMbsNsM4EidzJuEBh7Dxvt3 wkCn1WtVuFzeIkiquN5vCKzvG+jq6O80Vs4//eCDUIOyLwwskLcnLQceMDVXxGL3cf8z 0CWRUw5iEJt9ZmNMtxsUhAsNn1yBt3QdZUSa7VEOOtHkLCfsMfAIlBaYu17eWS+x6u25 HQrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l22-20020a056a0016d600b0056e48944824si6898609pfc.191.2022.11.06.04.50.50; Sun, 06 Nov 2022 04:51:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229845AbiKFMtV (ORCPT + 99 others); Sun, 6 Nov 2022 07:49:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbiKFMtQ (ORCPT ); Sun, 6 Nov 2022 07:49:16 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA1AD647E for ; Sun, 6 Nov 2022 04:49:15 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1orf5K-0008Dj-HH; Sun, 06 Nov 2022 13:49:10 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/9] staging: r8188eu: reorder assignments, clarify the header format Date: Sun, 6 Nov 2022 13:48:55 +0100 Message-Id: <20221106124901.720785-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748751155687886582?= X-GMAIL-MSGID: =?utf-8?q?1748751155687886582?= 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 --- 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) {