From patchwork Mon Jan 30 19:52:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 50443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2367323wrn; Mon, 30 Jan 2023 11:57:46 -0800 (PST) X-Google-Smtp-Source: AK7set/NkBwmvkuLTDTSJoCKi1gr7OV1CdScBU/RGv9/1d7uflawTrIZS3AAt4ye/yFd9Mx/9eoh X-Received: by 2002:a17:903:3012:b0:196:3853:2926 with SMTP id o18-20020a170903301200b0019638532926mr16124224pla.9.1675108666267; Mon, 30 Jan 2023 11:57:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675108666; cv=none; d=google.com; s=arc-20160816; b=ePBzpLJsEx48JQB62WJBkR4d2wI13ZZaGOVSHx/WwpEIaY+BBKiKm5SEMwoIZAwez/ gSQV1x+4RKsT81RE0X7dVBciX3hikRdodrdnlrYqV9pYAZAh9qSeftn8sTc7OBwtWB/e zwgAUFw4F6rZ4yHNgaFeGqdadk9AWHMQ4I4dVR7RsMTuwOvFmnUQxqCjZFnUpchvJ7Ft YvmqSDdOtFvf/no3LahcfiXGZYlFAonCWcriOJT8hTlbY/FE/5RY34QEHWucekMAPXyf hTTAv2G2a9iOA/R4FsxVD/9FJtUW8kwm5uzcEbNEo59RRFit4PJLfrkDaz+l9zml2JkI laQg== 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=+ARaniFDDFcPbwrQ9i4G6DulD6qm4S6fwN/MsxxmP2k=; b=SCERbLdqsRi70JCxfpYxi83NBvEyFtGfMfgPBo86AMryyDtkZf5YVkhy43IQaJCcFF Qy2tz1t4+c1VOxMBP+MPIojKz2ckzA0YocrIMQDyYn+Y9reb9OGq+rylVG568TrMp0eY WK3YZ3u/CKnqWD3M0gt4b7rYRq3mGre3aNVzJyPpzZluhlgONbaBnUMEnVnZm6qscY4b yy8mrPbAYzgiMX7ZUAH0XwCJk4OAOPek9X6/uQKSF+stFiqkcyfSC0esC0eeHCIhjCyU jX7irGM99jcSWetwY3JQjLxTZj6L/666EREA724ycBAfdbsxbArM6/QuewFy/MDmZdTF KBPQ== 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 l4-20020a170902f68400b0019663019e60si10479645plg.174.2023.01.30.11.57.34; Mon, 30 Jan 2023 11:57:46 -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 S237887AbjA3Txc (ORCPT + 99 others); Mon, 30 Jan 2023 14:53:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237635AbjA3TxZ (ORCPT ); Mon, 30 Jan 2023 14:53:25 -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 1F4093F283 for ; Mon, 30 Jan 2023 11:53:23 -0800 (PST) Received: from dslb-188-097-040-029.188.097.pools.vodafone-ip.de ([188.97.40.29] 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 1pMaDN-0007S2-Sm; Mon, 30 Jan 2023 20:53:17 +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/9] staging: r8188eu: change function param from __queue to list_head Date: Mon, 30 Jan 2023 20:52:56 +0100 Message-Id: <20230130195303.138941-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230130195303.138941-1-martin@kaiser.cx> References: <20230130195303.138941-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?1756478744576584729?= X-GMAIL-MSGID: =?utf-8?q?1756478744576584729?= Modify the dequeue_xmitframes_to_sleeping_queue function to take a list_head pointer instead of a __queue pointer. This is an intermediate step towards changing struct tx_servq's sta_pending from __queue to list_head. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 4e49f1d49eb5..3117db41d749 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1788,16 +1788,15 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra return ret; } -static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struct sta_info *psta, struct __queue *pframequeue) +static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struct sta_info *psta, struct list_head *phead) { - struct list_head *plist, *phead; + struct list_head *plist; u8 ac_index; struct tx_servq *ptxservq; struct pkt_attrib *pattrib; struct xmit_frame *pxmitframe; struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits; - phead = get_list_head(pframequeue); plist = phead->next; while (phead != plist) { @@ -1834,21 +1833,21 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta) pstapriv->sta_dz_bitmap |= BIT(psta->aid); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->vo_q.sta_pending)); list_del_init(&pstaxmitpriv->vo_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->vi_q.sta_pending)); list_del_init(&pstaxmitpriv->vi_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->be_q.sta_pending)); list_del_init(&pstaxmitpriv->be_q.tx_pending); - dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta, get_list_head(&pstaxmitpriv->bk_q.sta_pending)); list_del_init(&pstaxmitpriv->bk_q.tx_pending); /* for BC/MC Frames */ pstaxmitpriv = &psta_bmc->sta_xmitpriv; - dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending); + dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, get_list_head(&pstaxmitpriv->be_q.sta_pending)); list_del_init(&pstaxmitpriv->be_q.tx_pending); spin_unlock_bh(&pxmitpriv->lock);