From patchwork Tue Feb 7 19:23:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 54048 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3035026wrn; Tue, 7 Feb 2023 11:28:33 -0800 (PST) X-Google-Smtp-Source: AK7set8falzwaYq352+aGSVQI0w4eY5YwUQvn0tiHYAkTVVuqFFLbujR5BBLF6zut/rl0J1Woqia X-Received: by 2002:a17:906:7c93:b0:888:c0b4:7f08 with SMTP id w19-20020a1709067c9300b00888c0b47f08mr4537061ejo.29.1675798113674; Tue, 07 Feb 2023 11:28:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675798113; cv=none; d=google.com; s=arc-20160816; b=NJRs97H7DRqruK1j9pGZTrJ/zxzJQ38rfniskRzWOPmfECWik0RAuSlPCJBpO7K/6Q jrUn2Uhd0jnIgi30VccGAro9pjXeiMTBSRYAO2+iyFJFBTyn7EReUoQroT0I04Edc3In Cx7Yt+d/vNfFtuc7svk8ovFp79jQUdX8e3AGGGjsMSjnjRRlnvGXAOznJPt7WYBHTbsF vbSZSUL+bHRp4tM25Od1fM4wON+vbM9w439dL+typzAlXhX/Nf9n/wuyXZp7Mi2yftqw pnNk/cNsFA6cfHHyTfJQjFw7eKKsCet3/TvexEdQXk6zSoqkDzmOYt0ZeloHVRaRmHGN nFuA== 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=3GUdt95KWPtYt/meqt9Ou5tAEnx9clL7a178ynP2VYA=; b=Z08g6cPkWEnbXtyv4Ozkq7igBee4/sMwCize9c2hsSfj4b4nMzctYuY2eJQ6sPzzUC 5eYYiSFcT4AerxoEksvVgUINZlJ4xJsNzbu5ibzG9X23dLNJ2kFRXs6qUmkKUqAMOW7C t8P57EmTBj2Q4TnLE4Uhbob7/ji47xaHc/0l5Q4qi574pVRk4dNL9Qi8rPE7XlU6ectm dV9nQ+UZP6+wcfIwx4mQlPxLjrI/yDUvw0QpqcqTGR1EYM4qTAU+Yx36+hBK3KCd9n/O Z1znGdWAXpLGqHvTZ2bdGzdUpMnoATMiescIEzHwaks5ADWExiqfxNGQDFIGvxmCLnfe D3fg== 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 x14-20020aa7d38e000000b004aab2282fafsi8738235edq.565.2023.02.07.11.28.10; Tue, 07 Feb 2023 11:28:33 -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 S231717AbjBGTXh (ORCPT + 99 others); Tue, 7 Feb 2023 14:23:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230216AbjBGTXe (ORCPT ); Tue, 7 Feb 2023 14:23:34 -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 0E03722DC7 for ; Tue, 7 Feb 2023 11:23:34 -0800 (PST) Received: from dslb-178-004-202-208.178.004.pools.vodafone-ip.de ([178.4.202.208] 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 1pPTYt-0002XK-3T; Tue, 07 Feb 2023 20:23:27 +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 1/7] staging: r8188eu: merge do_queue_select into its only caller Date: Tue, 7 Feb 2023 20:23:13 +0100 Message-Id: <20230207192319.294203-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207192319.294203-1-martin@kaiser.cx> References: <20230207192319.294203-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?1757201682851701774?= X-GMAIL-MSGID: =?utf-8?q?1757201682851701774?= Merge do_queue_select into its only caller. It's only a simple assignment. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 18941320e70e..4d6210d89533 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1609,15 +1609,6 @@ u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe) return addr; } -static void do_queue_select(struct adapter *padapter, struct pkt_attrib *pattrib) -{ - u8 qsel; - - qsel = pattrib->priority; - - pattrib->qsel = qsel; -} - /* * The main transmit(tx) entry * @@ -1656,7 +1647,7 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt) rtw_led_control(padapter, LED_CTL_TX); - do_queue_select(padapter, &pxmitframe->attrib); + pxmitframe->attrib.qsel = pxmitframe->attrib.priority; spin_lock_bh(&pxmitpriv->lock); if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe)) { From patchwork Tue Feb 7 19:23:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 54054 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3035589wrn; Tue, 7 Feb 2023 11:29:55 -0800 (PST) X-Google-Smtp-Source: AK7set+v+rwoIUJ3iX8eP80S8TQ/x7bO91wvCs+dcnSE2GxOLgwbMufkc73yiLN7afW74284LnNd X-Received: by 2002:a62:2582:0:b0:593:b169:ae51 with SMTP id l124-20020a622582000000b00593b169ae51mr3474508pfl.32.1675798195314; Tue, 07 Feb 2023 11:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675798195; cv=none; d=google.com; s=arc-20160816; b=KwfrLUv2VIYZ0QznpMf6HFBVnW2uNDGqo+dYVUdLtzEm9chmx/kV/Osp2RQJvJQNHX dk4v5MmUnJcPvltTDbvecz+gQc122vjW81dBeam2uraXziUB4XUZdVbjgXSlyAE60Bca Yc6LmgqI2q3OyChfrUK2XVfNFdetFZgbriENLy6BYJoQfBK0/EoQLwKzkXGsek9zmGWQ cusi6pyYBPkh3yBwC2/sEDpy4LhgNlxElgJOYHRNtAQWv9f1yTj6nCfdaV7V1PjWi48C Vvs1hJgqeRPNWuShTaCBuE///a0mQc5snPuc8SPOluL9+NCjeyZSVdAXjIGp8vio+xlM GUgA== 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=2iCIxiHFry5mp35JWHG9AGq22O17E0K3DnZT2SdbWhE=; b=yxTcGRKLwwLpsdPi9CJ2sCO6cZ+SQi3IEgDLQ18F3Fyx3xr6KBr3NeBqPha3YDt+mz pta991o9x3IVPLSQn0VVecA5UKt0Z4Lkk3OfxB5I/dv5Ehj1x/24oXFlo/yG+5QSeb3j Z9wnIbfu5VdE3l2H1/VHsWQFYWxQ4w+uN+SghS7KSHvSMiJVTou5mmNu5JJSmh/zJcaR Y85TvTew7VdCasN/eHZDE5Tj4lGwZ2/wPkTZCzcg5ijpPO9WI8N63BUo2MpIJWqQHEy6 LvmEKGE8hMbUYOVZQU+ts7mt4QaaLp1V3MLng4X8c2LGmXgAIt9AY2Sty54V33qKXDHU NxzA== 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 85-20020a621658000000b00599a67efc3csi12177590pfw.132.2023.02.07.11.29.42; Tue, 07 Feb 2023 11:29:55 -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 S231636AbjBGTXg (ORCPT + 99 others); Tue, 7 Feb 2023 14:23:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231518AbjBGTXe (ORCPT ); Tue, 7 Feb 2023 14:23:34 -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 2029D37547 for ; Tue, 7 Feb 2023 11:23:34 -0800 (PST) Received: from dslb-178-004-202-208.178.004.pools.vodafone-ip.de ([178.4.202.208] 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 1pPTYu-0002XK-MJ; Tue, 07 Feb 2023 20:23:29 +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 2/7] staging: r8188eu: simplify rtw_alloc_xmitframe Date: Tue, 7 Feb 2023 20:23:14 +0100 Message-Id: <20230207192319.294203-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207192319.294203-1-martin@kaiser.cx> References: <20230207192319.294203-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?1757201768531375014?= X-GMAIL-MSGID: =?utf-8?q?1757201768531375014?= Make the rtw_alloc_xmitframe function a bit simpler. The container_of() call never returns NULL. The if (pxframe) check is false only if pfree_xmit_queue is empty. Handle this special case explicitly and save one level of indentation. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 40 +++++++++++-------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 4d6210d89533..6ec342b726f9 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1256,38 +1256,32 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf spin_lock_bh(&pfree_xmit_queue->lock); - if (list_empty(&pfree_xmit_queue->queue)) { - pxframe = NULL; - } else { - phead = get_list_head(pfree_xmit_queue); - - plist = phead->next; + if (list_empty(&pfree_xmit_queue->queue)) + goto out; - pxframe = container_of(plist, struct xmit_frame, list); - - list_del_init(&pxframe->list); - } + phead = get_list_head(pfree_xmit_queue); + plist = phead->next; + pxframe = container_of(plist, struct xmit_frame, list); + list_del_init(&pxframe->list); - if (pxframe) { /* default value setting */ - pxmitpriv->free_xmitframe_cnt--; + pxmitpriv->free_xmitframe_cnt--; - pxframe->buf_addr = NULL; - pxframe->pxmitbuf = NULL; + pxframe->buf_addr = NULL; + pxframe->pxmitbuf = NULL; - memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib)); - /* pxframe->attrib.psta = NULL; */ + memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib)); + /* pxframe->attrib.psta = NULL; */ - pxframe->frame_tag = DATA_FRAMETAG; + pxframe->frame_tag = DATA_FRAMETAG; - pxframe->pkt = NULL; - pxframe->pkt_offset = 1;/* default use pkt_offset to fill tx desc */ + pxframe->pkt = NULL; + pxframe->pkt_offset = 1;/* default use pkt_offset to fill tx desc */ - pxframe->agg_num = 1; - pxframe->ack_report = 0; - } + pxframe->agg_num = 1; + pxframe->ack_report = 0; +out: spin_unlock_bh(&pfree_xmit_queue->lock); - return pxframe; } From patchwork Tue Feb 7 19:23:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 54050 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3035294wrn; Tue, 7 Feb 2023 11:29:16 -0800 (PST) X-Google-Smtp-Source: AK7set8uETA4TtBxvsE5aAfNG/jpovhxM6Xblm5KpWxSXO/krZdIkl3WYfFrUYbvHvTvPoY4C6RK X-Received: by 2002:a17:90a:fe0d:b0:230:c2e9:9d6a with SMTP id ck13-20020a17090afe0d00b00230c2e99d6amr5297322pjb.46.1675798156114; Tue, 07 Feb 2023 11:29:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675798156; cv=none; d=google.com; s=arc-20160816; b=sVjggvxWCF7fUJtBBVORu+S+ERPRPQswEoZOnZVZG3Sfny04qYQXrlQZZIT0gxEREU w0Ey1yhV6woUOr0VCMNMnc3KxR5/wVxkF3buTFbblWPGHzEx0hb3bWUgCFhDyzYMgRH1 8BRaWJLkNWF8AugF3NrrznYzOnlB+kzhy1IzoTHXpuQAGl3XjDd1gVrbH9BUhCx6OR3e sEWQazhuU6+Ol5ECOdvJybgJ9ZjLjUjHUoY6A6YH3WXxc4cvXpwGm1Ug6otwkn6qUlfW KS0R0qKX8UVY0V3EHZSbbx86I6unxvXaDR8gr9PTK+btXXTdtv09NiIjEijrMQRNfWhu 0Ivw== 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=HDXOe8tPnVHZI+3rraH7KRDdJ3GItcYmPLUS/aegmME=; b=h+wIs4FE6S+JecWfBggW+NJzfkAMKS/FNWbiVCx4aIx5nTzwEF1kSPwoY0G4cFsBIw eogu7HmSKB1bBQ4zk7ccA7ROcsF7G5pwiGKzbIQrxf997WtFvzSZ8HuNBUG6X0Q7t3xU 9ka2IzLMI8STEF7WltOggY6VZpyiFLREg4klDVeHDFJp3X8wszDJXa/0uKtMgpoE7q28 Offi936Au3C2WThYXLXbo9J9pqD9MJflvZcr7WekTBWxtCZGSYLNho+IE1S7VoMf81sC 3jYm0lshqtGzqk4POJmzsI2gZq1Tm9WCZxKiXqzqPgzgZVO269nxseaB1C+BeveHcQv/ M1+A== 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 nl9-20020a17090b384900b0022c0049ab90si25930246pjb.95.2023.02.07.11.29.02; Tue, 07 Feb 2023 11:29:16 -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 S231937AbjBGTXm (ORCPT + 99 others); Tue, 7 Feb 2023 14:23:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230216AbjBGTXj (ORCPT ); Tue, 7 Feb 2023 14:23:39 -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 C66803A599 for ; Tue, 7 Feb 2023 11:23:38 -0800 (PST) Received: from dslb-178-004-202-208.178.004.pools.vodafone-ip.de ([178.4.202.208] 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 1pPTYy-0002XK-Pd; Tue, 07 Feb 2023 20:23:32 +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/7] staging: r8188eu: remove unused frametag defines Date: Tue, 7 Feb 2023 20:23:15 +0100 Message-Id: <20230207192319.294203-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207192319.294203-1-martin@kaiser.cx> References: <20230207192319.294203-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?1757201727325081375?= X-GMAIL-MSGID: =?utf-8?q?1757201727325081375?= Remove some frametag defines which are not used in the r8188eu driver. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtw_xmit.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index b332c2a86dbb..0c999ae6a1f1 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -152,14 +152,7 @@ struct pkt_attrib { #define NULL_FRAMETAG (0x0) #define DATA_FRAMETAG 0x01 -#define L2_FRAMETAG 0x02 #define MGNT_FRAMETAG 0x03 -#define AMSDU_FRAMETAG 0x04 - -#define EII_FRAMETAG 0x05 -#define IEEE8023_FRAMETAG 0x06 - -#define MP_FRAMETAG 0x07 #define TXAGG_FRAMETAG 0x08 From patchwork Tue Feb 7 19:23:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 54049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3035293wrn; Tue, 7 Feb 2023 11:29:16 -0800 (PST) X-Google-Smtp-Source: AK7set+e0LToStiR2bbbAipWi9Mmfhs0tOxMMFZdsWxAMQGvUuam+MYmH5vPnJ5U9mJ5x3z1O1l5 X-Received: by 2002:a05:6a20:ce44:b0:b8:76c7:bdda with SMTP id id4-20020a056a20ce4400b000b876c7bddamr4662621pzb.60.1675798156046; Tue, 07 Feb 2023 11:29:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675798156; cv=none; d=google.com; s=arc-20160816; b=bsxSif1cFCkFxEC7vZKZ4y8WDFMIUIMjWtaUhXkA5D/kYMGWy93ROUIwQ2Fvz2aYHK pbMh4Eiouf/2hyD2UXsvdNNQVCJXgSlgAFX3q+o5qxJmS2C0w7DYeiea8OBAPoyAIC5z 9ICz4WwarqxqJZKIj8blyqxRzmRYU1xmQWyqt3HvBZJdgvOxg2lvzLC+kXhPwX8p/zIr nomP+QnuWSEvOJwKMhTUJjuG7yIuVpmen8UCL5q9MYWYJ5XaZ0d212z3rcjd1x1TEzx3 LIaWIuXVLHk/c6S7+PZufVZYM3feiRla1xSh7K5KGxUwMJbRJts5K43WBb42lIErU3jD hNyA== 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=2LydzodVnK/PbevQWttoeGzes7N+jOwwzYp05BHBtQw=; b=rGlKelYQnr5D0yqXbOSjarqJpDnUG5bmAssoIo35eTpejxAAHcW6LWbaBIiIS9/v4j 0YcMPH3hzikAvpow9HmE44aSJyVnTrKKQMyYR0SbYMFiWkt9pvLmMR2aYDTTo+9gkd1P HSrKr3gTSTXkkTRxaKRts1eQ8y1+mpH5RNqns1NPpLSL7Ud3E3pw5cgeyrXRu3OrCXOB C8gvxI5CQgb6FsT6ue0G/Nznheosl6iRJwzI0OgSMUiNOqY3SGxNAPfz7gndUJHjIorb +uCR9anMyXMJQsldJE0Un0odUwqwzDKlE8eRCN7b4uguPKQK9PPzoOXfnoRls/iAKfO0 P+tQ== 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 a22-20020a637f16000000b004fab7560876si10782407pgd.187.2023.02.07.11.29.03; Tue, 07 Feb 2023 11:29:16 -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 S230216AbjBGTXo (ORCPT + 99 others); Tue, 7 Feb 2023 14:23:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231927AbjBGTXl (ORCPT ); Tue, 7 Feb 2023 14:23:41 -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 1BA543B0C6 for ; Tue, 7 Feb 2023 11:23:41 -0800 (PST) Received: from dslb-178-004-202-208.178.004.pools.vodafone-ip.de ([178.4.202.208] 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 1pPTZ0-0002XK-Vz; Tue, 07 Feb 2023 20:23:35 +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 4/7] staging: r8188eu: xmit_buf's ff_hwaddr is not used Date: Tue, 7 Feb 2023 20:23:16 +0100 Message-Id: <20230207192319.294203-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207192319.294203-1-martin@kaiser.cx> References: <20230207192319.294203-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?1757201727414362254?= X-GMAIL-MSGID: =?utf-8?q?1757201727414362254?= ff_hwaddr in struct xmit_buf is not used. Remove it. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/rtw_xmit.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 0c999ae6a1f1..9a001fbf45a0 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -193,7 +193,6 @@ struct xmit_buf { u32 alloc_sz; u32 len; struct submit_ctx *sctx; - u32 ff_hwaddr; struct urb *pxmit_urb; int last[8]; }; From patchwork Tue Feb 7 19:23:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 54051 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3035396wrn; Tue, 7 Feb 2023 11:29:29 -0800 (PST) X-Google-Smtp-Source: AK7set+JhY53h5ORnBi3o7g3jKgn2piqkFRCptaDwNy4msFnWsoeHEIFv/GLJul9HhHYJXD5HnL9 X-Received: by 2002:a17:906:730d:b0:880:50de:5e86 with SMTP id di13-20020a170906730d00b0088050de5e86mr5909643ejc.3.1675798169618; Tue, 07 Feb 2023 11:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675798169; cv=none; d=google.com; s=arc-20160816; b=DKrHjkbvXpBcanWbzOwk61vluVWd1O8Yjw1Qm7YlrlBGwd7QHWKrvjzGq98f4uDi1B MilKB+peFzY6W4S5qxo+SFusHP/ORHuG/9qUFIJbrMOBd6ucCp75M6wV9edBTkfcVj+T /PCdklGubMmFzrGLnzn9M1Ni+iwOMq06mMURnUJSHESrHZh+oUSQ7kNTWYlfYdNnreB2 rdcEq2+9uk+eA+1jgndc/SvnBwUgmjFbEXq65+j58RLDCTDw/2miNhBuGlvDsS3K/CBf 8ElG5AL1hvZ3zOyF8S6XyvTlsdvzHT/Q7qc0mk34nRym/Vksv7hr0dnfSW05PZlNapkw 2CVg== 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=BSXjjhsv5rhAxVklIFfU5xKJJjxf7fqu1txuPOrpnFM=; b=h+C6f6A4WQB2M/Jia2dd0dsZ48cn4YjbATf2d863VDDLiBkBoiVvhaQnhlvmLzLd3E xH3IBGJz28YQBpsdH8X/yJrYB6Kl/iGOntIz+MOxMiXOV6U1M2Gs83y3ehEdJlvFdRTN IfIIt2zgpq2cwO5rsY8AhK+gdFJMfEleNzMC6fDLKpqA+1/0UeYDvr+4f5+Ko/6pA0eX uCvQPGlpV20k9ebIBBMGTUP9xkNB6MgcpmuNyjBl6OFGweMye7yusZEE/v0vprl99beV 9z/hBdNWsCCQXM0sDYZ4n3Amjdruw5n1CVBoBb72PC3BF6szdmoAR5rtIjvNH7b9hI25 ZQQQ== 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 h24-20020aa7de18000000b004aacd8e198csi3082980edv.412.2023.02.07.11.29.06; Tue, 07 Feb 2023 11:29:29 -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 S231912AbjBGTXv (ORCPT + 99 others); Tue, 7 Feb 2023 14:23:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231405AbjBGTXs (ORCPT ); Tue, 7 Feb 2023 14:23:48 -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 EEF4039CDA for ; Tue, 7 Feb 2023 11:23:42 -0800 (PST) Received: from dslb-178-004-202-208.178.004.pools.vodafone-ip.de ([178.4.202.208] 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 1pPTZ3-0002XK-08; Tue, 07 Feb 2023 20:23:37 +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 5/7] staging: r8188eu: simplify xmit_buf flags Date: Tue, 7 Feb 2023 20:23:17 +0100 Message-Id: <20230207192319.294203-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207192319.294203-1-martin@kaiser.cx> References: <20230207192319.294203-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?1757201741862980820?= X-GMAIL-MSGID: =?utf-8?q?1757201741862980820?= rtw_write_port stores a queue index in pxmitbuf->flags before submitting an urb. The urb completion function reads the flags. All it needs is the info if the high queue was used or not. We can replace the flags with a boolean high_queue variable. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- drivers/staging/r8188eu/include/rtw_xmit.h | 2 +- .../staging/r8188eu/os_dep/usb_ops_linux.c | 25 ++----------------- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 6ec342b726f9..df88b3e29e77 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -148,7 +148,7 @@ int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) goto free_xmitbuf; } - pxmitbuf->flags = XMIT_VO_QUEUE; + pxmitbuf->high_queue = false; list_add_tail(&pxmitbuf->list, &pxmitpriv->free_xmitbuf_queue.queue); pxmitbuf++; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index 9a001fbf45a0..feeac85aedb0 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -189,7 +189,7 @@ struct xmit_buf { u8 *pbuf; void *priv_data; u16 ext_tag; /* 0: Normal xmitbuf, 1: extension xmitbuf. */ - u16 flags; + bool high_queue; u32 alloc_sz; u32 len; struct submit_ctx *sctx; diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c index 48c96f731ce1..ca09f7ed7e4d 100644 --- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c @@ -39,7 +39,7 @@ static void usb_write_port_complete(struct urb *purb) struct adapter *padapter = pxmitbuf->padapter; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - if (pxmitbuf->flags == HIGH_QUEUE_INX) + if (pxmitbuf->high_queue) rtw_chk_hi_queue_cmd(padapter); switch (purb->status) { @@ -83,28 +83,7 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) } spin_lock_irqsave(&pxmitpriv->lock, irqL); - - switch (addr) { - case VO_QUEUE_INX: - pxmitbuf->flags = VO_QUEUE_INX; - break; - case VI_QUEUE_INX: - pxmitbuf->flags = VI_QUEUE_INX; - break; - case BE_QUEUE_INX: - pxmitbuf->flags = BE_QUEUE_INX; - break; - case BK_QUEUE_INX: - pxmitbuf->flags = BK_QUEUE_INX; - break; - case HIGH_QUEUE_INX: - pxmitbuf->flags = HIGH_QUEUE_INX; - break; - default: - pxmitbuf->flags = MGT_QUEUE_INX; - break; - } - + pxmitbuf->high_queue = (addr == HIGH_QUEUE_INX); spin_unlock_irqrestore(&pxmitpriv->lock, irqL); purb = pxmitbuf->pxmit_urb; From patchwork Tue Feb 7 19:23:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 54052 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3035400wrn; Tue, 7 Feb 2023 11:29:30 -0800 (PST) X-Google-Smtp-Source: AK7set8oMJoQe71U7ZKV2aG+RahSvYoezLTPUT9F2e4F0SqGkhyFlFtdIKvCNxPTPD0Ku/t+BsGJ X-Received: by 2002:a17:906:eb5b:b0:8aa:502c:44d1 with SMTP id mc27-20020a170906eb5b00b008aa502c44d1mr153936ejb.23.1675798169915; Tue, 07 Feb 2023 11:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675798169; cv=none; d=google.com; s=arc-20160816; b=JKH/tpZDdLZNVFIKldkWP1M4TwNHup17+hER+SeehNRMbhp2RC1FDGebVQxH1A8L1L OxZI9hC6k3Qrdzemd5zY2eyunCWHyFPuv/lup0il4vo72Cb7F9073WTgLIsN1rJMSESo j979tV+ZmjpMviJahgJJ0MHgytXBu4SwZHbceqcKpeaTUg5noFjfwS4ssGUf78IRb1F8 uOZneOA7FhQhjHIYW12qI0myUbi87tptbzPzp4ND4OHf9E6P43uu/TDKxDB2h3HqvR/j mjdMn3MlbrhCPlql3pbGNP2wuVeJBs6iq7pG3o7VXElEME4+/V2ZNUKsJchlTXBPl3M+ ZrKg== 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=tWS7QdpaOzoGjZNdHnbcJ2Pa2Y/tyPn8eKx78QVdhpk=; b=T9IWUN1PO50ImEK/DnUSEdV8IsPbwxP9ue9p36qqVwAgr6EXAmzvFJ/QEQthv9cN/H q2kzvFSB81BperFbG/0d/OysbajGo+q+4RolJppSHIOyM0PrB73aFOCHAW9hvVwMtHbm Fv46xkVoZxWKz66qPbU6ByFnSPw3MK7OdzWmL9nN3ZTiBnAoy9RbktRG9mrsaaB/mySW SZ3b9s5gGJPXmJaQ5xa0YD3Li3Uvp+Dec81mHrSBBjvkf5Jq13DU5h4ucSBYePYYw9xm J3nXumwij7yALKM6Iue29OCzd6nVlpZiTNt4dHjmH5PtPeQ5oflNwN75TXssezi/jtFA hinQ== 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 10-20020a170906028a00b0088bf3542ea4si21523008ejf.992.2023.02.07.11.29.07; Tue, 07 Feb 2023 11:29:29 -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 S231178AbjBGTYB (ORCPT + 99 others); Tue, 7 Feb 2023 14:24:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjBGTXv (ORCPT ); Tue, 7 Feb 2023 14:23:51 -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 1EC633B658 for ; Tue, 7 Feb 2023 11:23:45 -0800 (PST) Received: from dslb-178-004-202-208.178.004.pools.vodafone-ip.de ([178.4.202.208] 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 1pPTZ5-0002XK-Oc; Tue, 07 Feb 2023 20:23:39 +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 6/7] staging: r8188eu: simplify rtw_get_ff_hwaddr Date: Tue, 7 Feb 2023 20:23:18 +0100 Message-Id: <20230207192319.294203-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207192319.294203-1-martin@kaiser.cx> References: <20230207192319.294203-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?1757201741680986642?= X-GMAIL-MSGID: =?utf-8?q?1757201741680986642?= On both occassions where rtw_get_ff_hwaddr is called, the result is used as addr parameter for rtw_write_port. rtw_write_port only needs the info if the high queue was used or not. Simplify rtw_get_ff_hwaddr accordingly and remove the now unused queue defines. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 32 +--------------------- drivers/staging/r8188eu/include/rtw_xmit.h | 7 ----- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index df88b3e29e77..d0761ac2e695 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1568,39 +1568,9 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb) u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe) { - u32 addr; struct pkt_attrib *pattrib = &pxmitframe->attrib; - switch (pattrib->qsel) { - case 0: - case 3: - addr = BE_QUEUE_INX; - break; - case 1: - case 2: - addr = BK_QUEUE_INX; - break; - case 4: - case 5: - addr = VI_QUEUE_INX; - break; - case 6: - case 7: - addr = VO_QUEUE_INX; - break; - case 0x10: - addr = BCN_QUEUE_INX; - break; - case 0x11:/* BC/MC in PS (HIQ) */ - addr = HIGH_QUEUE_INX; - break; - case 0x12: - default: - addr = MGT_QUEUE_INX; - break; - } - - return addr; + return pattrib->qsel == 0x11 ? HIGH_QUEUE_INX : 0; } /* diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index feeac85aedb0..e4e5af198eee 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -26,14 +26,7 @@ #define XMIT_BE_QUEUE (2) #define XMIT_BK_QUEUE (3) -#define VO_QUEUE_INX 0 -#define VI_QUEUE_INX 1 -#define BE_QUEUE_INX 2 -#define BK_QUEUE_INX 3 -#define BCN_QUEUE_INX 4 -#define MGT_QUEUE_INX 5 #define HIGH_QUEUE_INX 6 -#define TXCMD_QUEUE_INX 7 #define HW_QUEUE_ENTRY 8 From patchwork Tue Feb 7 19:23:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 54053 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3035444wrn; Tue, 7 Feb 2023 11:29:35 -0800 (PST) X-Google-Smtp-Source: AK7set8v7D9857hAkekJORn8Py+la95yU7MXUb6MnPG12DlATWJ92WDX6NRmdGiKe+7uHbt6J3f9 X-Received: by 2002:a50:9ea9:0:b0:4a0:e323:d59c with SMTP id a38-20020a509ea9000000b004a0e323d59cmr4782426edf.20.1675798175619; Tue, 07 Feb 2023 11:29:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675798175; cv=none; d=google.com; s=arc-20160816; b=a+f2kpAPqrSBqS3HOnC2NwEV7ztf7qDW2EYmjpIMAWI/5LVx61y+32MCRqexz/AXtn 0brA/YeenWpzkmADjMfn3qU868q7Z3NrvQi1vadyUyphrTMaoF53ovAMQSj6HX0noDlI hlHbFUOaI8FsO3eRz2CA3kGzUhZDsnLwc9oY92+E5gkw7OpS5SwgV0/qfkm6OgiT6ag8 cFg2EQP3JfM1uAkKuoPGlaJ+kMnPIFgcXGIpA3nkULXrLnTjLFZF62pfUBWJ8DbARARG UN2spd77j95kNsRX14KLyUV+AYC6h18B9cNpcoPH+taRfnESciz+CUMEsfGbMmYdhizq FUmg== 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=mjAuHWwOGDcYqGdZB6b3E7+sB2D00ij3hjREAb3ya4g=; b=uj7GlS6w1OjzOTXneS5Vi7HAVU/CuvxY6PNcgjcwqJZkxGulpyVx4v1wUVsPeWFxdt SFgPa62xOWFhS3eA/yosvOemqxFv6f91W9jisrZtQppkyQCyQIgb+dDLeYaNqPYN8f3s U1snXc7VTov8FtR8wVSDvz9eXMefRN1sjLVrIgT5Hw0+hRrL7kbouXju+/x4G1UPenFv yywu5HSjhUtXboIF4NNsmQLp5jacDSxvDRwIlR0FXkAHjy97drtXuY7OkyWrpym0+yZJ qU7UcvXkx6gbYxpJh5eJP5+GmkVw5FmYa2hucmgFZvBTxMQ4wXN+ERpxyMdTciWwHUgQ BZfQ== 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 l16-20020a056402255000b004a21d09b14bsi15459532edb.160.2023.02.07.11.29.12; Tue, 07 Feb 2023 11:29: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 S229625AbjBGTYF (ORCPT + 99 others); Tue, 7 Feb 2023 14:24:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjBGTX6 (ORCPT ); Tue, 7 Feb 2023 14:23:58 -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 9DA8538E97 for ; Tue, 7 Feb 2023 11:23:48 -0800 (PST) Received: from dslb-178-004-202-208.178.004.pools.vodafone-ip.de ([178.4.202.208] 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 1pPTZ7-0002XK-Dy; Tue, 07 Feb 2023 20:23:41 +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 7/7] staging: r8188eu: bagg_pkt parameter is not used Date: Tue, 7 Feb 2023 20:23:19 +0100 Message-Id: <20230207192319.294203-8-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207192319.294203-1-martin@kaiser.cx> References: <20230207192319.294203-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?1757201747613161071?= X-GMAIL-MSGID: =?utf-8?q?1757201747613161071?= The bagg_pkt parameter in function update_txdesc is not used, it can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c index 5aa33fc4041d..3ffab4953a5c 100644 --- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c @@ -137,7 +137,7 @@ static void fill_txdesc_phy(struct pkt_attrib *pattrib, __le32 *pdw) } } -static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bagg_pkt) +static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) { uint qsel; u8 data_rate, pwr_status, offset; @@ -319,7 +319,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe) sz = pattrib->last_txcmdsz; } - pull = update_txdesc(pxmitframe, mem_addr, sz, false); + pull = update_txdesc(pxmitframe, mem_addr, sz); if (pull) { mem_addr += PACKET_OFFSET_SZ; /* pull txdesc head */ @@ -489,7 +489,7 @@ bool rtl8188eu_xmitframe_complete(struct adapter *adapt) rtw_xmit_complete(adapt, pxmitframe); /* (len - TXDESC_SIZE) == pxmitframe->attrib.last_txcmdsz */ - update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz, true); + update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz); /* don't need xmitframe any more */ rtw_free_xmitframe(pxmitpriv, pxmitframe); @@ -529,7 +529,7 @@ bool rtl8188eu_xmitframe_complete(struct adapter *adapt) pfirstframe->pkt_offset--; } - update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz, true); + update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz); /* 3 4. write xmit buffer to USB FIFO */ ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe);