From patchwork Wed Apr 1 11:03:35 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: 221516 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=ham 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 22950C43331 for ; Wed, 1 Apr 2020 11:04:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E00142078B for ; Wed, 1 Apr 2020 11:04:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="c7MOUuXf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732273AbgDALEq (ORCPT ); Wed, 1 Apr 2020 07:04:46 -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 S1732006AbgDALEm (ORCPT ); Wed, 1 Apr 2020 07:04:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hg8qBwBTc1cAkmcmuKTtaz6nesFi3aAqY4HRF4FXLUZs6mQyr1rhnWAZrF+TRag3Ko8P3a1TeQh60BaXwinRaQrUq0nokFNUVGAJD5b618QmM4CULnMYSXHlNEGwmAYU0jUMVnqjjG09wenExR30wV6bCMcdg+ytpfkGMnTADoe2NavDjRezljI4pnCrOWRdgvq1FXmscNpKTXGUAsuVdehWGZURMKt/+UD/hAvuLGAgmf0Gh5rkAjjQIJnDkaZnfbGzbQ3Vp3yleqjlxgNXShTxZaBgtYJYB1vQCij1fHDebJa73tqzbP773KSIEQPrkhmVuQ1JgHv7Z3LI/rFSyw== 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=fGM4LaUSzkuToWuyg8sMCdYGN32WYJxK4Mm/t0pV04M=; b=PhCBuTuQc7xGXzOkGh9jBohIFrImsX7K+gkLZIJorIgajuE3jDj7ff95dWCeCjpJXZn+XvfI+6xQFgKhl+f+DWMwdnbbik9+JB7vthHhUMTWwc2c0B0cUurXSVmO36hTW7EYesoZDUMzxY3byA2Ifn2+squgQue1sKLqFwzW5B8hXBNYlOBRsdqJMOyMwQr8zzjZScgDl4l10ikx8Qcl6dgV9VP/1rYy2irgl6f84PHN7BDtRRJYQwo7bsdcBor27iBR/wMnphVGllaO2NGnRnBTg+e9/0+i346Mh0262BOJGOU+o7rpVb0BYKYP2OpZEy0RpU4YNQvCWvMpWx5zZg== 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=fGM4LaUSzkuToWuyg8sMCdYGN32WYJxK4Mm/t0pV04M=; b=c7MOUuXf1OA0Hlg4SI8AiorhmGrDQ6TfGDW4UnD/xsIqjtEGuM5oPHjJwtxy4cgfcpOikRhXDBKCPBZkakZt/vNpWB8uCzoEEghhfrGtyYGNpGfnIWD5xeSRpCcfdiRvq4l0S2qcBN/EZAE/T1tk4QMyRvs7u9dC35HMsVRdE34= 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:04:24 +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:04:24 +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 02/32] staging: wfx: do not stop mac80211 queueing during tx_policy upload Date: Wed, 1 Apr 2020 13:03:35 +0200 Message-Id: <20200401110405.80282-3-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:04:22 +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: 7cbcb3bf-019b-461b-4a1e-08d7d62c6fe6 X-MS-TrafficTypeDiagnostic: MN2PR11MB4285: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; 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: YLOTzXVBTgigxc+OSBOA2VrCqEVsYglHdCb3CT02YkokFpBuDWPkxqmnu7Rt3kwXKB2NqM0h9bzKXM39EOvLJxfO+ppH8BJedjARqlyARGXn57EWbMPKX3wjf5mQC34acEktjjIIbct8soYzglvLg5Rjpq3afDiW02K/k/Mp8UvFhgVXB2gl7HavBroI/rtEyf72xzh6PxEQ89t7slstpTh/m7T+a7CwopO8c+Burj/RkbktJ5WHJkjuSqCJF0YHzsnSahS5ZAFz9dyXTnUuUQ76U6rYCx8hZt4sr9wzA9X3KI0ji9k1crB3j8dWkmC9Zc41iSqpIMApVahRmNh6oDfxyFQkiyAjCI2b5B/fxmJ7rKEqG5ZehaQW2C7I1QJtJSPB4WCE9MCpDTuN5DdJ1t040cWs2B+8Ey8uDlUIPH9kHXgjnlrv0mgGQtgC9hfw X-MS-Exchange-AntiSpam-MessageData: EeBVRa+tU8VKDBSXqi1Wi2J4b2+lfI93NywDoOg6qHeFI6fFwB8yKiCGDBazNGuXmJW00X3u9gnoyYoQsEouBjVDjGXzF1p8H+9Aey3weIkuv9tUdB7mtVC92J8pEtygnE5naGi0DrBU4Neki07+/elpuksGtyIlbH0vRsNMupTwSKVYRXRefmegHeUf7EC26RclwMhcVmoR0DpkwoOL/g== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7cbcb3bf-019b-461b-4a1e-08d7d62c6fe6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2020 11:04:24.2401 (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: sjTAoAcXVPHktbHSsst/XcRONJHO6OOrGGVPu/YRfKXQGWMnplVAz8V6fM1TRE8kiLT+sEJNb78cY/4xaljMaA== 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 When a new tx_policy has to be uploaded, it is necessary to avoid any race between the frame and the policy. So, the driver stops the tx queue during tx_policy upload. However, it is not necessary to stop mac80211 queuing. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 42183c70d4df..7a7c2518f6cf 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -244,9 +244,7 @@ void wfx_tx_policy_upload_work(struct work_struct *work) container_of(work, struct wfx_vif, tx_policy_upload_work); wfx_tx_policy_upload(wvif); - wfx_tx_unlock(wvif->wdev); - wfx_tx_queues_unlock(wvif->wdev); } void wfx_tx_policy_init(struct wfx_vif *wvif) @@ -379,15 +377,9 @@ static u8 wfx_tx_get_rate_id(struct wfx_vif *wvif, dev_warn(wvif->wdev->dev, "unable to get a valid Tx policy"); if (tx_policy_renew) { - /* FIXME: It's not so optimal to stop TX queues every now and - * then. Better to reimplement task scheduling with a counter. - */ wfx_tx_lock(wvif->wdev); - wfx_tx_queues_lock(wvif->wdev); - if (!schedule_work(&wvif->tx_policy_upload_work)) { - wfx_tx_queues_unlock(wvif->wdev); + if (!schedule_work(&wvif->tx_policy_upload_work)) wfx_tx_unlock(wvif->wdev); - } } return rate_id; }