From patchwork Mon Dec 16 17:03:38 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: 11294735 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 82210930 for ; Mon, 16 Dec 2019 17:06:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 601B0206D7 for ; Mon, 16 Dec 2019 17:06:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="KKWYwz1h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727404AbfLPRGd (ORCPT ); Mon, 16 Dec 2019 12:06:33 -0500 Received: from mail-eopbgr700045.outbound.protection.outlook.com ([40.107.70.45]:49121 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726881AbfLPRDt (ORCPT ); Mon, 16 Dec 2019 12:03:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l7RzTx+FaQRhnzyeAoRMiKl0Ehy+3dstutNDusyFoABpkFYzWt5J++no2/T4WrJXtD+5hAmrIw2dFD+/l1UG9WYNINGZXGnr5LyZaa/p6n+PoK154Yhp99LE4C+9BSbxCXykKahoJnfC5H7wdpgff+uOx/s5QPgJIAv7hRdVZDq8UTlOFdMoQl3Y9E0/5kpglKpgmbhycbEnZodHv50H1A6ZKgjvqnH1AZ/TZMl7fQFNz5nioNRoBn8HPu9aObXBZPCY5ZGzfmu/ehitUHunY+jJiuV+fAB7MqgtY5Lwcq/NJFh8ZbfYNBTN5Z/Y35EkoUs03xf8E6AsbGvwvSzjYw== 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=GTVxThjHPp7A2J8r0FnOTY1OMMQuMr5YdLrVCSr3MN8=; b=oN7Buq6wxVXF0Jvn3jFa0BEB2O53qXVLjN+JPTGSXWGK48meRycQS3n5JuE4bMKpOKziXUSRUHDOsPMUqPpuoZUT3o2GLEzY61+wbR0arwIgf0SSUxJ7MXtcixoxXl80u4QdfUZYMujQDs8I3OudWwt/fTsR8w39yKaic9jWAohOjQj5ZR5BnOT/Rgzm6MfRXUOProg4kKR5ergl9L7NMgQl5TtMZBYTQu4sWbVcrCnKeUhCwMoGRIOD22damFgDphWLQ4VaC61p2L9fpYDDMQ5fxCR39aIiqmjvd7xR3+Em6WTHu61XjRTYMEGUF7hVc1dj7qClDh7S5vZzsR/vfg== 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=GTVxThjHPp7A2J8r0FnOTY1OMMQuMr5YdLrVCSr3MN8=; b=KKWYwz1hZqoP4npe97UYC5eBq3rdJphhwzuQcyyQ0WD2pN8d/zLn6ACl6rqR1wQEZtQ94aHTUJTXm8IiE8gGO60TxT3JyxS6E1iBWhcOlWMAiiRaX8M3zW8rfqhwgEcQsJZcwsVK4l2hsiaMYR6mr2h7Xc02V+65vx/WJsBvnGg= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4351.namprd11.prod.outlook.com (52.135.39.159) 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:46 +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:46 +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 10/55] staging: wfx: fix wrong error message Thread-Topic: [PATCH 10/55] staging: wfx: fix wrong error message Thread-Index: AQHVtDLCZKW4yzlWmUyCoKdTHIB+DA== Date: Mon, 16 Dec 2019 17:03:38 +0000 Message-ID: <20191216170302.29543-11-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: 92979376-5e99-4839-86bf-08d78249e9f8 x-ms-traffictypediagnostic: MN2PR11MB4351: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1332; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(366004)(376002)(346002)(396003)(39860400002)(199004)(189003)(66556008)(66446008)(64756008)(66476007)(76116006)(85202003)(91956017)(66946007)(4744005)(54906003)(107886003)(4326008)(478600001)(110136005)(71200400001)(6512007)(81156014)(8676002)(81166006)(186003)(36756003)(2906002)(85182001)(6666004)(66574012)(1076003)(316002)(6506007)(5660300002)(86362001)(26005)(2616005)(6486002)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4351;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX: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: lJX3Ixp6fpSP91nkY3IquSTq8ORs4QGcMRY1HWBEE7RiOopEzIw+QVa1ITgF/TIHzxusnsMt9mRC/bMK1OAHbqh1BOCLavmpsJcUojvtMqWzfz6yIMqmMgHsb7mpZWNp+5q9Hb6P3PuNzlIdpRUOQOxERYJUvAe1l1vQExYM/usASYIEVvAlBOA6RL9txGUh0aC6VFB4s26omh0GyovzTnnvU2KvEkXETRQtc9DwRDudwGpdWjFBztBPHDybKFZD3UflWZ2NbALJY0MuQxTzcjuGmSyErIs7mEnDMjcMZO9AGCbheZl454SqBG+m/K0Syuvx90WpWjEVUbeytLixlPblAo4ImGLTbzZBCRWvHdJfcFZNF7epon1ztZtVEVucl2E0UNn8j9Qg0bNNBA+4oZLXXMCkyDJwtd7bDmA85K8iEoXUXWLrGjX7RAyspXPy Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92979376-5e99-4839-86bf-08d78249e9f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 17:03:38.6242 (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: hXfpOBwBXN/uT7/D3crJ0NrGmFeeCTU0M1lokA7e7rI2GXZWW9wEjhz9YeZTUfm0CMbgk7eRU2su2FVFJ3zYyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4351 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 &&