From patchwork Wed Apr 1 11:04:05 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: 216144 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 28D9DC2D0E7 for ; Wed, 1 Apr 2020 11:05:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E93F92078B for ; Wed, 1 Apr 2020 11:05:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="Y5QjFHLS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732580AbgDALFf (ORCPT ); Wed, 1 Apr 2020 07:05:35 -0400 Received: from mail-bn7nam10on2084.outbound.protection.outlook.com ([40.107.92.84]:6083 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732561AbgDALFe (ORCPT ); Wed, 1 Apr 2020 07:05:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CgZX1sVmmmsImtvIFJXGN68MmR6nkJUBC9vAOQj5pK0Tky998kAZXmmp5NlGf+mqmj2oUmAnnCiDgqLikEn5FqC5v1WfOnu6Z/Xid2U5AJaR7TZY7pTigbNDZBx3zem6M83OfnA+0G/YfMk8IqLdAQPK5LPiSOMIdWmvXo5iSzBt3lDLFS9p+6Fk+NACoG+LMO6br5pUzDivPO5nkxjLweEAfCTxEzf9jqG0fjU0nijiuAHNzo5i+k8VfXL2JcJEzX3y7KC+XtIY67ynJOAYiMK1lBP4d+tkFaWSy5h9WR4wgUXLfGZhvkC/qGc0exWU7WV7YdqW9hdnUrlbYP4Ybg== 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=RPrxWdWGNJvYjUT2owohbDyOyC0Vbtfc7ra7B4ROlWQ=; b=BR5+gGsllV6XE30EYTOXrpuesGKnj3fu7Si7rTskYWmLcpuA0CLmdxStu7Z3fKO0Y3xMhQ+VFBr/Qf48fSsnMxPI+1+yQeEdm3o1m1sYYwuJrHuE0cRjkZs1aHIMX4LT7GCAYT7JJ3fzxUUn1G+AF8qsDmVz8LeAPkwn8TK8mj2o89wUSbbktwBBIkqk4CB97vn7PbpZvuWkKk+DnJqdunRJYSEzuNiALb0HiRzsmI+Xv0ddhJ2pDJ/BpGT+GQoRnSYPl+lRfnsLfiCvNVfOIIkN6l+7P6eEjbOqlUOb/RrsC5NV8AECcHVQ9C3+4JPELQs4XvqaKppDbRlATN7gWw== 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=RPrxWdWGNJvYjUT2owohbDyOyC0Vbtfc7ra7B4ROlWQ=; b=Y5QjFHLSt+COTKOYugvB7uaQi6yDAfdAuLXrVGaKOYzSlFK4c5+aibM8+qvWUziGzLwJNOXlErbBHcTEupDyd5QIpj24OxqYA0Mu6XffXKlQ/EoNt8i9dnlX2nGEfYDelOyRGJ/Yq7u3O9aVRKAovM61b+WstvtNdSt1US1gJCY= 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:27 +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:27 +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 32/32] staging: wfx: remove hack about tx_rate policies Date: Wed, 1 Apr 2020 13:04:05 +0200 Message-Id: <20200401110405.80282-33-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:25 +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: 32e0810a-ea3f-483a-d92f-08d7d62c953a X-MS-TrafficTypeDiagnostic: MN2PR11MB4285: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; 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)(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: h1qeSPoIe//HHNak+pSUaABbmyQA0ggmemurZGzVSDHV+lsH1cpN8OAf/8aU4nhNl0W+3S0iqUzRf+2AGzPtIB8LzaAGwbi0U2IROY0z/HutS5cP1QrwhV6Bzwf2Jbgq84UJdSMBZDM/HPHK+CN2EeGiFv4X5gEndVIxxSoQPgs3zMPVtj0VtBKC+NifTRRZnUL78bUn/8KakfJc6CMldLkJ75r4hH0FV2OwO3MZ1FJw6xTCHlcAtvdgkmP3ui9VUleakgYwEaihpYz4eTr0tZOqcASrNdWYjnMImVuDpFldletzn8xt6aITj9NDg2w76doZWWs24uN0DM6NR35H/vRyNYHu+3j+zioeNVv90im0AtQu9NbXvMauWve8Il+2uogWtkVzMrnuC9W0cdl1wLy7pxk9BLl0dhYhokril2d2xDh8WaQ5c0PiS9/Vqy3T X-MS-Exchange-AntiSpam-MessageData: cvMgiYPn/2TlNtXfy5qZ+kggf3E9UStRlG5XJFEfPDo+64PfnBui3mS9D/ojNBsxW0L3Txg98ge5VDT8P2bdIlWbtcKymJBAyM+BBJAPG4a11S5Th6RcKlpyE4s4aYfU3cBveRbDKrKev87Fze31x51r4jwqVyqCIgCjvT1IC9CpytbrtIbDQ14EEIEkhUw/Tttaho/x7jogPwVT9usICg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32e0810a-ea3f-483a-d92f-08d7d62c953a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2020 11:05:26.9909 (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: hauASE1EqdAfBmoLfcj8lpqkFGCLqgziLNRUVpvY5P57dY0ZtCHj09C+/vr5CUxg++HO6VtWmxvzV914g8KgQg== 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 Current code contains a weird hack to avoid switch from 54Mbps CTS to 1Mbps. However, we have not been able to reproduce the problem and hardware team don't know any defect of this kind. So, it seems this hack is no more necessary. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 53 ----------------------------------- 1 file changed, 53 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 1d9a8089f3d3..93ed0ed63bb2 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -51,59 +51,6 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy, if (rates[i].idx < 0) break; count = i; - - /* HACK!!! Device has problems (at least) switching from - * 54Mbps CTS to 1Mbps. This switch takes enormous amount - * of time (100-200 ms), leading to valuable throughput drop. - * As a workaround, additional g-rates are injected to the - * policy. - */ - if (count == 2 && !(rates[0].flags & IEEE80211_TX_RC_MCS) && - rates[0].idx > 4 && rates[0].count > 2 && - rates[1].idx < 2) { - int mid_rate = (rates[0].idx + 4) >> 1; - - /* Decrease number of retries for the initial rate */ - rates[0].count -= 2; - - if (mid_rate != 4) { - /* Keep fallback rate at 1Mbps. */ - rates[3] = rates[1]; - - /* Inject 1 transmission on lowest g-rate */ - rates[2].idx = 4; - rates[2].count = 1; - rates[2].flags = rates[1].flags; - - /* Inject 1 transmission on mid-rate */ - rates[1].idx = mid_rate; - rates[1].count = 1; - - /* Fallback to 1 Mbps is a really bad thing, - * so let's try to increase probability of - * successful transmission on the lowest g rate - * even more - */ - if (rates[0].count >= 3) { - --rates[0].count; - ++rates[2].count; - } - - /* Adjust amount of rates defined */ - count += 2; - } else { - /* Keep fallback rate at 1Mbps. */ - rates[2] = rates[1]; - - /* Inject 2 transmissions on lowest g-rate */ - rates[1].idx = 4; - rates[1].count = 2; - - /* Adjust amount of rates defined */ - count += 1; - } - } - for (i = 0; i < IEEE80211_TX_MAX_RATES; ++i) { int rateid; u8 count;