From patchwork Tue Dec 17 16:14:40 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: 11298181 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 3975014B7 for ; Tue, 17 Dec 2019 16:20:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 165FB21582 for ; Tue, 17 Dec 2019 16:20:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="M0TTB5GF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729235AbfLQQUN (ORCPT ); Tue, 17 Dec 2019 11:20:13 -0500 Received: from mail-eopbgr680046.outbound.protection.outlook.com ([40.107.68.46]:59543 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728562AbfLQQO5 (ORCPT ); Tue, 17 Dec 2019 11:14:57 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LWB9QzKMG/zSrCUV7QyrSEBmcOqM6sgoIyO5pOXOPMUQmi/RM75HCe277ytuiICk+9iXuI4kz38gDXg8L6gPPTCh3r4cJmRj+Dr6hx1lULJjV51S2WWm3OJDMrCHByvgeC2DCLXb19YX7chdU+i2H/WymSnOrAxOoXKmGeFo7CNafXi4tYzpF9gb7BNg0d+WvwO2Nr1s2wt+FFfgYsJupjZtON72n9D6whtd+gcLPVV7OE/qcIlTgomEQJa3+8WkfDs7Vtullmb8st47dQd2cWl3gcWUGuSQWeHtbYxXLIyLbVI57ERNLzXo7Y9GKmVzg8FGes46jbpcTkhKdZK6eA== 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=AcvybTTVTamf+RrwBqacwKQHYq24pZRweh1D95BxTnI=; b=CuiH1QG3FJC1hAwQHV6WQJrtJyX568lcwkkKW/W6I6ROWu88yaEwKieBQFzc9QyH5gZsmgstjv9O4rLaxleUNOpdx1/Jda09Q3E8MkczO1k7o5/vuJ1V3ZnfHLa9r/i/pfhU3nBjYVTXtwQM9KI26tkFCl4Q6tSp3wsGfCdHArP5+VVn8AxtSxExj3/z6G3nkPWbe5pw4VecSreeSaSJl/8bX3YlhS7AhZ18wzNoeod8A1NH5mLmVDALrH/OGCscvtoUGAV/+ScfKmIdNZ19oBflEb3QL9BDZOsbQ9+NYBpKLw87NWEft0yzY64lzaiyggKJPweJdzGu5vItDDe/kg== 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=AcvybTTVTamf+RrwBqacwKQHYq24pZRweh1D95BxTnI=; b=M0TTB5GFMxGo3HeUzhE/qCs1XSMVBnNr8vvBi2gfGOXDnaELoZp6IYTlUflyuYEuT9/VHb58g2gZNTjbSOa0uWaYy/qRrEnAEuD11X7x0j2wdIGjjl9x31JZbJtsX/NdEaqw2jttmOweFZQhgIA4Q5vYckqZFJTa6EeEM9ivtKo= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB3791.namprd11.prod.outlook.com (20.178.254.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.18; Tue, 17 Dec 2019 16:14:40 +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; Tue, 17 Dec 2019 16:14:40 +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 v2 10/55] staging: wfx: fix wrong error message Thread-Topic: [PATCH v2 10/55] staging: wfx: fix wrong error message Thread-Index: AQHVtPUVrSiFmMNkWEC934NjM6UjPg== Date: Tue, 17 Dec 2019 16:14:40 +0000 Message-ID: <20191217161318.31402-11-Jerome.Pouiller@silabs.com> References: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0174.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.24.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 855e5d70-dae4-4309-139d-08d7830c3803 x-ms-traffictypediagnostic: MN2PR11MB3791: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1332; x-forefront-prvs: 02543CD7CD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(366004)(346002)(136003)(39860400002)(189003)(199004)(2906002)(52116002)(107886003)(2616005)(86362001)(478600001)(6486002)(4326008)(64756008)(66556008)(66476007)(81156014)(66946007)(6506007)(1076003)(316002)(66446008)(8936002)(71200400001)(81166006)(5660300002)(36756003)(26005)(186003)(8676002)(85202003)(4744005)(66574012)(85182001)(110136005)(54906003)(6512007);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB3791;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: 4BP7tOTjFvLKsUa+7LIi49gJYzWELZz3io50aek02iIp8sGJvtFRb0SrKpzGdeA/mE8rKN0Wc49R3PVH+/fCtakOllOSpuu+UlypBcJ9iwRT2V/97+oNEdhyNmY2XrwMH0YQgMYk8qYYXzpl7QLLIz7f+eiaFFJQE6aRKt8wT+tGMGIlrRZUgkj3ZzPo+gjx2Dh+mqO60lGLzkR+me4q2OMFnvjuqvfnnDZ98wHmYaVZ+wxuS160MbIrItt/yn8TtRu0PcouLanwXFD8s7h+L/WDe7+HIKvgkUsYZnnLRilMGV6Q9lvMwwOnTPf56lHlyAMtwY8ydO4bi3Mm2OZz35z7FhdY4ip9a6AUZj3O2ZlSH1rTWiwMgaSeYHi684JmKMrJmw9bref+dhtD7QYi252wtZbvCWvWTsea2Fe74RsHlIIUwbb4Yd4CjNQmU1rU Content-ID: <8E6896790DE8A14084D0645F1203DF86@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 855e5d70-dae4-4309-139d-08d7830c3803 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 16:14:40.0405 (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: n6h8fKh6NyE4CIAlE/xI8hqpgx/GW7r4OCsD8lxet8lWTy9QC8tb2G1wA/19XhIo/W4JLuJOEhwcP/Fwa0EPCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3791 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The driver checks that the number of retries made by the device is coherent with the rate policy. However, this check make sense only if the device has returned RETRY_EXCEEDED. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 738a6ca5edad..32e269becd75 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -748,7 +748,9 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, struct hif_cnf_tx *arg) rate = &tx_info->status.rates[i]; if (rate->idx < 0) break; - if (tx_count < rate->count && arg->status && arg->ack_failures) + if (tx_count < rate->count && + arg->status == HIF_STATUS_RETRY_EXCEEDED && + arg->ack_failures) dev_dbg(wvif->wdev->dev, "all retries were not consumed: %d != %d\n", rate->count, tx_count); if (tx_count <= rate->count && tx_count &&