Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp219928rwb; Sun, 6 Nov 2022 05:11:35 -0800 (PST) X-Google-Smtp-Source: AMsMyM7R6Wfocj0H3H2YEzW1SvjaYgyfwTHWhEkBXInIM7lErgA/iT0FrqQOpUZ40KbDoTekj6aU X-Received: by 2002:a50:eb83:0:b0:462:a2ac:8623 with SMTP id y3-20020a50eb83000000b00462a2ac8623mr45183643edr.360.1667740295666; Sun, 06 Nov 2022 05:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667740295; cv=none; d=google.com; s=arc-20160816; b=lpi74ul7mkL/mnGtubo5lO4lrNggHJ3SuoUxofvED7xhVgkwyC4vfYaJjEOj+4vaxe xTaUWiorBHEdO/FzyEicWYI3/qSg/UaLl1m0f9MrQXgaUMQPp+lgqvm/dnokExcm4GGn Ojh2ebQsYnDyTnyTlY3YoLxBkPnv6SJ0LKQitkHxPYIQBRTWCiHU7RuDyvJzbRAjB5Ju T+Jxk//NSZeIP+PKaKvhWLcPcj1g08ULQI/QY2KzO6HRqB12KXR9jrn/RvXCSgHJ58aM LalYOH5ssUknO01/6bxe4fSL63HjAwI7QcqQ9SVXUnitgHKSKZ9tGMiTRf2lGPUojTki mL9g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n15-20020aa7db4f000000b00461f9648c7dsi5031809edt.422.2022.11.06.05.11.07; Sun, 06 Nov 2022 05:11:35 -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 + 96 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 Content-Transfer-Encoding: 8bit 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 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) { -- 2.30.2