From patchwork Wed Apr 1 11:03:37 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: 216146 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 6FC1BC2D0F4 for ; Wed, 1 Apr 2020 11:04:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30C6D2078B for ; Wed, 1 Apr 2020 11:04:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="d4WcK8K9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732307AbgDALEx (ORCPT ); Wed, 1 Apr 2020 07:04:53 -0400 Received: from mail-eopbgr750040.outbound.protection.outlook.com ([40.107.75.40]:63459 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732286AbgDALEw (ORCPT ); Wed, 1 Apr 2020 07:04:52 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VOFEOEjVD+QWLRay/yiAxhJvmhKuQCICWdl0aISmrDOqiliTGVfTI9RKhe35ofL2jaWu0/S6OnADSwFlL+HhklZ6zea3jJu3xMdRK5ym7ATul4b6LBPSv8/HHB8k1IJGRjhhXqf0FqYejHDyFeIUpgP1RAJ7AOJ8jqPykNxGQEB+allRj1BtcE/4RuRUFOdwbur/GDpgH7DIrvXSJ3AhjyMbQWVZhD4JxA1dgb1sWV3HZURW15puFpau3eM1dbP+eMjIA/39BCHnW3DMoqTa4YbEUPMPa8ei5OhMWV7PraKHESZhwKIMjybKtgbvSxM1xSMUYI/ngtUaTB2Z6X0f+g== 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=VCPfkgAy3PBH9pmlJ2GN6+ehAcOpqsxtHV6Sw/Zy33U=; b=jWF0xycvMpj5TQwVUq0+p8snX8SjyuJbaEw+JWSysrQ1Y1+iYBy+zotWiU79noQzMGTg7gwIt3QP3xi7CvYrkPGnF+HICvlkwBWw27xGliM6VswGSoaJTmDZEr/D8f6zLH3Yluc2Ogc1VEg8cKsexIgVH5xJghj+tiOaIFqk2qOy1RlZW70R+z3DTUNSHo06p2JUDA+cs61Ttwe0dHOFRUfOQfGn0yYv/EHIGQrfqiapWunh7Tw92szgl2syyd5i8NCzT9kBhKxCqVzEsS49jNLQk/CuJgQ3SUgBSgBdWHO1y1/mx7svGfn5cw9xICvEuLuv4nQ5xDthXRJAbmcsSA== 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=VCPfkgAy3PBH9pmlJ2GN6+ehAcOpqsxtHV6Sw/Zy33U=; b=d4WcK8K9Mno8uQsFQdWNlY8wMiZu/CdTvAAYfUlPJjqQWqquhLh6a38/ecA65oavCchAE+Af6KYzOZ3xmwBkkSPmXSG4926sTce702YWG1D9GwGAwX/GPekhbbsL1dRli2sPvqtdLEQlqHI/OWLZXhp8EvYYxya8nMKtgMq4oIo= 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:28 +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:28 +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 04/32] staging: wfx: remove "burst" mechanism Date: Wed, 1 Apr 2020 13:03:37 +0200 Message-Id: <20200401110405.80282-5-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:26 +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: 4ff242e7-ae5e-4d69-5e79-08d7d62c7259 X-MS-TrafficTypeDiagnostic: MN2PR11MB4285: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; 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: +AY4YG2a8dOuFd4ioDfku/EX98dB6qTeLmwCmln+/BGpR6opoIjHeO9leB7MOj2gtTEavd5tXLhDxdNAAonQRClgFJ9FWYyh7QoNGzC969Y+SxYvpGllFpaAf7BmZY+s3Mg+es8okbx4FjXHjwd28TW2InndHzNduQmkMShjJ8KtwOnFSigzVNfa8kSEl8ptxeMRrOh96f2nGfSfPKfTQekesfcmT9ZhLtIZWBQYXZd65qXjRFz3r1kdFDPSVQ2KMQTEUoUoBva/f+qxpGZ/nN+gzj/zsFIu0NSU9h1dpaGWGr6FDwnzI8rSpPJD3la5mzCOWre9vbI4BTnx+n0AKfjeBqp/EROaGH2++AcFMmu/Dc/fpx3hhPiN/if6q/Yp0YGFPFT089VSdIAurr1zFkjWSjMbNy9oJXNNilQHbAkK40swxjFO/GAh64ES6xhf X-MS-Exchange-AntiSpam-MessageData: xXe0dl6NfpvRM9BLYGog+973QAiCd7yl19sl2HLy5bsGC2cie/GAxzb1CdhlTbTe4u7qAd+32QCpTJX/XhiiTnp4lA7rIB3QoHVME6FoMHaihHkKtq4YzJ1Tqojp36oII4ZMK7Bv9VmtbzJnCOLazATkuaSLZs3NZ6J9Xah+xnvWnYWlAiR9NpyGmMZW+E1gSBC6s/05Dz9c4j3rJfFiWw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ff242e7-ae5e-4d69-5e79-08d7d62c7259 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2020 11:04:28.4317 (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: D0yk9RTittMVyxHYxdafRTCt6xcfC3Z9XSoNm6X4Be1n+NZ8eDZ9ZEKLaWX4W81nOKhbayuNO90KDjbFqgGwgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4285 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller In the old days, the driver tried to reorder frames in order to send frames from the same queue grouped to the firmware. However, the firmware is able to do the job internally for a long time. There is no reasons to keep this mechanism. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 23 ----------------------- drivers/staging/wfx/sta.c | 2 -- drivers/staging/wfx/wfx.h | 1 - 3 files changed, 26 deletions(-) diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index e3aa1e346c70..712ac783514b 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -363,8 +363,6 @@ static bool hif_handle_tx_data(struct wfx_vif *wvif, struct sk_buff *skb, static int wfx_get_prio_queue(struct wfx_vif *wvif, u32 tx_allowed_mask, int *total) { - static const int urgent = BIT(WFX_LINK_ID_AFTER_DTIM) | - BIT(WFX_LINK_ID_UAPSD); const struct ieee80211_tx_queue_params *edca; unsigned int score, best = -1; int winner = -1; @@ -389,14 +387,6 @@ static int wfx_get_prio_queue(struct wfx_vif *wvif, } } - /* override winner if bursting */ - if (winner >= 0 && wvif->wdev->tx_burst_idx >= 0 && - winner != wvif->wdev->tx_burst_idx && - !wfx_tx_queue_get_num_queued(&wvif->wdev->tx_queue[winner], - tx_allowed_mask & urgent) && - wfx_tx_queue_get_num_queued(&wvif->wdev->tx_queue[wvif->wdev->tx_burst_idx], tx_allowed_mask)) - winner = wvif->wdev->tx_burst_idx; - return winner; } @@ -454,7 +444,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) u32 vif_tx_allowed_mask = 0; struct wfx_vif *wvif; int not_found; - int burst; int i; if (atomic_read(&wdev->tx_lock)) @@ -518,18 +507,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) if (hif_handle_tx_data(wvif, skb, queue)) continue; /* Handled by WSM */ - /* allow bursting if txop is set */ - if (wvif->edca_params[queue_num].txop) - burst = wfx_tx_queue_get_num_queued(queue, tx_allowed_mask) + 1; - else - burst = 1; - - /* store index of bursting queue */ - if (burst > 1) - wdev->tx_burst_idx = queue_num; - else - wdev->tx_burst_idx = -1; - return hif; } } diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 9d430346a58b..a275330f5518 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -531,7 +531,6 @@ static void wfx_do_join(struct wfx_vif *wvif) wfx_set_mfp(wvif, bss); - wvif->wdev->tx_burst_idx = -1; ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen); if (ret) { ieee80211_connection_loss(wvif->vif); @@ -624,7 +623,6 @@ static int wfx_start_ap(struct wfx_vif *wvif) int ret; wvif->beacon_int = wvif->vif->bss_conf.beacon_int; - wvif->wdev->tx_burst_idx = -1; ret = hif_start(wvif, &wvif->vif->bss_conf, wvif->channel); if (ret) return ret; diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 8b85bb1abb9c..116f456a5da2 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -51,7 +51,6 @@ struct wfx_dev { struct wfx_hif_cmd hif_cmd; struct wfx_queue tx_queue[4]; struct wfx_queue_stats tx_queue_stats; - int tx_burst_idx; atomic_t tx_lock; atomic_t packet_id;