From patchwork Mon Dec 16 17:03:36 2019 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: 11294725 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06BE01580 for ; Mon, 16 Dec 2019 17:05:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF51E20717 for ; Mon, 16 Dec 2019 17:05: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="h+Uc434Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbfLPRFz (ORCPT ); Mon, 16 Dec 2019 12:05:55 -0500 Received: from mail-eopbgr750081.outbound.protection.outlook.com ([40.107.75.81]:59109 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726922AbfLPRDu (ORCPT ); Mon, 16 Dec 2019 12:03:50 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k7VtEWdPRq5DnULIdIRFXioSU2QUtqSDNiCqxj8Bxr5MpgO50hUNbGVsie1zKtOUQhQFIeVWhG6VAHFgJvIaVueIgjH28KYLUoFRgDFq7/5qstVp1rTizsvZWNQ9ywlLV0pZA88WOg2auKQ3t5LOwTzvn8FmItbYIWCNBGUtN7cRH+/1kuMeAqO13ioqZL6RAhOiK+d9/aVA2SHSOaaQ1Vpv08smaJ3EgGNZJBO514WvkLz/DESCCENZ/V7VQj+16K4zlyWSAnRe81JrPINNDTmvT0XBOHAnHakxLRWekWXJtuXPzO7+Zy85+vG5bwMIIlmKAw593K8FqFasnaItjg== 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=IEOwGuXdXRIto0oo457DaTZyfUjV59QqHiZcKzdMaLY=; b=bRnvyWmrWA5FiUn8ZNg7zEwMQ4uK5Fq+BoLND7dIboJQgkMrkMlhHWYf8nh8m7aIyDhACOt3Q95Q0h2FACPcOvfQ6a57Cnhn8gDG2Qn+T4cXR28LmUDKM/rqAKOgkC8ehFmMDkWhhmyhcEXAMUd4LfZSrXhcBn4JMY4qJwQ87ZHY0+W+oY+RhFaqGz+KpdDFGkKCgewwRoxO+r7tBD/XlUdS2FqslIDDa49flw1j9fwQMNgYQYSbBS3RxAZMHbMt+y2DhnVL8XDvrTCsghtSVivT6COpjl874x+xfjDV9NVe3PVa49DPWbCWLdEUKTF+Zm01XnktdbtBY5bcRegfiA== 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=IEOwGuXdXRIto0oo457DaTZyfUjV59QqHiZcKzdMaLY=; b=h+Uc434YXt3Yck8Yg3Dv551DZzfojIDgaqcMnFh3v5uDJAidHvNLH3yCzzy49hvRdqWim4XnMQbjUglI9WLXtQKVP/4YeiKV24uwNlWe3a8/m60sO9MMqKvb0vABcba2BYl9o/NUr+VCfSanh61tldqlTtoIaHExC/zcnAKzPOI= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB3838.namprd11.prod.outlook.com (20.178.252.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.19; Mon, 16 Dec 2019 17:03:43 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2538.019; Mon, 16 Dec 2019 17:03:43 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= 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 07/55] staging: wfx: ensure that retry policy always fallbacks to MCS0 / 1Mbps Thread-Topic: [PATCH 07/55] staging: wfx: ensure that retry policy always fallbacks to MCS0 / 1Mbps Thread-Index: AQHVtDLBov0Pg1nqV0CYOt2kPrSx7Q== Date: Mon, 16 Dec 2019 17:03:36 +0000 Message-ID: <20191216170302.29543-8-Jerome.Pouiller@silabs.com> References: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fba85927-32fe-4ded-dc22-08d78249e7e1 x-ms-traffictypediagnostic: MN2PR11MB3838: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(136003)(39860400002)(396003)(366004)(189003)(199004)(85202003)(8936002)(81166006)(8676002)(54906003)(110136005)(316002)(85182001)(6506007)(186003)(2906002)(5660300002)(6512007)(26005)(107886003)(81156014)(36756003)(4326008)(6666004)(2616005)(76116006)(91956017)(64756008)(66556008)(66476007)(66946007)(71200400001)(86362001)(66446008)(6486002)(478600001)(1076003);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB3838;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; 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: q4cgaCFbbtbbvwienuId7IpK2lB+j1nthONvKPOFhp4BPwJDM5NB8dSpTxtBN9j7ywDs6TN/g+QeCbibniRA7sSfX/Zuv9GE/yRZScQniGs2RHktf/0m6im90/yEfVK/3FKIfSD/06QCsTbDtUO8kRAorZhfr90TUZap1umCD6Lu/7f2vNDpxKjs4s6cxlYh1EFsUd3GhW2FgL0dvKu9YyDubDrSQUQXnIcnvxcQgTlqHJi/fKs+ZT23q5QCw7um+4K/TCwuITzlK6FYzvmliBG6nz7va61IjesufjHipRCqZ1A6m27cBJ4ROLBtebEBiBm2PAdW5UUduiZP1eScwCjufZkVpW2PDI830+tyoBVdHycDNd140+iICSTCDxjNrRGBrdhoGTX0nypiPZD3wWaGgO5JkmHs5ebBgburx71eBmdMeIWplnKpZEEHkZjH Content-ID: <23308CCBA6D4A0469272770443370CC9@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fba85927-32fe-4ded-dc22-08d78249e7e1 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 17:03:36.8822 (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: nqnHvveDJmPqqFgGLXSc6j7ms/tuQ+nVabDxryVbHgYUELk+WT6z7salSPQlbUngAkEg7glzYzZATtL0dvRwew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3838 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller When not using HT mode, minstrel always includes 1Mbps as fallback rate. But, when using HT mode, this fallback is not included. Yet, it seems that it could save some frames. So, this patch add it unconditionally. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 46ad83b95f52..738a6ca5edad 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -538,6 +538,17 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) } } } while (!finished); + // Ensure that MCS0 or 1Mbps is present at the end of the retry list + for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { + if (rates[i].idx == 0) + break; + if (rates[i].idx == -1) { + rates[i].idx = 0; + rates[i].count = 8; // == hw->max_rate_tries + rates[i].flags = rates[i - 1].flags & IEEE80211_TX_RC_MCS; + break; + } + } // All retries use long GI for (i = 1; i < IEEE80211_TX_MAX_RATES; i++) rates[i].flags &= ~IEEE80211_TX_RC_SHORT_GI;