From patchwork Wed Apr 1 11:03:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 221509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C749C2D0E7 for ; Wed, 1 Apr 2020 11:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 642C92082F for ; Wed, 1 Apr 2020 11:06:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="VBN58U+r" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732652AbgDALG0 (ORCPT ); Wed, 1 Apr 2020 07:06:26 -0400 Received: from mail-bn7nam10on2067.outbound.protection.outlook.com ([40.107.92.67]:6024 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732461AbgDALFN (ORCPT ); Wed, 1 Apr 2020 07:05:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CMzf+wbiNmbmyXhoWK1hYBAM/TAnWC+P6WwhX6hfUZ2tN242w33hCfmdVOIOVTbQWc0HV292pRMKZuFPqRqS0wbPRzvz6pZWiTArpLdRcwidae5iw+uRvzF7T2OssSkFK+VODNK6FZ4C6zIILteNviCDQmuVldCMpQedQqLdlRmHnXB10t03rLF0Pk3JVq05AfyIYR/efo+fAUqcpBRqZ13PfACMVC1erRIp5kFFLJw7czCUJnsm6xXx7QsBfrsUkReFqmPZUkIRs0dhFuCZzxoLlqMAmICZsbgAGfY+lOVBBINuglTh9jdPh+VEeJWCkxap5kPq+8VMvGBOU3fjyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SrPGMLsUEPUKhc3RhU1c5TMkTtuEHRylbkifV77yKIE=; b=KzjGcCvWYatJdYVWBLYloB56fHZIR3t3YbiqDm3dwQkqQmdl8jzB1tLtLZr8An7sAHnLlE0SisWhRR9nT88m2BMT1MMSwQ2wM+Rdoi2M/syL6gemRGzpLi4cHrcSiSdmE7wK3kv6SC25bZJ1fkLtVNO3gmvKkTWMUyeG8Zt8a7zXMF/cF5NjphGllr2f1cxPymk3r384g0aLHWC0V/Jfr47vr/BWPttVqQb6opaaF/xD6OV05TDpLcxu9sa4ICNMsBkruRXSe/tLUaXAs7cqPVF3RtU8AJd3y3q+3xn25hs8ae1kl1h10E3hvzgcYZ1tiztNgIaa+DHHQzmOCuHb9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SrPGMLsUEPUKhc3RhU1c5TMkTtuEHRylbkifV77yKIE=; b=VBN58U+rgULbzVWJvYWUm00f3Hdvq+I7JplszFDkQMSmBsv1Hy9vXjmCTvT2MZ3AMmaG1BLWQFNXqSAfaFtNKi69GbEkWXtc/j4DatXyZG5TqBD03NcwKFrn6wXOCkjkTXu8Rn6/tExbvD9XMUlLm5mCApgCYCDsPphiyud4Z0o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4285.namprd11.prod.outlook.com (2603:10b6:208:191::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20; Wed, 1 Apr 2020 11:05:11 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::ade4:5702:1c8b:a2b3]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::ade4:5702:1c8b:a2b3%7]) with mapi id 15.20.2856.019; Wed, 1 Apr 2020 11:05:11 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 25/32] staging: wfx: simplify usage of wfx_tx_queues_put() Date: Wed, 1 Apr 2020 13:03:58 +0200 Message-Id: <20200401110405.80282-26-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200401110405.80282-1-Jerome.Pouiller@silabs.com> References: <20200401110405.80282-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN4PR0501CA0156.namprd05.prod.outlook.com (2603:10b6:803:2c::34) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by SN4PR0501CA0156.namprd05.prod.outlook.com (2603:10b6:803:2c::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.9 via Frontend Transport; Wed, 1 Apr 2020 11:05:09 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 938b6c8e-ca5e-43d9-a11c-08d7d62c8bb1 X-MS-TrafficTypeDiagnostic: MN2PR11MB4285: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 03607C04F0 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(136003)(366004)(346002)(376002)(39850400004)(396003)(7696005)(8676002)(1076003)(16526019)(186003)(6666004)(5660300002)(86362001)(4326008)(66574012)(52116002)(478600001)(66946007)(66476007)(54906003)(36756003)(8936002)(316002)(81156014)(6486002)(2906002)(66556008)(107886003)(81166006)(2616005); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /vyoY46YSncBi8N6TLiuZ05Fl/YsDNq3A/L4Yj6BL1cbED3dASjytmxJZwN3QlgkSCIrCdNEu7WXibphrQYeQkEQFF5weoZJbmVS9eqIqh419n8pzlN4zpmhiKLLiJn/y79QwZCy9fl6UbUelq1+q/ynrC52wiHSTJpJZ624E1PAzdy7ib0Y4HTHSrjSeoBpmULQLWRDLf/AjT5Hj4fEJ6YfygNklrjByInkxryID1tgpDnpF+bl1++SvNGy6WYMgvSenY6RN44MFs+iEkH2jHEGG8Bg3nIDw89j+AjoofKy+QKdZTApTkduDcZCoHwp0ecJVxiijJaeXIXGSAlbynA2FnYsrjGUmG8M0mrbyelcJ63iBoxw+/jY77OMki7y3qKseb/nyBoHuN+ulw1Ek+I7GrQUjgZNPeAhUKP7qXcA5TangqeYsVBPCY5KnBpT X-MS-Exchange-AntiSpam-MessageData: m2xNRBDodGcpHi9FDDN1K73uDIgvggk321DDv3eugaX62e6jHbDHaDjIpTedDkeT2hxu3TRbkDLc3XhGvJpUOcS+ofKHd9sXEqyS6w7mdCeO1ao9MmlgGQMbFUH8BVSe+xWT99P6/hBgQwfQj+XWPm5MO4mykDhkQZpnrzeXP+s0YMbCcNTTR5w+oY93Tk5FO4q+SBTuM+0QIm5EEW1dGA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 938b6c8e-ca5e-43d9-a11c-08d7d62c8bb1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2020 11:05:11.3549 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pcDAsAAzybDjXMMKAh+otitrW8ToJwR6+VACUCHYVmw1cn8/oe4jbVr7+C8GD2xIZmg1jwZpkXSQPiEWC09Y5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4285 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The queue used for wfx_tx_queue_put() can be deducted from the content of the skb. So drop this parameter from call to wfx_tx_queues_put(). In add, this change uniformizes usage of functions wfx_tx_queues_*. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 2 +- drivers/staging/wfx/queue.c | 6 +++--- drivers/staging/wfx/queue.h | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 2533d4f53f83..d2e925218eda 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -461,7 +461,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, // Auxiliary operations wfx_tx_manage_pm(wvif, hdr, tx_priv, sta); - wfx_tx_queue_put(wvif->wdev, &wvif->wdev->tx_queue[queue_id], skb); + wfx_tx_queues_put(wvif->wdev, skb); if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) schedule_work(&wvif->update_tim_work); wfx_bh_request_tx(wvif->wdev); diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index a03860db2f54..cc89bfe1dbb4 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -150,9 +150,9 @@ void wfx_tx_queues_deinit(struct wfx_dev *wdev) wfx_tx_queues_clear(wdev); } -void wfx_tx_queue_put(struct wfx_dev *wdev, struct wfx_queue *queue, - struct sk_buff *skb) +void wfx_tx_queues_put(struct wfx_dev *wdev, struct sk_buff *skb) { + struct wfx_queue *queue = &wdev->tx_queue[skb_get_queue_mapping(skb)]; struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) @@ -170,7 +170,7 @@ int wfx_pending_requeue(struct wfx_dev *wdev, struct sk_buff *skb) atomic_dec(&queue->pending_frames); skb_unlink(skb, &wdev->tx_pending); - wfx_tx_queue_put(wdev, queue, skb); + wfx_tx_queues_put(wdev, skb); return 0; } diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h index 241ca3039b54..4851635d159b 100644 --- a/drivers/staging/wfx/queue.h +++ b/drivers/staging/wfx/queue.h @@ -36,10 +36,9 @@ void wfx_tx_queues_clear(struct wfx_dev *wdev); bool wfx_tx_queues_empty(struct wfx_dev *wdev); bool wfx_tx_queues_has_cab(struct wfx_vif *wvif); void wfx_tx_queues_wait_empty_vif(struct wfx_vif *wvif); +void wfx_tx_queues_put(struct wfx_dev *wdev, struct sk_buff *skb); struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev); -void wfx_tx_queue_put(struct wfx_dev *wdev, struct wfx_queue *queue, - struct sk_buff *skb); struct sk_buff *wfx_pending_get(struct wfx_dev *wdev, u32 packet_id); int wfx_pending_remove(struct wfx_dev *wdev, struct sk_buff *skb);