From patchwork Thu Sep 16 16:49:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 513473 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 6BFF4C433F5 for ; Thu, 16 Sep 2021 16:51:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 591CB615A6 for ; Thu, 16 Sep 2021 16:51:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242569AbhIPQwn (ORCPT ); Thu, 16 Sep 2021 12:52:43 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:34431 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345738AbhIPQul (ORCPT ); Thu, 16 Sep 2021 12:50:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631810961; x=1663346961; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=E+fKYXhPpZ5rdm/yN7T/BYLkT8SFnvSX23T2wCPJcHY=; b=qcXtBr8Q6qXzC9VLysNL9Ne45eC7GDmZBKXf+2TC97zW8F0lBcb5BWcL asUv21cgJ/kZM6GJn2zDXw3vNMRcz1yF104g8nYM8U4TJ6wcgeL4oUkxg JYD/m6g859hiddX9KIoqarMGESTSMUK+0Q5Alb6rKsDhLx4z1rqPru0yU HLu96CXwaH1Pc/ZjrST4k9NSKuTj6y0IJRBda2IWu6WMhsc+7f1sbB/D5 gyHfttnwOyOsFEVhHJhXatQJZQ4UnWDOgRJUfNgwl8YqIX5RhMij2xzOd cwXe/EcQeFXB4wvkQ3LxUOh0g2I3XjjGYp365l9iuPSFm+jxC8rVAdU0D w==; IronPort-SDR: PzYVRgAbO+Jy/1r6gTv+ibf83eYXcsHe9q1wpUObyssnL7UpRxbroEvgHMn/I/hRQWWBmr/MUr O7Ch5jtQWk6XGu+FMsJVYbQvZ0+xPuOWDI/gvuN2lT6/pWeMqk5u7fw4cfMLdQP34GjVXsn99K byzPOlzlv09lGmQvg9HCJz6+zsLvTVnwZanuR/GOD2l9mwlDRilb8/Ff/6GwhBkZVPBiVD1ASs +p8DcnU+vw+qfPDJqqhkxChy8lJE6GI3dF63yezB2muLtem+777HAKf2xZkwgdV4PqKc9hOg9a /moGS0dxYFxk+odahlsP/8g+ X-IronPort-AV: E=Sophos;i="5.85,299,1624345200"; d="scan'208";a="144413533" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Sep 2021 09:49:19 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 16 Sep 2021 09:49:19 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14 via Frontend Transport; Thu, 16 Sep 2021 09:49:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFj5+8tmTjreIYu+WHBVXsEqUqfQ8aE6gAblFs3w+QjMKYqxwG77V3b7U1ZpdfJkgqoglwvpcnSs7yqNQi1TXOx7Ak6xIYGxQhoh6b5aw/x/o12Kp5e+N79YUL8oyUfX2yyiYnxRm5ftF960jucDcBF9nyHlCs1iGuQqZvJ7bifmQaCZHdTKHC8RQZ/dqvll3Xou+XC70UrxnPucoihdyPWN60BxvfiNsOF35NBUqOn0glXw0SgUxkc70Xb3Sm4WHCB3aFJfgjWrv2PJTkgw1RAy4rryEK46dPT1uVzkL5tXY9JpgKO/T7lDGtfUVJ1zJp30T6uiZleP5j2BPevWXQ== 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; bh=TaYqxODhF/hf47W5KjpDrfQ+J9Jiu8vq2mtaA3L6T5Y=; b=bkgTCt3qrWIpZWq5tU2rynVF4nT5lxBdpzj0P8/7od3jDi2j5P5HzdNyq2sfuSqf2dlCuLEW0MDjoZpFKfL7ym71I8uYcyaYp+tatTW7zJAcdBnmfSgChw1+nlM0SLjBOSdWQU7lTpp69dJHUaM+pXjtM4BSrdqBnDnZVKY5avUjej5SfjNTdxQDFjDboj6lHx5Mpw0K8xucvnSEZ4KR20PZUs0YAMhDniltFP5yOCy0sjy0891KUoH36TpWwnfPZqwWPACpZIZAJCEKC5Rub7wTAxLb4bMJS/r3/MF4+PpG/d8GOx+sa4QRfNldnknn/ImkKjAoUc0epDdEzYeLkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TaYqxODhF/hf47W5KjpDrfQ+J9Jiu8vq2mtaA3L6T5Y=; b=KaIiaPGgbvzVEYSGAc13jJuZ5DVYIhm9wATXzbIGuD8f72bb8z8Togmh0HiNv38ANTGmwJPK5MT75l9hvC9e7cMSoIEiG1yYtlSiVW8U1//rxGX38Uj2f5m/TC7egX/7hSCdlLTJmwfQcNHBbvmXfETSccJ/5JqJVqoHoOCrNCY= Received: from SJ0PR11MB4943.namprd11.prod.outlook.com (2603:10b6:a03:2ad::17) by SJ0PR11MB5197.namprd11.prod.outlook.com (2603:10b6:a03:2d1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Thu, 16 Sep 2021 16:49:17 +0000 Received: from SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc]) by SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc%5]) with mapi id 15.20.4500.019; Thu, 16 Sep 2021 16:49:17 +0000 From: To: CC: , Subject: [PATCH v2 01/11] wilc1000: move 'deinit_lock' lock init/destroy inside module probe Thread-Topic: [PATCH v2 01/11] wilc1000: move 'deinit_lock' lock init/destroy inside module probe Thread-Index: AQHXqxrJxDjNG40dJk6FUWrJpJ0RwA== Date: Thu, 16 Sep 2021 16:49:17 +0000 Message-ID: <20210916164902.74629-2-ajay.kathat@microchip.com> References: <20210916164902.74629-1-ajay.kathat@microchip.com> In-Reply-To: <20210916164902.74629-1-ajay.kathat@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.25.1 authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ee3b3eb1-2a8a-4dac-7f9a-08d97931ec6a x-ms-traffictypediagnostic: SJ0PR11MB5197: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:935; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LAooHnnjoSjYHNG4ALFFaI2LULr9FBtyMAN48RneJm9JqUnMS1qQNtP0Z6DqrfPA6mzp97h7NJEQLWP8wrsomFOqBtQHfufxBEPNbn9yCy5de9DZngzdVeABEAGCW5cH1YdMOt7uLC+c/RSXyyjDTQX7TQjJiJpy6hwY0YgmnzEwBkzR804iCa05xXbX3b1LuKrBcSRXr7ecqF6AvCdvpk34mtllaBkvQqsrNUlvb4g784tXB68ycqNl+pgQbmltVFnGzUsCgApz/Dulkb+7OoLvmvpSef2Q3xNx8duqEHOOjQV+aYYdQnMTRUFjFaFQIby9aye3LgI/31zzRXIisCN+ppx78v6mp0JZEDo8PryRZQG1LW6IA2vUY+LBL3e6sj4QbE6uodQTMTz8d8pGyby4OPT1XzjroGR+BJs06LmSunb0/+oOmQy0z4yWT1qU9waCj5+MDgGQ2xI+nRfSJoIqW+7cb5z09RocVSI2DEpPQR6PmeABWU9ggfcCmtpew0EGffSwKF+GVlhzbvDLSSbEGgu6RkXME0LUpme76sKjyqSftTTPbc6zSiEhLxUlyClH0NoThVLlXcO2JmKFznWL7zjMMxOGJb9J2iIMpgUDidQ1A4SeRmV1aqmkZ4Oxr7+xOL2YfCcBF/zDR519of0MRdnJ3TQ/Vv3xx0xtq0yFJ5LZmDt/HKV7g2hi+MlzLzwN/uGwMlLVn/ZP++hpug== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB4943.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(26005)(107886003)(54906003)(76116006)(8676002)(6512007)(6916009)(66556008)(66476007)(86362001)(64756008)(66446008)(8936002)(66946007)(91956017)(122000001)(38100700002)(316002)(83380400001)(186003)(5660300002)(38070700005)(1076003)(2906002)(508600001)(4326008)(71200400001)(6486002)(2616005)(36756003)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?hS7uZ7fpRt+n65lLplUR?= =?iso-8859-1?q?c2J9i/TGQ+FwUAe5dzbA9TFQE+RLP9paJd+fTlacj/9liRsxyA8?= =?iso-8859-1?q?2vTyGDD1Rlo+TIIhBaPmMTW12ZiauiWUqVN06j4e//NKRCjA2dU?= =?iso-8859-1?q?RTsAjEU+Zt2drOnzzILPoYCdQ5uKvF3iLHVpHm6s8bQYJHZgsp9?= =?iso-8859-1?q?x7ID9eUNO+PCXaU9/bRvlqShea8mRr/JiRdsY/zgRbDcXFMA4Wz?= =?iso-8859-1?q?eZo3sgGz6JpoaDSyVoOkl29hkShbAHcc4d8kzX2w9vLUIZZPRyh?= =?iso-8859-1?q?8Kf7HlnZcD5BeMFybqWPi729Sc/DkONyhxHAIMUZ+2kZMxF1D8+?= =?iso-8859-1?q?Lw5B2VCnOYxmTOoPbVQIZe0q6q5zoQ7CZ9aFzJ157MWHceMTqM5?= =?iso-8859-1?q?qGXbVS7g3minN/ISaEx9KrS82pJ5Abtfs0DB7x7XjeVCansP8SL?= =?iso-8859-1?q?4g8KLICC0tSs/sBz+7U/RoPJIsZt4rM/4I1kgLZ6QBrb48HAgcg?= =?iso-8859-1?q?6RpZqSDSCBpyQA/UMOtbJx8ntB6RpvSABrGYJvc+UaCfcXKejm2?= =?iso-8859-1?q?kIZG+2tEXQFLm6RjBFSKc4FEb8PtrjtiLoOVTpjbx8awoSCdA8K?= =?iso-8859-1?q?sc+h5M7Q5Xgst5Cv9A8rA8QRSgLBV1gRGt7x//2Yb71odMwpyBr?= =?iso-8859-1?q?yoTlXTzDbtZLuaiPZ8qPfbWXz7VO+oChkt0nkVaPSvBolKADpsx?= =?iso-8859-1?q?cIg2LbkiLhXI1H8MdFCwWsWG4H3ilubHmVpK/lPmD2ZS9WwVWXn?= =?iso-8859-1?q?YxQZjzTPU+rkiaYfD++S1ydt8f7qjj8klL499+wfnpf5G/W0Qpq?= =?iso-8859-1?q?wDRzAYo8obgMDxa22Kw6NyaZZnjFddP75JFzI/JjMU5W1q9HLn9?= =?iso-8859-1?q?zy300vVW16Sl1X6DfeG2dHuaLeWPkxgsxDBNtqDKcsG2+TZCgIf?= =?iso-8859-1?q?si6r6YZeneUUzChmdCaUpnlOp3f0rsqJS38CdotsbopY9ez6y/s?= =?iso-8859-1?q?8JP7RRHm/XDY3HlfQi5e1VxR5UV2OLjyNJwMSGnZwH+jT+v746A?= =?iso-8859-1?q?elw9rDPQgLUVTWmbAXquYxrVVyMbMTduC3c5xiXeQm3PYzxIhNC?= =?iso-8859-1?q?J9Df8AsXTB8VYDHKXrViSNBZvotJ1zVtK0ml5gUIHobj2YxAwkH?= =?iso-8859-1?q?Ah1ETi4biPq2BpGlwnmkV0L0gAFFHLrxGNITywNWTV8fcJGVCjV?= =?iso-8859-1?q?gWtgZ6FE96Z+3xBXaHr7ll+a3mMWkXdWum4eGAXkQPYvIMvWvIO?= =?iso-8859-1?q?b+DWLEZlHhfgLe3YMCrzz55wQmerRzt3lTcndy6STSvpnKxrGog?= =?iso-8859-1?q?bhjaJszv6e7QriCB3be0mIHaOoLHUjgXOPpHgilhQsj4L9Qks66?= =?iso-8859-1?q?JAHy8O9t0At4cucB/EmBAhfJk0M3iz6z+YDlxKMom6RR4Sulc?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4943.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee3b3eb1-2a8a-4dac-7f9a-08d97931ec6a X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2021 16:49:17.4843 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fubJcmE2vwpybmf0zsLNPEoPckWt7xa1A9ypcKn53rPN23VGWIom3j7Rgp5Sr3enW+Sq+YSWLU2HLUdouwgnYLYgidMF9otUCTMC4mSU0Lw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5197 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh Move initialization & deinitialization of 'deinit_lock' mutex lock inside wlan_init_locks() & wlan_deinit_locks() API's respectively alongside other locks. After the movement, the client count variable(client_count) which is used for lock init/deinit is removed. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/cfg80211.c | 2 ++ drivers/net/wireless/microchip/wilc1000/hif.c | 7 ------- drivers/net/wireless/microchip/wilc1000/netdev.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c index 96973ec7bd9a..530a768547cc 100644 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c @@ -1683,6 +1683,7 @@ static void wlan_init_locks(struct wilc *wl) mutex_init(&wl->rxq_cs); mutex_init(&wl->cfg_cmd_lock); mutex_init(&wl->vif_mutex); + mutex_init(&wl->deinit_lock); spin_lock_init(&wl->txq_spinlock); mutex_init(&wl->txq_add_to_head_cs); @@ -1701,6 +1702,7 @@ void wlan_deinit_locks(struct wilc *wilc) mutex_destroy(&wilc->cfg_cmd_lock); mutex_destroy(&wilc->txq_add_to_head_cs); mutex_destroy(&wilc->vif_mutex); + mutex_destroy(&wilc->deinit_lock); cleanup_srcu_struct(&wilc->srcu); } diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c index a133736a7821..497a49a182ef 100644 --- a/drivers/net/wireless/microchip/wilc1000/hif.c +++ b/drivers/net/wireless/microchip/wilc1000/hif.c @@ -1494,7 +1494,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) { struct host_if_drv *hif_drv; struct wilc_vif *vif = netdev_priv(dev); - struct wilc *wilc = vif->wilc; hif_drv = kzalloc(sizeof(*hif_drv), GFP_KERNEL); if (!hif_drv) @@ -1504,9 +1503,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) vif->hif_drv = hif_drv; - if (wilc->clients_count == 0) - mutex_init(&wilc->deinit_lock); - timer_setup(&vif->periodic_rssi, get_periodic_rssi, 0); mod_timer(&vif->periodic_rssi, jiffies + msecs_to_jiffies(5000)); @@ -1518,8 +1514,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) hif_drv->p2p_timeout = 0; - wilc->clients_count++; - return 0; } @@ -1550,7 +1544,6 @@ int wilc_deinit(struct wilc_vif *vif) kfree(hif_drv); vif->hif_drv = NULL; - vif->wilc->clients_count--; mutex_unlock(&vif->wilc->deinit_lock); return result; } diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.h b/drivers/net/wireless/microchip/wilc1000/netdev.h index 86209b391a3d..a39c62a20f04 100644 --- a/drivers/net/wireless/microchip/wilc1000/netdev.h +++ b/drivers/net/wireless/microchip/wilc1000/netdev.h @@ -264,7 +264,6 @@ struct wilc { struct device *dev; bool suspend_event; - int clients_count; struct workqueue_struct *hif_workqueue; enum chip_ps_states chip_ps_state; struct wilc_cfg cfg; From patchwork Thu Sep 16 16:49:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 513468 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 7DAE6C433EF for ; Thu, 16 Sep 2021 16:55:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 676D96135D for ; Thu, 16 Sep 2021 16:55:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346931AbhIPQ4Z (ORCPT ); Thu, 16 Sep 2021 12:56:25 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:30349 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343901AbhIPQw4 (ORCPT ); Thu, 16 Sep 2021 12:52:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631811096; x=1663347096; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=t6Ho8fsnJRT4pFlHTfBkDs5XdQV1QaQMzrMxvpD3BF4=; b=yEGQ7ZN4/KW6eiJQzd4SA0dq7m4XWa0FmFNpt2tnOGXPuM66XL8xlS0+ T8TbrEOxmiYiDYO6tcA5D5AbYgJn7E/MpSHouBqe064beL8v8FzBlf0ep Wf4WIak3aaFDAI6b5sIPH/No7iCCdnKkeUWBt41d329VZd4u2mmkm4OX6 fjgp6za5L2I8Pz9rj3vSPYDcYyd9dHxSPJKs2LFgj4aDj6kKOTT3ppeKL hwcAVNABmgSzwbu5OzZAz7CccQRN9NchD5mutZRoVOuqGfRdmoDU565Dp O1yFl9nNj85wGAHIzI/X6dY4csncTSxOWf0vecuBtHm6oA0LuB5TI0R6e A==; IronPort-SDR: bsshP2BcF7v5bMcD+57lGHeZdqUME8o2Q0s0Zj3TXAkRg4c3r1aR4cEeHoa5lkzIHsjy0NL837 hG0Ftyy1BtxdZfLxEFBlmCgm51H2hdlw7skv0LHfMzB7gPno2kfMcFhBYqrON0/VG+kzLY66ZX 3jk08scrBQnvpYmWFg72xUXUOa3VVQal6hO8ASqpq3OF7WK9+VLs7DdcoN1DFu9t+hd6uGTPXG nBAhYzSw20nSDbD8rP32mwE97FwvlERFJ04AJIBHRnJNcCRTeIzAerO9jeqc/XUGfGhhBH4O45 WSyDE9GF/3i1s1KhZfxAZ/Yg X-IronPort-AV: E=Sophos;i="5.85,299,1624345200"; d="scan'208";a="136238779" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Sep 2021 09:49:22 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 16 Sep 2021 09:49:22 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14 via Frontend Transport; Thu, 16 Sep 2021 09:49:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MEszD8CoIC/hsI5fmbCM264m9NepoT48IQ7NZlOQO7FrLhTKxa/1zpZTVGL9LQiYyN1WFeHQHaT25PsKza3phEM5PKP/ZzEZPhTb9pa6gao+hJUMRTN6RqjWIr8mwTknJGkLDcK+xtnIv0PdDjucC1PotciCKomhSHY2WOfowOsOBGmYTV/sIvIN/hUEOEaYureYxBl7rQSSbLt7GI4P2CvCw3B5Mvt0Ls0j+Wvx3HFxndVRWy/EdJwwG8KnDAHr0/kFWwgjAjzardEszHqOMSE1CalyVhW/BIEBHHu/eogOUMfCgG+47AMVNMEaobNqJqAHTJkpw22bU+CjybIjdA== 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; bh=7aPegxO/+CG115n3TIRRCS9a98He08E9uoNUMIfBpZA=; b=PTOL25pr2DQfcpyHdspTByjDvrE1EkMR8Tn9/52RHqCHRmAkbnN9NWUd2+7fu8fbwCS8vqJgbJ0DcGXlbVtcsFBwZ06oO0TsbqZqfxCYh65e1nJkNtpQtdthhKa9eUlKS/ZhfzYdLFUGIkHQNMmknRqwiM4vTkTb9BG/9RkRg8rHu+Ah9FSHsRnS6pPNbzjTWdb4es37ywDcspPYJmWVzMe5sU7H7SAClzO3EQ+N/oquF/2/fvDZO/77LGHjM7RY1kyEXOGBNkhv9/lML/7i6zPo4GPLX4vq2bZFqth4vF/CUVfwfHgpdVj1I+JmE7osmWHieMbfPLyEswBSfX72ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7aPegxO/+CG115n3TIRRCS9a98He08E9uoNUMIfBpZA=; b=G3emZI/IlA6WJLNI780uYofC7PJeYEDwlh27D6gzRgrazIgyJ/AGgLtNWjQU1uhYRPxA4odKUZ8ZIL8CyX0HRNu34TH8zEgkN9nJfXwQ3ZMhuzS8X9CQHMqHWs5O3KwQKk6ftLPjvMBHbYl0o9PSEKUzNM1Z0mcY8FyXTG4tun4= Received: from SJ0PR11MB4943.namprd11.prod.outlook.com (2603:10b6:a03:2ad::17) by BYAPR11MB2565.namprd11.prod.outlook.com (2603:10b6:a02:c9::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Thu, 16 Sep 2021 16:49:21 +0000 Received: from SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc]) by SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc%5]) with mapi id 15.20.4500.019; Thu, 16 Sep 2021 16:49:21 +0000 From: To: CC: , Subject: [PATCH v2 07/11] wilc1000: ignore clockless registers status response for SPI Thread-Topic: [PATCH v2 07/11] wilc1000: ignore clockless registers status response for SPI Thread-Index: AQHXqxrLGIjBTiaNfUSpoDTifV22Fw== Date: Thu, 16 Sep 2021 16:49:20 +0000 Message-ID: <20210916164902.74629-8-ajay.kathat@microchip.com> References: <20210916164902.74629-1-ajay.kathat@microchip.com> In-Reply-To: <20210916164902.74629-1-ajay.kathat@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.25.1 authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: de28360d-71f9-4d36-505d-08d97931ee71 x-ms-traffictypediagnostic: BYAPR11MB2565: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3631; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3GVurQPY3rdtcf0Uzxj8OxPBa8wK2EkFBJVCt9dlr6hVUHkDwFGMAoamEasfS0T9eYO5rAC1/R9wgq43uBp5sTuRM/3UrSQvOn7T+JMHvwpKuIm6yRmE0MUUYU4S+LLqyndKpAGn3hhyRarrlKWkLwYbT4/TDMbIQzIrYQVw33wPhiz85WHlNjK1/PPQB1H2wlo/unwbooop6LVYbBUczD/gUlOf9O09BVpNd2XjxUoVDA/DXDQGZTqyjX+KJ8W7NHU/218+0HDijZU721Jm5EIV+zUFKGdyCT61SKLU9p7qI8KDDLPLtceTE2DPBFnq+5f2Z9J+mlhhFppot4T74g6pz4faoajD0u4/ROucIw1LVR341rlv+poav2h7mrjDcaH7yeDS3CJ17rRexGidpg/WlC086pZsFi/9NEY3QpJaThc34vPHP8sZtPFWWqRnQbIEalCNktQG4hI7ZqPwAIQMucMuEueXiU1t046FEfjhpLZkfpzZr74bbj+qs0GC78r033OVkHBMc5UYXBsXn8o5ysmxZp9k/2WlUp6JV+yZDjoEyySZlB+veQ3UMwUlHRCmACtetyQ9ecuf2/JOOi8w5FVqLNGBw4RtnVulQXrPIhySYfAGu4iI9p5Tkqggo4+bMTSdk+w/RMaYcjckIV/x6IZwCL+bCgIJViuIIzZiSJYiIeUM7+SZUzmXCBcWFXbaWTEN7bGZ9syKZ1/1gw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB4943.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(136003)(346002)(376002)(396003)(366004)(26005)(107886003)(71200400001)(5660300002)(8936002)(2616005)(122000001)(6512007)(186003)(76116006)(38070700005)(2906002)(66946007)(38100700002)(66446008)(91956017)(6506007)(6916009)(8676002)(64756008)(66556008)(1076003)(54906003)(66476007)(4326008)(478600001)(6486002)(86362001)(83380400001)(36756003)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?bAHxoTT5WFXpFy2EJFjp?= =?iso-8859-1?q?KNnyrBjq5Dx1KcR/R245aB0LsfBTDXx+nXqgos+zdpVo3u+YDzg?= =?iso-8859-1?q?9rke7oMWwdZ9C0cplxxUczDdq5v5BhABvWmPJzSn/MeSpAn2nwj?= =?iso-8859-1?q?U1NaUJjCyFIDMTBrR4IJ3SC82ELR7uIcUFSHSQ8a+tuNGZDvVKG?= =?iso-8859-1?q?ln5LC5Ybx/uKXpe89EbbQoOZQL1oGGcytIF5pa6jC/UGWG8XUHX?= =?iso-8859-1?q?+oLCshkOCw+cqXmUenDVYn4sb+rhsBBGcPvWfoekQVKRLVFJEfT?= =?iso-8859-1?q?85wT1EfyxpAZidzJN/E8Yx8hX9WDhzpRexp6CCQXwWk2Q3rs3ru?= =?iso-8859-1?q?L4RaZDEM+ktg8Kz4ZkEPjQPEDGalFAtDOm2dN55Vko1d4rqEnk7?= =?iso-8859-1?q?qaz/dhdnm00Gu0Z4xzIbhsJAAR3QCzhh40IN1d5TZfQm8e5xcRq?= =?iso-8859-1?q?3b3D+D5KhIGYJqbWZJAcko7y2mvTAUcE5+4YWmXHgIQQrvYHQok?= =?iso-8859-1?q?r7+Xfy1dlY529GbbKmuhrBl6oUYaSqCx2CFnjX0dAwafGZUpUDs?= =?iso-8859-1?q?duErNN6dz9Gzjo/j4Vt2Skfjl21hHfAiwy0XTqGUJrPpnMG0yJA?= =?iso-8859-1?q?wp/nOiDoAloovjU5msPpKBFt3WhkjIUS1QmKSRTc4O0A3d2SvQT?= =?iso-8859-1?q?XTnltuJZnsI5yjEAw+nT+LjBCm7Ygu+Vq5C+8x0RGB0vxy+DgfU?= =?iso-8859-1?q?oZp6SlIi9Na18A+9KTMO1eLyHkV1QP5AVKCU1354h92LLggPPjM?= =?iso-8859-1?q?vy6ysgE3OhNkHHX8GMwYQDLZcO3SM8f11F3faeXXfwK5Jc23VVW?= =?iso-8859-1?q?pkSF3e6tcTgosCMwsDoOcFyX2NXMcu81ev/E9jW3jSbDh+US4Gx?= =?iso-8859-1?q?xS8A4AgRvkQXwFRaxRGrOYUuu6dI+u6kABXX3yk+h3ATM43Yf0C?= =?iso-8859-1?q?jTPsDul1QjXsSlkV6ESomDi4uZFgVSWYPKp/i4yL1SA+mOzJUOT?= =?iso-8859-1?q?XV5rjo7cC0Y/yJQwVWgKD0yvC1oakvelNZVLPDPnZpUBD9folG4?= =?iso-8859-1?q?pQ5TgB+/NxTzoyUsz6sSsPCVBwrXmP9jNP0W6CiGPV8b+SVEOLK?= =?iso-8859-1?q?f01TEvAHWW3rEwcsOkoRPjju7bN1QmYvj+5S03axS4f/qs12YyH?= =?iso-8859-1?q?LG1LbeLHWUDJuNRFxpoxSe9ATVMSmQyUjNCdbrSghj95+LS9w3E?= =?iso-8859-1?q?3APcq91hU/8yP9UZ+QBEhvtU5rg9lk6ocTsZAV3hwo8+rAJ9Uce?= =?iso-8859-1?q?2VdH7FK0gFnZQ8lw86/5my9GhResrp55kN8J3IIuFOa+yZXRwor?= =?iso-8859-1?q?eSUhb1dbUc3LBy2Gv29Bba+sdnNXlDvgGDXO1r55YSd+kHXNOJV?= =?iso-8859-1?q?jHGZosdMXGmine5RcN+zmNH6DIGJ7ZHJy7BwpaxCzjNWNE/kM?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4943.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: de28360d-71f9-4d36-505d-08d97931ee71 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2021 16:49:20.9242 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: J8HD0iij8F7zZLrWPn6LHuQpYtX8f4v4FShIwWW3h/bRGht7IYWyn/jJ9OEb6fGv7PRBEOz9LfydEyiyFBAAbwPm90QE4Bmrk+pm7XHlabw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2565 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh During WILC chip wake-up sequence, the clockless status register sometimes reports failure even when the actual status is successful. So, for the clockless register, remove the incorrect error status reporting during the read and write command API's. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/spi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c index 511b9264185f..4f0bc24d2a78 100644 --- a/drivers/net/wireless/microchip/wilc1000/spi.c +++ b/drivers/net/wireless/microchip/wilc1000/spi.c @@ -474,7 +474,7 @@ static int wilc_spi_single_read(struct wilc *wilc, u8 cmd, u32 adr, void *b, } r = (struct wilc_spi_rsp_data *)&rb[cmd_len]; - if (r->rsp_cmd_type != cmd) { + if (r->rsp_cmd_type != cmd && !clockless) { if (!spi_priv->probing_crc) dev_err(&spi->dev, "Failed cmd, cmd (%02x), resp (%02x)\n", @@ -482,7 +482,7 @@ static int wilc_spi_single_read(struct wilc *wilc, u8 cmd, u32 adr, void *b, return -EINVAL; } - if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS) { + if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS && !clockless) { dev_err(&spi->dev, "Failed cmd state response state (%02x)\n", r->status); return -EINVAL; @@ -571,14 +571,18 @@ static int wilc_spi_write_cmd(struct wilc *wilc, u8 cmd, u32 adr, u32 data, } r = (struct wilc_spi_rsp_data *)&rb[cmd_len]; - if (r->rsp_cmd_type != cmd) { + /* + * Clockless registers operations might return unexptected responses, + * even if successful. + */ + if (r->rsp_cmd_type != cmd && !clockless) { dev_err(&spi->dev, "Failed cmd response, cmd (%02x), resp (%02x)\n", cmd, r->rsp_cmd_type); return -EINVAL; } - if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS) { + if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS && !clockless) { dev_err(&spi->dev, "Failed cmd state response state (%02x)\n", r->status); return -EINVAL; From patchwork Thu Sep 16 16:49:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 513472 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 539B7C4332F for ; Thu, 16 Sep 2021 16:51:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37764615A7 for ; Thu, 16 Sep 2021 16:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345415AbhIPQw4 (ORCPT ); Thu, 16 Sep 2021 12:52:56 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:37580 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345767AbhIPQut (ORCPT ); Thu, 16 Sep 2021 12:50:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631810969; x=1663346969; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=miBKW1A5kOwkQr7QlttDiag02LSAl+Fz8dEu7GmQ9uU=; b=KefbXw0qdXU1/ZDJLIhOpcxZ2tqrV90eWcL8w0GotP1jlJJvw33JbHjb VwuYc0zBV+OoAqJ/hcdqYcJ5HzpuY2gsTS1CO4jo0utVspInOz4zvhttJ bk6iokRWD8vnemxXMu16JQT7NnMu1EGj3dX0NnrjyDzyr5D8T4hanPdgK hR3GHGynd2L3SLogCsfstEROCYdYlDTKDAGtT3wstXai1nbPCxScEMzws JM8iT3pChAyeARnM2C9GGxfRfOvtob5j0eNTj6K7k+amqhT/yI4mz7Ijr BMsZcSF/KSKZWMU8N1MhRLtmr8zu8nvZtOkQmn+Fe5oOepf4GpP808AuQ g==; IronPort-SDR: Zp6qmoYmYNPtP9PvgBnp+UQD9H2z0eNM0mEtoD8qah0T2lnniM/mqCRCq54V0Jn3cH/o6eLlru eApoB5m85hxuOMmO5+TXoog60RpfWUAkK4CsdY/uwJWPJgfuxa7Q2p5uf48HSdx0qFMJsmeu52 mmWOYL/4WgGGOaRgH+YLUHsh5yHEoxXeGU8w04intCL+yhRz/qiz/iCqrlHFLemZqH5+iexIu5 t8usPnRRyEMlL/pfAXga6jzCNUtwZuVZ2xLSGrnUwmRvey6+YE/RTW9ZBo2JvvUlU5hRKQM8Sy x5/H+6qccLpLFk22hQZRFztp X-IronPort-AV: E=Sophos;i="5.85,299,1624345200"; d="scan'208";a="69561226" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Sep 2021 09:49:23 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 16 Sep 2021 09:49:23 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14 via Frontend Transport; Thu, 16 Sep 2021 09:49:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HK60g2oISJkIjj+XTp4uXuCSm7X/+ioUsLtrq8kj5bKX3mm1ri+oL+LzzR3kK+BT5IpUunEuaGTYiHftZu44JXEJlgOC8I17MgCXwJVQhkf/dnv1MR/AXWRaRnWBO5YSsd7dnLmJacrth6kSUR5NhYxe8f/v2n2oiEX/j1UVy7JwoEON+DuNnjaRZpGduXa67SG/CfvC43/5mZFShV/cvqMMG0k9JoktYD4El46jR1WcWckEdArNzGnMU3KAZDircEmqjFOdlNacpqC60eM6kERw5bXhspmYzU92gXVGcvqPBOvfIwL1fx2MXDpNSS4vQeM5kMQTu6IKG2pbXF8usw== 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; bh=J3+YB5R7EWngunUqS4whTk1DeznLp+z39fq6UZ/pxTA=; b=JFwa8XggQ/pmPsD3bSZSQz7AFnjLWODQDX290irDSWhrclgRbL9N2eRUTy44z1zXTNcsJ/G+I8uHeFlRxsRPk+RxMW7cZWHo2hLQDUf/UYaS+zZmpceV8TImUnp+OW0GXtSgfgN3ofJhl5cP+OX0cxXgt3y+Zs1FXJVxIcQj9eVVMiI1Q3/mKJiCE2IRgW2tVRsbLA+Qd60orp+ZEOONVDfgsEHIisV1QSBSPTj+zGcC9OwbYq+vBF6XEsufoTVGWR52Zuhg7tfQDBN3TIBYc2bmDjqXLf7VhjbM8Cm3NVD3cgnQfPckdzIBvMCRgT8mLF3I4e+S7VZVzZyrA15naw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J3+YB5R7EWngunUqS4whTk1DeznLp+z39fq6UZ/pxTA=; b=p+xWUdFPe1e6nMOczHKLIdwVJ5Ucij2piiEFNEMbII9aK6jicS/jCJx3JexholJJePn+LjAbpX3+L37gCH3SK4BBuS8uBlsZdbKVhKfeB2enjsHi8TAL8w+fR9C09rIvR1JQ2RwMOY4f0kkBJExS8s+hV9kb3Kd0wtgmCfdDdy8= Received: from SJ0PR11MB4943.namprd11.prod.outlook.com (2603:10b6:a03:2ad::17) by SJ0PR11MB5197.namprd11.prod.outlook.com (2603:10b6:a03:2d1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Thu, 16 Sep 2021 16:49:21 +0000 Received: from SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc]) by SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc%5]) with mapi id 15.20.4500.019; Thu, 16 Sep 2021 16:49:21 +0000 From: To: CC: , Subject: [PATCH v2 08/11] wilc1000: invoke chip reset register before firmware download Thread-Topic: [PATCH v2 08/11] wilc1000: invoke chip reset register before firmware download Thread-Index: AQHXqxrM6R4v6RJsvkKwKgX3Znnhxg== Date: Thu, 16 Sep 2021 16:49:21 +0000 Message-ID: <20210916164902.74629-9-ajay.kathat@microchip.com> References: <20210916164902.74629-1-ajay.kathat@microchip.com> In-Reply-To: <20210916164902.74629-1-ajay.kathat@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.25.1 authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5fb51ea4-c96c-4518-7aa1-08d97931eec5 x-ms-traffictypediagnostic: SJ0PR11MB5197: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:612; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZZWj1aKk8aKXtlSWX+52T08kHi9xSkSOS37C8j+mz15kM0bp8sVMXTqbcDAoMsIIqIKQcFXGssyYwXMV1euiqSL2v2xYzbhTdJEVixqriu34+QMxmDtjxy3UZvEQ2DbNaYBrvgucYjZZCiyBb6lr7IBW+ofYb40cObakgyoOqeFHuNgiARh5TRVV6tAOvLIfnVE1XjflY9JheZkj+H/zp3wL7YCn4+v6Od3NNG/zpyokOyC8ylMOkKpN9BQHQ4WHxV328D5ruDztz5KERSr5CHL8sENSkYfIWCa74WVS0BAzu/gOdo8J330ljJnNKQ6B4BJ2uXInn5XcnCbJ9MdXy2ctogIMTkfM3nwKDHB05JcjqBHSTLZ7bBvvXYC/7HtbW7Zrfu6uUQonJLM1tXd9MahuB5hYV0PvHVdWFNGf2hZTI/ztZZhSmTeStG1gBnCkyhINCKYjtxJL4qA2VKBzj7VYd2fcBcMkpp23IaaUY98BMY/1TwggNajrfKY3mJu3As5kXJkqUpx/7iv0aAZo32mL/y2/v7trcrQ7s0LNRdfrZpym2Q9/ZcVdlSgcIJKN8OBGCdfRpWgCQZ/roLJvj6VGSieLIeEah/8ACHmY6ZGhkr2HsqyKYTUS8g4gvzDjSBqJ6JHx2G0VnPkzjLNzllcZI8HJYyPoUGD6a0J/Bwcv9ryDo30Asj61s6NCQmbuEvjDc359oO65Sju44zk3bA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB4943.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(26005)(107886003)(54906003)(76116006)(8676002)(6512007)(6916009)(66556008)(66476007)(86362001)(64756008)(66446008)(8936002)(66946007)(91956017)(122000001)(38100700002)(316002)(83380400001)(186003)(5660300002)(38070700005)(1076003)(2906002)(508600001)(4326008)(71200400001)(6486002)(2616005)(36756003)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?PfPAiLygq9hxFAo4fgTR?= =?iso-8859-1?q?TIRPUEBd3L2dr+ycuTM8lnNFxmyH6+SrG81yRM/15ouinVNVxJP?= =?iso-8859-1?q?AVItl0bTHJmeL+zV8BgYEU/n5D0xInr4bXv2CqcDcRbTHb1JmuQ?= =?iso-8859-1?q?wpEyCTFDoHNb2uiPKCpKcAHZjtvgBBKjU2gL2iars55ZmCfyXre?= =?iso-8859-1?q?5JSXWU8azUU/v4zeRiOA8n8eLcOVh1JTTHKx7v7O+Hto18E1/nj?= =?iso-8859-1?q?5CIgUT6YV9ItvFPPeXP4gFbmIHydNT5+qI72N5viqoDbDO7nPfq?= =?iso-8859-1?q?Vw0lnaFQUX4JwGdmnppSqJ82kmsBkv/8TVjts421EIxBBbEE2nb?= =?iso-8859-1?q?bk7rfaOaDTni4pknu1FScH6D2Oe0vsEQTAzK4xfTrkdNe4Ple7R?= =?iso-8859-1?q?DOZOYRth965B4XZZWL0yB9covAvJsphpExe+Bp2TLIcIWWUgKkI?= =?iso-8859-1?q?2wksBiYtXg1xkZZYsYjKVYXWqOm8OzhyHOeOZy5ZO6bb5F6pZDx?= =?iso-8859-1?q?u/OgkCe/S9tZk52iR+02v+CEQO2zvemp4Ku4/OlrqF+mFGcG5gS?= =?iso-8859-1?q?rkBztCT6pSO8/cq1V1ZgmKNtK/OevpHW+gLiWR0a2REHM0NmoTY?= =?iso-8859-1?q?booCRJ3Lq6pOtB3SXphX+7vOyf7e07SF7Yc1unGD39dvtJw7V31?= =?iso-8859-1?q?ckOP5Wif16+2S+Xb8LiBB20VS2F5GAwVvlxyx4MvTR8imzINdT0?= =?iso-8859-1?q?9NAtFTB8tiIQYLf47PL5eI8SyFlPact9RYw8ppyHUkxT6Ud5MC/?= =?iso-8859-1?q?Bvg99P/czzZadWcZFkP7N+FhyNuTuTX8KiIzNG/oVPydtai55vS?= =?iso-8859-1?q?VPojn1NWRu2GXpG2VGzlCZWo6G15MSX+VRba63mOvvUHQ4M6VJ4?= =?iso-8859-1?q?AL6vqCBN5FVW23dMkH3FNrzBJ4m/iN/86yv6vEnms1hfo4OFrZX?= =?iso-8859-1?q?9yKYOjgWTmUyNbvvYJw/j1YNSnSBtaZcLOLQfOdxIQDoqN8IZmd?= =?iso-8859-1?q?9I5s6aiW/XCYBYk3gAlUmTw2cFEXcA5hXAzCK0q4f0b/owS/xGA?= =?iso-8859-1?q?+iOmvM+c+3Ks4MPqSYP0l8hm0SzRSKzO4kPUzJnJNP+0Dxu0vHm?= =?iso-8859-1?q?uUur7p+uopMftDFmv2ZQ4rqYJcDA//+6oWiWDH2P0QpoQCuo2CP?= =?iso-8859-1?q?G/MXHbitRwhjiDr61fZ9FZzLuhy3+PF2NJcTgiJcIQhi4HPa6eA?= =?iso-8859-1?q?KmHhlEC1Q51u6bzD17OfFGGbQjiRfjtUMc0/qoT1VC+EERF6xky?= =?iso-8859-1?q?mTFjSEuI+3xvv+skFkf43Es7Qg4q5+mXfDj3A+nIIQ1oxw2dyZ+?= =?iso-8859-1?q?1PqfCEZkVX/PSf7WlegbXV3cZXK4I6OaWg5yNSEFXJuwtolRPDu?= =?iso-8859-1?q?jI2x/cdguODOrNU9mPoV1M6cBmEynN7WkgWUIiXmqDbASW/tH?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4943.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fb51ea4-c96c-4518-7aa1-08d97931eec5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2021 16:49:21.4768 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 24GHZcIhPQUoKVeQJrEFZaV5iBGdPSfPctHqWqp6Br6T+0ilZZehJFouc0YMingj2g5bBpLerQibkhVYJzfso6mjbRJSpDGl3H/fRiX6GXk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5197 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh Add the chip reset command to initialize the WILC chip before downloading the firmware. Also, put the chip in wake-up mode so it is ready to receive the firmware binary from the host. Signed-off-by: Ajay Singh --- .../net/wireless/microchip/wilc1000/wlan.c | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index f9256c1bad45..de5287cd8652 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -1080,6 +1080,7 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer, u32 addr, size, size2, blksz; u8 *dma_buffer; int ret = 0; + u32 reg = 0; blksz = BIT(12); @@ -1088,10 +1089,22 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer, return -EIO; offset = 0; + pr_debug("%s: Downloading firmware size = %d\n", __func__, buffer_size); + + acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP); + + wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, ®); + reg &= ~BIT(10); + ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg); + wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, ®); + if (reg & BIT(10)) + pr_err("%s: Failed to reset\n", __func__); + + release_bus(wilc, WILC_BUS_RELEASE_ONLY); do { addr = get_unaligned_le32(&buffer[offset]); size = get_unaligned_le32(&buffer[offset + 4]); - acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); + acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP); offset += 8; while (((int)size) && (offset < buffer_size)) { if (size <= blksz) @@ -1109,10 +1122,13 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer, offset += size2; size -= size2; } - release_bus(wilc, WILC_BUS_RELEASE_ONLY); + release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); - if (ret) + if (ret) { + pr_err("%s Bus error\n", __func__); goto fail; + } + pr_debug("%s Offset = %d\n", __func__, offset); } while (offset < buffer_size); fail: From patchwork Thu Sep 16 16:49:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 513469 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 AABFEC433EF for ; Thu, 16 Sep 2021 16:54:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 905CA63275 for ; Thu, 16 Sep 2021 16:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244653AbhIPQzd (ORCPT ); Thu, 16 Sep 2021 12:55:33 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:34431 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343846AbhIPQwm (ORCPT ); Thu, 16 Sep 2021 12:52:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631811081; x=1663347081; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=E7/VJTemAKmx4QX7PmjUd6Ns5GQOhLDgrcY9E2FK77Q=; b=Ls9Vy9ehJ3wBx83f3yGz+ZtmKJC7cRWjxT5zb9eV4g8jwxapH5zi7keb OUgADaW1+8RWshXR0mh3Nd/8ffYQmjRI/pf2P8KNi/C+U8O2S3ME//4H2 x76ejlT2bA+CcBFfFlw9tAvOz4svHDBqPNJLhvq7KXRxpyObayAwo7nAX W4kVwMYX3M03EtZYacSaC4rv6R7jXOF3oMMmbP0rJGe0eO4uYVC9DzveA eXukrwW+lwTpGcOwR94aJcocQUICFr9k9rC5cy5zJzHpmEBcT5Z3m5sfV HlXec+OxiD/g/FbmbufhliwthpWbNUi037SZzouIA9Wy4MzD9V/FXM/mQ w==; IronPort-SDR: i+9UVPTFwUfV6rohwad8OZ9wlNfkG0v59OKc80FGq7yVWst9goGzsZ3Ow3YirifxoJCEruPbvA bH9aEEy1FHasKwZsHuNPVxhHS78Mv2yhAfp03FpfZb9fTAU6qErC49i3EzlId81BwMTZSt+r1q /ZBSyxVsvcyhv+jfsiA+0QMFju7VWV6jhQQwizs1I0g0nDg8cWi9ahLlvpAZ3Kqbhf8yQlbg6U g6WqnMplxOFRBSFRXUvY5jkewYw1aXrrAa6hMc/CdTtCXdx1JBdmCNIk3ZfQ5+YJmAprGsq7aw KrG1qmWc9DBvHJB++vX6w6Lm X-IronPort-AV: E=Sophos;i="5.85,299,1624345200"; d="scan'208";a="144413620" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Sep 2021 09:49:47 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 16 Sep 2021 09:49:47 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14 via Frontend Transport; Thu, 16 Sep 2021 09:49:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WCVXXJHglpuIP7cCiF31ZVkQF+U3+5JbcVFdxIvZeNNM5ZfUg8k2+ZQcDjVyXnzWm7wjh6qKFQ+dpbhgUaixTVdo23ZCtA5n/feM+dXXMF1sP+fK67Mjj0GMBqqHf67iOx7Xi2VMQzw3oQHiUEMvxiXCAdQ6qZUwZWGwiLSPe+JVn32sPfSEeoDPG/K8Rmc27DEniG9/PkgqSxIRreb9MZe5fMWBnR00kCgW/GHMvCPRqmE/dVxe9NnmoGU/1n4lTtEXVYXH+obNFo3ikFr5rn4FjO+x9zQxHkAYIMtm2MkDiX66w3Rp6ADjDJ/NGymLOCTNzv9LRKY68px0xYtG1Q== 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=13y8K55xgPs44YuU/qwIYCcifdyk7ZBRpoQNW6vmzRc=; b=XYj8Zikt/Pay3ECtzVSzGAREpiykt2r/2ANwUVHZyZ5/OmCt9UBtFe1/QKkS+Hyb1nILDiFGQonGJix/PTtxGMYqUbw5i/oZKsOG1++rEPB4ZnT7CLO2k7WauKZCGViQhbYP7w2LjEy1IasYudEOIf8zxwXU+GJlXCki/R9wgcqbQdyDLwEdGqlu+9DYxOduoAfgSwaxlJVuWs80iZstQBY04yAe3f/EUMX3Z51GOrBSA45mhPUq7YRDIcY3yrClHvZzZfe0nOlkpqs13pI48hhBd6GeTRW85qa30tlENDN2+Nup0swVJ5Ho5h0yIPnJUBkN5J8TuJtFm/K0VJGVaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=13y8K55xgPs44YuU/qwIYCcifdyk7ZBRpoQNW6vmzRc=; b=Tj7rgLDHR1JUE0WZ1YXveskVqjP3kda3mDpDsFMn5toJeiYza/djaETUD3THgJpmV5ywdMe/YLNMBeiiw5olUrKf3xXe0T0BAX2+BShOwGh5imX6I+PAybhWn7bSDQZ+VD29SUnKZj7Gu3ZXOB9+uZWz3Y9teE1g9X/S0/LcxjM= Received: from SJ0PR11MB4943.namprd11.prod.outlook.com (2603:10b6:a03:2ad::17) by BY5PR11MB3990.namprd11.prod.outlook.com (2603:10b6:a03:18d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Thu, 16 Sep 2021 16:49:22 +0000 Received: from SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc]) by SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc%5]) with mapi id 15.20.4500.019; Thu, 16 Sep 2021 16:49:22 +0000 From: To: CC: , Subject: [PATCH v2 09/11] wilc1000: add 'initialized' flag check before adding an element to TX queue Thread-Topic: [PATCH v2 09/11] wilc1000: add 'initialized' flag check before adding an element to TX queue Thread-Index: AQHXqxrM213mtmxsUU2Uht1acpP20Q== Date: Thu, 16 Sep 2021 16:49:21 +0000 Message-ID: <20210916164902.74629-10-ajay.kathat@microchip.com> References: <20210916164902.74629-1-ajay.kathat@microchip.com> In-Reply-To: <20210916164902.74629-1-ajay.kathat@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.25.1 authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3f1dddd1-a4ed-42a9-265b-08d97931ef16 x-ms-traffictypediagnostic: BY5PR11MB3990: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mkhIepxSgMQzhCjOeEDCLEbgn/nwkVicWeAxCvndg5PT0VrQ7/3i5ynpYtXzI9ylPh/j3aIZfGvPgqAZfyq5EhKYsXDBlqj39UpNQRABWQ00coTBlrtpN70wOZyaGstqgdCDPKK4h/nLrSfNSouuNcBKxs2XrwhJwUrk2tq2pn17cJbUplppYSfSIR31gyyv2dQsxCu9IdcmYn2yJRyuVnPSZwmo+uRgfMQ4Fd81I31M7DdAfblrHCuMn+KQYMI+2L7BZ2VPMnnUu7+7ctjCfemdgI/LQ6r7jYG4V4N1XWtOLRjDSTcDTrFXPkNJSpIATg6ufsMkr8goA6uKnDNmJYlB28HfYPalqZfmwHuxbWZi61X7ezfbrHjpuHlEXDphWWa2Rx9QoYfVZIch1qHzmqXQWam9E9rYmwOftOsDJ8osPI9JY+VMkZFrttxrw0KY5c/hgEWzXcDJKri4EIX6Hj9xC7J++1yZeSITZgRarQnNCcNJ7Dk7INu20f9avrNSgsaimYfKci36t8y1lzL0KR6o2avZccuTzEXzmfkzQ01nkXmMaFa2vLd5+tLGAtp6QmoBkU/oRiIVW5ecmSkD50uuEYV0eiIxEwvZUWeudT+95m3rpSi5gnjge/MAsnSfydYYl+QfUYRoUhCoIC4O1ljsyH89fKsYGGgv+LNvjlkHy0LIqcJChxGus90RbZMbvoDFq16dvoFHjQdQJYOKIw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB4943.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(91956017)(64756008)(38070700005)(38100700002)(66476007)(6916009)(8936002)(76116006)(6506007)(71200400001)(66446008)(2906002)(4326008)(107886003)(8676002)(66556008)(5660300002)(186003)(66946007)(1076003)(122000001)(54906003)(316002)(508600001)(6486002)(6512007)(2616005)(86362001)(26005)(36756003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?zwm0Ry8tM3P2Ewd2aCiU?= =?iso-8859-1?q?k4PKNc9AInFPc/Cf757VVnHWIELZimk5fKhT8h+XieOLZhsfGMN?= =?iso-8859-1?q?tAh0REHcgeM9AcipOcG9OD6HIT6P0BEjCeso4VeeiikAIGjsNOO?= =?iso-8859-1?q?Zr3tzCaZt+QRkqeok9v9SBxykxyfA7wteKrlNsH0KlZtwrjhiF+?= =?iso-8859-1?q?mAePBUYZ93rV0dWkH8HGlwsIvV6qE8mk0BT4WG2Y9hR/snKx4zt?= =?iso-8859-1?q?KYoG2x1gTOZDMjwZBoCHElRyC/SR/zswTazwxoFiaetpCTKb/jf?= =?iso-8859-1?q?NsDiEGaT2YlZ1Zqa7+GI9CakH97ITqzlszmLWrkE8X0UA3GB/b9?= =?iso-8859-1?q?Ge5sfLmv1GwJLFuKFzx/GC2pWLP7zpIe88hWQMOH0/YQ7+YPETX?= =?iso-8859-1?q?hNodr8grNw19okXI3na6CzeZD6/HnMQSB+IO3b6m6lOM4xGJ0Cv?= =?iso-8859-1?q?QbIji44eeEYQHv1LypiAFBhAyo1AjFlCtnF72mdNPaZD/ZxRKJP?= =?iso-8859-1?q?n36rRtwelK7SNIQeY9TzGGZQGteWIzL/v5TUgyR8pmKLlGsorWd?= =?iso-8859-1?q?QjRY2/DZB4dBplEbhooqaMsQotSQgOtuUFE0HBPCvI35m8XzBho?= =?iso-8859-1?q?v6UVTK8xjKbC6wXxk3vX133ZX/6ekg1ISFo4ZaVCZu14Ks1n1VS?= =?iso-8859-1?q?BioiqVxdEtW5x6+rSA7H8jLT/bB+Subwz8v4SpMYA8jRWjDdOUd?= =?iso-8859-1?q?DLlE6re6obNbb7OVbpdmnZtbEYJMhZkH6+QKbYYt5q/SdBIrqkq?= =?iso-8859-1?q?zjEr10j70YttGWpjo8csGojIUcrijNege5ZfOaHk2b5CfBmPTT3?= =?iso-8859-1?q?Acx1F911Ckwv5G0k/zsAr06EJ0Og1TRxbLGfOzGBIXp8xCkW906?= =?iso-8859-1?q?VTD2KVT7roXz0BzuURFM8aFlrEk3XfTD1fW8YCMRfsz+lh3RVqs?= =?iso-8859-1?q?yUr8s4yK027rgE9h8eCLv/mvZU7CYFeXPoSt944TqvPY+9JHv7k?= =?iso-8859-1?q?0IJJfPJZXsBUqzdyQDW6HyF4an0nWOBs8KFXIoWe4K1Dj6ctZSS?= =?iso-8859-1?q?G49+8IurGeHeV3eJkrCfv99UUufwZBD+l7tTrTZHmL/pjI+ogc7?= =?iso-8859-1?q?jloUjk6JIqTJldozaBsGUNlRpGod6cIMmnub9UDomd9KXhUft8a?= =?iso-8859-1?q?QuaMRnlixVBt7usnUZTSlHuh14p5abH0e0ahbrhqUKX8jI3xNZH?= =?iso-8859-1?q?+GemQ5L9bmXSJgqk/c/orX1xe2nifBxjZ++vuUMprxIetMU2KbF?= =?iso-8859-1?q?LopztMvumMzsOwWz9DH4UqxvaEGZ598K/FfFHxHQhI70JUOYvOp?= =?iso-8859-1?q?rAEzC/6gKKbUi5zrKVrhaPSKogAjFjingQcINPIHRl8eRPsGiw7?= =?iso-8859-1?q?D7OCrMrQ2aqV446vmv7uADgu3IEhW8WTgZl+ydWBdESyVq4cp?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4943.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f1dddd1-a4ed-42a9-265b-08d97931ef16 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2021 16:49:21.9557 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 54blTtq1upL9KWuK/OAsaUNAvuW/e3QGPOqd9VvEXBkqKpmG7J9dEvR/03heeYjTWy4n8Qe3EvkvTJR0M+YjqLJj8scQZviSHyda5VxNdXc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB3990 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh Add 'initialized' variable check before adding net/mgmt packet to TX queue as safety check before passing the commands to the firmware. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/cfg80211.c | 4 ++++ drivers/net/wireless/microchip/wilc1000/wlan.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c index 91a471f3b1c8..dc4bfe7be378 100644 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c @@ -728,6 +728,7 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev, { struct wilc_vif *vif = netdev_priv(dev); struct wilc_priv *priv = &vif->priv; + struct wilc *wilc = vif->wilc; u32 i = 0; u32 associatedsta = ~0; u32 inactive_time = 0; @@ -754,6 +755,9 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev, } else if (vif->iftype == WILC_STATION_MODE) { struct rf_info stats; + if (!wilc->initialized) + return -EBUSY; + wilc_get_statistics(vif, &stats); sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL) | diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index de5287cd8652..ea81ef120fd1 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -427,6 +427,11 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, return 0; } + if (!wilc->initialized) { + tx_complete_fn(tx_data, 0); + return 0; + } + tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC); if (!tqe) { @@ -476,6 +481,10 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, return 0; } + if (!wilc->initialized) { + tx_complete_fn(priv, 0); + return 0; + } tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC); if (!tqe) { From patchwork Thu Sep 16 16:49:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 513470 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 9464BC433EF for ; Thu, 16 Sep 2021 16:51:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 762E062F90 for ; Thu, 16 Sep 2021 16:51:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343512AbhIPQxM (ORCPT ); Thu, 16 Sep 2021 12:53:12 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:59215 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238910AbhIPQvN (ORCPT ); Thu, 16 Sep 2021 12:51:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631810993; x=1663346993; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=bUJG6HfYErLAPTvisUhd26+hGAGT5I1kXFnDpjGJS/Y=; b=1gpzUhNUO9zqfsN9UumvPmg3Qb/UIxoC5RvygcDfxw7UTWU4zGErFgtr elDr5X+sHtjTsKaT6Yp7tPG6FHy56V0ZIu5k79uG4X2EsZsdVO2riPHmU rAtWr9xSt8Pq0d9/kRlrlrzn6AbCVqJSRor2tZkcf5Y8FkWTwHePpKU3x 9ZOqL4joY/WoNJnVnbKje0UaIIM3A5/0vJz+m35WKSeDpqxommIRtaMFv KN/fJKNKrsIsqB0GtmcnsogSB9iN6sGAPQvE7Ucz10EPah3kqC8+KRDjE w8ecaeP87u4GuL8PXHn9qj/7LWyzxfeT/3lIFpj9ZfH9wognROmQlLe5D w==; IronPort-SDR: KjAmJcEDN6gMTQYw/yka+gTkafp9iIjabZkbyN8eJRGQ8uC4F+s84QIz8FnwL6mMa431sU5fdF +sGHcFfIrFB1OCZ6DYyeQj26MjAKCv3cTinuJ6cGRoDxhjBUXgesjS/PnHYzgbJgSEHDQMzUdL sYlctqfwfaJw03IFGyruHwsEPoezGevcqH2u/OCO0lIrgYWrvAx7bimUXFruq6gjkkFPgUr1cp CNy4ebslMh3ssrQQEypjwwutKh9EdEaQeeiZQkiQ9xvroy2b7Y/W8jlpol+PLP7qJBzZUg/nTW wzDsX+zxe8NTTVqjHZEiUQbM X-IronPort-AV: E=Sophos;i="5.85,299,1624345200"; d="scan'208";a="69561314" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Sep 2021 09:49:52 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 16 Sep 2021 09:49:52 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14 via Frontend Transport; Thu, 16 Sep 2021 09:49:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h1ZNu0g/slWVgr6n1CXB65P9CCywzCq4gYTP6Z8nvzZXCILAE1cDzDbnxwWj57af3PIvkgesZLuuIU78DJ3F26wjDk4JKNbDIORY9jdH528vwiwsZBE0d0ZlJLxQ70ho47g3Rn/gJ6tb5SlEy/dVJFPTiUu+yFKgrzYH/KN6uKWvvJHvextT5wdCZ9Y9SX8/Iv7IBvqzaZyPRfB5lL9/tzEerdkQk4b/sG74LC3SFMYjD717sy9sQ+SubNxseVA5wF/NPPIHMyEyQZWE9M/mYt7WpmD3RKeMuumNlcFeLWaWKf38dq57uZ0ZezCLuud7tmGu8kLkN2tKdOh/IK7ueA== 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=OdaPuRJXaXa0/cbXr9Arvsn0WeqMoIfba2l8M3uP9y4=; b=merD9p6fx3pZ81IL8G3pzeSGeYXj+OFwF1uDM0OB/GDicjnw+ebDHxg0W58frxmxkO6noEyY9Pq+m2Ren0EZz0KcNlahOpJ8OpLcKFBZvjzcIGRK+pT8gxbRp/X2Xy9RKUVC+ouOa89SymRjabuWq1nApF+VHjFRn6ODv1DH3ui7HpF932mALdg5Uy+oPsPFpmjvz3P2cDKdN5SR6DzpOOARP3ZpzNlyTbbgxQIL/3KyeTVXUq4QJHU3+bZRWtjgEOPQ+YAvIPieNtGIWYVWfSeJbf9N67DFBtFCGhuCnBXCfQKnxdwz/3cfHgcuAlUb/9v3DJ0E9km3OXvsaTkjTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OdaPuRJXaXa0/cbXr9Arvsn0WeqMoIfba2l8M3uP9y4=; b=eHTWnMRVAKftfWbNgwOMCorjToDeGdfWiZLt5qdBOznywHaFaCOHR0gMjoqpUyEkh35O6DfFtUGup9YTFGDB+7TqImdTOGB67mYylS0PCO+4qKMZuuqTYHO4hIHnJIbiJyRSAjSzpLe2c6afj7VIZmaLivJAJ/IP3FEB57QyPR4= Received: from SJ0PR11MB4943.namprd11.prod.outlook.com (2603:10b6:a03:2ad::17) by BY5PR11MB3990.namprd11.prod.outlook.com (2603:10b6:a03:18d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Thu, 16 Sep 2021 16:49:34 +0000 Received: from SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc]) by SJ0PR11MB4943.namprd11.prod.outlook.com ([fe80::b095:c8cf:1d0c:a3bc%5]) with mapi id 15.20.4500.019; Thu, 16 Sep 2021 16:49:34 +0000 From: To: CC: , Subject: [PATCH v2 11/11] wilc1000: increase config packets response wait timeout limit Thread-Topic: [PATCH v2 11/11] wilc1000: increase config packets response wait timeout limit Thread-Index: AQHXqxrNoiSicpseb0aRBOjPP5TBlA== Date: Thu, 16 Sep 2021 16:49:23 +0000 Message-ID: <20210916164902.74629-12-ajay.kathat@microchip.com> References: <20210916164902.74629-1-ajay.kathat@microchip.com> In-Reply-To: <20210916164902.74629-1-ajay.kathat@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.25.1 authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3910a575-d0ca-4327-b858-08d97931f6ab x-ms-traffictypediagnostic: BY5PR11MB3990: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xAexwYJqItgIh3cvmi3aqOJm15xd/gXHYWCego1TD0EY4P4qEPcKMIY9ntBvR4EsI3X9AJwXJ2deCkUXYVRHuwP9p3aRBtzizWKbSPM7v6DUQa32QA55rqk4rXUtBdaHHI6hsTbdCVf2gi3TSuwRpr+khAYC/xoZmWkRyk4+i6rFwG0sARJpIrAGbUKQvH9mI+zYWBpEH2WhUSEApN77qb/9eDFiMRqXXf5QSBjvO5rwHV+wmENapfjs7jUTfNz06p9A8rl8K6cVg2yYp67kyve0FG4b0Z0PuWZ/AONPU2YMKwHKUwX3dI3ajxuIfE8y46Mki+NNVrQYyjFgHlL8hqCzj5FFvAPvy2Q6dPicGK/X8YdaZN6NHcLr/vqNWBKM+i+Rs5qb6YRDB7r2ZRRZxij/lWed5T2NvYdW9NSfSwCUTgjvAHKlqRw8c6DlpORyYkMlPe8Or3XneadRlsv2HZa5jhNCRKstCCjK+fbP8ooFB9FnAtTpF4fDBHHwhxFXqHMewzfhn7VBJc1SoFqgk0dV37HOrxsKi4AZhhytTUjHgrXONpF4JXRL3835ILeWbHPcEUQxD9nQjH5k15urO8BwtX177Zz5q3ORiH3TEXqd15QlgStoyvwjjCs11Yb2anJdlCc6SWVXdxaLJeRrdU0L72zQOVQiozcKb13Rcu9Tc3l8HaE/PzZj85lsJXQ6 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB4943.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(91956017)(64756008)(38070700005)(38100700002)(66476007)(6916009)(8936002)(76116006)(6506007)(71200400001)(66446008)(2906002)(4326008)(83380400001)(107886003)(6666004)(8676002)(66556008)(5660300002)(186003)(4744005)(66946007)(1076003)(122000001)(54906003)(316002)(508600001)(6486002)(6512007)(2616005)(86362001)(26005)(36756003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?2XqZkd7V1/QC0WIPjm0J?= =?iso-8859-1?q?2bo4lrZb1DxQLZ9D5j3kZDmOf/gVKZCfC1TpUsgP6a2l9Z0jvsd?= =?iso-8859-1?q?PJ+R0AYts0D87CvTqUqrI2U9WrSNfUpdWmoSEuVsNjnwSqWM1qo?= =?iso-8859-1?q?dk1HQbHWXnTbeTY6hTZG5MzpLtCkxAPEYgu46E8u4WD5ord92J8?= =?iso-8859-1?q?XgO+msFHBE5sbEtSu0KUJssvpZFLvo+v8wxMwNM6Er9U3y//EYs?= =?iso-8859-1?q?F5ZXOr91Tj1gmuR/6xNCphg/EPneWirKTZY8o+g1beW7VAmyT8q?= =?iso-8859-1?q?rI/mdwNN9Nc0VWgpZUuezVc9cJn7aFCzU1BU91FHEzfy3KGKdUq?= =?iso-8859-1?q?Fmt7oaIIf1M4HSzMb3S5Q0q5//BB94T4d094zdOBalRWcN+3ltk?= =?iso-8859-1?q?deNe92mUc5XSDIpv5gMzRVhnUiMjhmU4wTRwuor7x0X620bV+X8?= =?iso-8859-1?q?VrxTHJ/+mrXCITmjYklNwcKwZd1hRzpMG1K9JnLQ32vAD+0feIE?= =?iso-8859-1?q?LZaJ6GHmHl9hjI2UO20YLDbx7G2dSzDPcu0zpoThVJTv02rp11o?= =?iso-8859-1?q?mvyUzsotyWRTWp1CD+cZUGociyLrFs6PGZTOz3U8ssAnWRcwGC4?= =?iso-8859-1?q?lDPAWzAh89PWO1Ec8Z1XQ+v6XZtRk263W/ht+ypc25ibm30menO?= =?iso-8859-1?q?NTI0sPi8WJfzgHXU6H7kauMJvkymc5SnrMqpx3fet50EHhd89MN?= =?iso-8859-1?q?NytnDOct/zWDi7x/QgeEkGtwB7zYmJgGGxsge1DZYpDm0Ocfr45?= =?iso-8859-1?q?T4zUCvBaSum3MkoJPosnJHFxzWdV7bBbCQ6d2vDenAQNAZDrS+7?= =?iso-8859-1?q?ZqAUuQ41Q2FkCo9ljaDbYAltqiDPPqqe5rnD0ugjQqcpm7A6rXh?= =?iso-8859-1?q?fhwnEO2STYDZqDBuvNQxdSFaJq0/0W/9Gs3ki85eCtSp5jqpp8I?= =?iso-8859-1?q?hAiofXC00q92RguzJgc+dV9f0FAKHx8kjlNrvjyCT8qlmcW9akW?= =?iso-8859-1?q?AeOipTjLPkhkPs4TsVZBb7J/Je4ILGU/uDsTqlBVGW50tINbIbW?= =?iso-8859-1?q?Y+LwrESB1pXNvxVrKB8a+Blz4p76lvMwAdvj6L50pPee5LCdnBV?= =?iso-8859-1?q?ahQRkjzxBrknbFN79KWYF7ulFEdR8AfMbJeEPM9NqYw2P4apUtJ?= =?iso-8859-1?q?gHXVWOowz3O+zFsyFfhDAJdBTVH1zK61M684jrmgtRRPe5mvhhU?= =?iso-8859-1?q?CIy83eNcZfzUkp2c7s2+4p3fETgbW4a5/mphlouXFKjAAq4ul9o?= =?iso-8859-1?q?s2scrpcL6txMGHM+t+2Ykj0gZM/ugP3UQ08OyCpDPGvBu8QY8qr?= =?iso-8859-1?q?pFS4DlVIRl5tccBDDX6DIt59HQTWeuwkIRat1jDXffBa31iAMEI?= =?iso-8859-1?q?G4Uhi8rvtIQnK1xZecyc7fN1fFeCYnp0FO37aCfqMHXzTB/Ln?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4943.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3910a575-d0ca-4327-b858-08d97931f6ab X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2021 16:49:23.0380 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aJhWhoaprWUZ7ACJ8kVDCGS6f7Ul4Py/CyDbAtl2gcLFr0tDArYe6FnDf2W5/O+pEGpVe8yNJFAZf4XKCpWTTa+qgLhWx3jc9/Cww28GH4I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB3990 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh Increase the WID config packet response timeout to have extra wait time for host to receive the response message from firmware. Sometimes the WID config response was timed out because of host interrupt latency. Signed-off-by: Ajay Singh --- drivers/net/wireless/microchip/wilc1000/wlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h index 150648b2c872..13fde636aa0e 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.h +++ b/drivers/net/wireless/microchip/wilc1000/wlan.h @@ -302,7 +302,7 @@ #define ENABLE_RX_VMM (SEL_VMM_TBL1 | EN_VMM) #define ENABLE_TX_VMM (SEL_VMM_TBL0 | EN_VMM) /* time for expiring the completion of cfg packets */ -#define WILC_CFG_PKTS_TIMEOUT msecs_to_jiffies(2000) +#define WILC_CFG_PKTS_TIMEOUT msecs_to_jiffies(3000) #define IS_MANAGMEMENT 0x100 #define IS_MANAGMEMENT_CALLBACK 0x080