From patchwork Thu Jul 25 21:31:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11059693 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A5691580 for ; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF11D289C0 for ; Thu, 25 Jul 2019 21:31:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E351928A8B; Thu, 25 Jul 2019 21:31:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EEB4289C0 for ; Thu, 25 Jul 2019 21:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726784AbfGYVbh (ORCPT ); Thu, 25 Jul 2019 17:31:37 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:33037 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbfGYVbg (ORCPT ); Thu, 25 Jul 2019 17:31:36 -0400 Received-SPF: Pass (esa1.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa1.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa1.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: 5bjQweDBhsocOYUPZYdFQNykH07wcs54gS6gsTQ/oteK66mQWBfZSF3DjMVuWUMy9RwTkK2xRg SlacBWkZ7/CTQAJ/XIx0A82YntMf02mUOPVfvClSO4AYEuo5nLPEAHoyJDeuLtaNcaE+4W4hrx NXaD10bwk6XqLpwoZLGtgky5TCCUhAYzPpAxAtORUnRTwDOOaH1/UeCRjxEoPl9jczcQ7BYf+r YRb2t65zqSJTIlDVKBMEcFNZFObsUlTONbcCAoMwaRPze7ZV2UQA64LWk1Pa6lCAFAYVI5IeAb Fzs= X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="44200122" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2019 14:31:35 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.87.152) by chn-vm-ex03.mchp-main.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 25 Jul 2019 14:31:35 -0700 Received: from NAM02-BL2-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_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 25 Jul 2019 14:31:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZpS8UlLRQdSEWgfQi8P2S00Kv+X1GvSwrK+GZCA/fXiHTd9pqUMx3H9YH/oP3XkfWHuiFW3fo0RRFG3zNhbZ3xCaO+/RULDGJxgBjxB0e5alVmh8jNaW77QGDvqdnTvA8/sngvF5XY0jnfjwJZgEvNDv0AHS1uLoNZGluOwJO7c7utzZ0qwIdB+3mCgsZAcMWOp4lIbiN8sNfW+E5mujadbNzck3YG8s3GK+4TwHzX2GEl4jge5Lkht4OwexAfu182li1hjsuPAuPztnHbj7ef5jEG7IrpjePqt4URiePCC8YnSVwftMCsa2uswnAhDlN/UjWnAtvYcyJG1xiJgTwA== 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=EzcjPC/RMgzop2flOKh6Gk4eAY//7OsClvCTHWN/WQA=; b=XPBtQCQ2ap2hTlyqRHe+LQL/Gwx2k/9SphdEWH04venjJuURQotNeSt31pfbTwUErFwjAbsH4g9n0QLZXsU4SKOXuiakE1WNN/w928bbriPOhDr/nJYzzeQGQ9WRBPGHZ6tmr094df6kC8gQMH1EFL4hLwgQj5roxy8obwWT2Fz0YtKqae3SPh9c8zs2AeAfMBGkWt0377ZMHnVJCC+nhphsyvFOLnqYFt6DD9wa8zADCFLprLFlgazNzCyFTo4OtWzFk4sv9pxLW32VMjBiymfKt/cLpYPXp3YNLJk0D9qqOKg+c9/GLRXZJ1pKWYQky8jXGZsPJHb+7VJjwAzvEg== 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=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EzcjPC/RMgzop2flOKh6Gk4eAY//7OsClvCTHWN/WQA=; b=O90IhoKtx0Vx73C9GGVffP6sSRw+IZa3S0audBS3vY0oVBhfVR40pGCaX5W0QEHBcsAf/CuvadYOJJtV9UimlSOQNPMu+LSk2Jpf6B2YcZ5rz5rRv2tTNVvuT7jWc0fDx0YbH8te7B8Po56G65dz8YTpZWZ+bF/Yg/ywp6FCc7M= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1984.namprd11.prod.outlook.com (10.175.54.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.13; Thu, 25 Jul 2019 21:31:33 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b%7]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 21:31:33 +0000 From: To: CC: , , , , Subject: [PATCH 1/6] staging: wilc1000: remove inetaddr notifier Thread-Topic: [PATCH 1/6] staging: wilc1000: remove inetaddr notifier Thread-Index: AQHVQzBU0zTEWOi4RkieztXudbrD3A== Date: Thu, 25 Jul 2019 21:31:33 +0000 Message-ID: <20190725213125.2810-2-adham.abozaeid@microchip.com> References: <20190725213125.2810-1-adham.abozaeid@microchip.com> In-Reply-To: <20190725213125.2810-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: MWHPR04CA0040.namprd04.prod.outlook.com (2603:10b6:300:ee::26) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 56101320-b9d6-4958-1a70-08d7114776af x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:MWHPR11MB1984; x-ms-traffictypediagnostic: MWHPR11MB1984: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:262; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(189003)(199004)(11346002)(2616005)(476003)(102836004)(386003)(446003)(486006)(6916009)(2351001)(6506007)(66946007)(186003)(99286004)(2501003)(76176011)(26005)(316002)(52116002)(5660300002)(66446008)(256004)(305945005)(6486002)(25786009)(64756008)(66556008)(66476007)(53936002)(1076003)(107886003)(71200400001)(86362001)(71190400001)(4326008)(14444005)(68736007)(478600001)(8936002)(6116002)(6512007)(14454004)(50226002)(8676002)(5640700003)(81166006)(81156014)(3846002)(2906002)(6436002)(66066001)(54906003)(7736002)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1984;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: hRMtkGFBdFGjppuTMwXE77ndFeil0TMfCugMTCpea68IBAjzNevgqICgsCSIiJWDViLs+oVrxJ5CVLCbY9jSwK40IBr+ZgS2rMGXLye/qi+Y6koFR/wp8rfB85FcOCwc4tDqZA0N18WJ/NtQtVZuMtTBjimBmm879UmnSce5qg34/psTiXpzTSo0awPumyZ/8aMp3CEePolIRRnIBCjgXiIHmtfv5AUEOG6L7R8JLK8BEbzKzbozpwE422JkwWU+C6fpz5ZLwBEvNIe/tkWhnyQjoPVaXLNv3iWPl5Z9pXTVBYwZAS4Zj3DOXVHZlHYmFedhocEIsdGGdlDaMEpy0A0tTNawL6i3EN8paOquFWRAu+k1oQVcEl2e7pzSjZQFp3mVX0xUF+UxsDopzaLT75l2GS6uCWwyqM7ZBIK/l5E= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 56101320-b9d6-4958-1a70-08d7114776af X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 21:31:33.0444 (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: adham.abozaeid@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1984 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid Driver registers an inetaddr notifier to disable powersave while the ip address is being obtained which should be controlled only by cfg80211. Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/wilc_netdev.c | 65 -------------------------- 1 file changed, 65 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/wilc_netdev.c index 8d8b7e4399f7..68129a0ba55f 100644 --- a/drivers/staging/wilc1000/wilc_netdev.c +++ b/drivers/staging/wilc1000/wilc_netdev.c @@ -504,12 +504,6 @@ static int wlan_initialize_threads(struct net_device *dev) return 0; } -static int dev_state_ev_handler(struct notifier_block *this, - unsigned long event, void *ptr); -static struct notifier_block g_dev_notifier = { - .notifier_call = dev_state_ev_handler -}; - static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif) { int ret = 0; @@ -575,7 +569,6 @@ static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif) ret = -EIO; goto fail_fw_start; } - register_inetaddr_notifier(&g_dev_notifier); wl->initialized = true; return 0; @@ -781,7 +774,6 @@ static int wilc_mac_close(struct net_device *ndev) if (wl->open_ifcs == 0) { netdev_dbg(ndev, "Deinitializing wilc1000\n"); wl->close = 1; - unregister_inetaddr_notifier(&g_dev_notifier); wilc_wlan_deinitialize(ndev); } @@ -864,63 +856,6 @@ static const struct net_device_ops wilc_netdev_ops = { .ndo_set_rx_mode = wilc_set_multicast_list, }; -static int dev_state_ev_handler(struct notifier_block *this, - unsigned long event, void *ptr) -{ - struct in_ifaddr *dev_iface = ptr; - struct wilc_priv *priv; - struct host_if_drv *hif_drv; - struct net_device *dev; - struct wilc_vif *vif; - - if (!dev_iface || !dev_iface->ifa_dev || !dev_iface->ifa_dev->dev) - return NOTIFY_DONE; - - dev = (struct net_device *)dev_iface->ifa_dev->dev; - if (dev->netdev_ops != &wilc_netdev_ops) - return NOTIFY_DONE; - - if (!dev->ieee80211_ptr || !dev->ieee80211_ptr->wiphy) - return NOTIFY_DONE; - - vif = netdev_priv(dev); - priv = &vif->priv; - - hif_drv = (struct host_if_drv *)priv->hif_drv; - - switch (event) { - case NETDEV_UP: - if (vif->iftype == WILC_STATION_MODE || - vif->iftype == WILC_CLIENT_MODE) { - hif_drv->ifc_up = 1; - vif->obtaining_ip = false; - del_timer(&vif->during_ip_timer); - } - - if (vif->wilc->enable_ps) - wilc_set_power_mgmt(vif, 1, 0); - - break; - - case NETDEV_DOWN: - if (vif->iftype == WILC_STATION_MODE || - vif->iftype == WILC_CLIENT_MODE) { - hif_drv->ifc_up = 0; - vif->obtaining_ip = false; - wilc_set_power_mgmt(vif, 0, 0); - } - - wilc_resolve_disconnect_aberration(vif); - - break; - - default: - break; - } - - return NOTIFY_DONE; -} - void wilc_netdev_cleanup(struct wilc *wilc) { int i; From patchwork Thu Jul 25 21:31:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11059695 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EB646C5 for ; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C76328A85 for ; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30D2F28A8B; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E69828A85 for ; Thu, 25 Jul 2019 21:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726764AbfGYVbh (ORCPT ); Thu, 25 Jul 2019 17:31:37 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:41144 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfGYVbg (ORCPT ); Thu, 25 Jul 2019 17:31:36 -0400 Received-SPF: Pass (esa4.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: YLGpRBRJgTVK0jaRDYOWFduUMHJf2YM0odliuK40MLWC97+b59W+ondFfY/VxigMAhF4ulfNsI dzMFeJLHviEx/nb1mlBAGwGRKYitp8JgZw6SN9i9+RW1013NkxObWGkE+M1XAVga/8I6Eti7Do o/s5XcxbugbVCaKjhg4ZKGvCHDjkJLSNWdzYJLO2q5B6DBPXk1YF26baqRy0OqQnRkyst1lRHV yan0u7aomru4hyX2MaxJOkjP39zLfMkMwhMKKNwMtqVrvQottR3X/BXFMzhHe8vDAHywg3+Y2e 5Gw= X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="42013687" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2019 14:31:36 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.87.152) by chn-vm-ex01.mchp-main.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 25 Jul 2019 14:31:34 -0700 Received: from NAM02-BL2-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_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 25 Jul 2019 14:31:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CepM/Rl7rsdO6Q4+vlWzyEqhDQ+RGfKY8llqxi3p+7gc4AR9nod4Bgi+iWt7A9Yle0R49S/hci/937XxMeO3Wuznullhyv7u7ti0M5xIwqzj8wjOiTcOnFx3I5UMAxqjpWffRyx/6F2Tf4ry03Dv1QQeIsplRYtWPhfHp99em8h7v41DwdXiBv//ip0PXiL9LqSMTiQUXOv/9ADBEWpRsKu1J5O3QdS72EjnYLohctOviD2darCW/1tt2/g/onBwLE4k/ra6xRTRbRVEiDyzFXhOVbND/cZ7myZoeRi2lMq8qbCYml4Kya6ha/F5I/dQJF7wuKrs36/RmKeWgtrn8A== 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=RWMYCJxFTPrnnCUe1JmVVDsNye3LXADjkqFYPgZjJ7A=; b=WeeKN5wKM8cmA5nZR9xI3wNEVp4aEchIeCXbfa/1hmT1Vw6zK/rrL9EAwolfT4oppmmsyxfYsAZQ09FLmjVfdYOCh59CEfNuubbybSI7nLPdOTjoR9Sx63m+Qi/GpsesuIJegCe3eGsl4qLy7PPFSmcB9Sy7Ay1dCDuxGfyDvP3oEHv7s70y32sKhZ4ZtXRQIuudReSPIHr1kPKuhzVxo/mCtq9hk2Njgy/m89VakVIynnQf2dDpggGZH/e3g/yuihBstE3O9LjcesNU9kdHz3oXm/Guhtk/Zuzd13bOyRRe3E+SqoQw3lygyRmdRTeV9uS4BiEXqie2OBxdlhTpGw== 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=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RWMYCJxFTPrnnCUe1JmVVDsNye3LXADjkqFYPgZjJ7A=; b=tLTmeXtx0uMQVSU4gzgqniw3ePNhqZU4HCDTw6A5cmFoygGEMndA0o3qTF3hhGwzIfcsAd/ohIImxDgTw5qAYj7QNBaX6NlFEY6MsOt7togbOt6yeDp0X/Hl2JCDLiHWFjobDboGx88sfsuPFGFGQ1nC9qikR3LADFQ7z5l34ck= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1984.namprd11.prod.outlook.com (10.175.54.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.13; Thu, 25 Jul 2019 21:31:34 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b%7]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 21:31:34 +0000 From: To: CC: , , , , Subject: [PATCH 2/6] staging: wilc1000: remove ip timeout timer Thread-Topic: [PATCH 2/6] staging: wilc1000: remove ip timeout timer Thread-Index: AQHVQzBUreyQ3c8XUEWXReu0mb6vuw== Date: Thu, 25 Jul 2019 21:31:34 +0000 Message-ID: <20190725213125.2810-3-adham.abozaeid@microchip.com> References: <20190725213125.2810-1-adham.abozaeid@microchip.com> In-Reply-To: <20190725213125.2810-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: MWHPR04CA0040.namprd04.prod.outlook.com (2603:10b6:300:ee::26) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ddaa7eab-63c7-49b9-e61e-08d711477732 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:MWHPR11MB1984; x-ms-traffictypediagnostic: MWHPR11MB1984: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:843; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(189003)(199004)(11346002)(2616005)(476003)(102836004)(386003)(446003)(486006)(6916009)(2351001)(6506007)(66946007)(186003)(99286004)(2501003)(76176011)(26005)(316002)(52116002)(5660300002)(66446008)(256004)(305945005)(6486002)(25786009)(64756008)(66556008)(66476007)(53936002)(1076003)(107886003)(71200400001)(86362001)(71190400001)(4326008)(14444005)(68736007)(478600001)(8936002)(6116002)(6512007)(14454004)(50226002)(8676002)(5640700003)(81166006)(81156014)(3846002)(2906002)(6436002)(66066001)(54906003)(7736002)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1984;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UQeO3oEbPVnDzGRmSiRsiqVIyfidPc1yPHnya+5q0dCLxs4KVYH8KfBv2cDkMYnjpvKNIwzSkJQ/CeP61u6SoZwO6OVMczul+vuUSwxkCslMQAOgZuXxW8xQN6hXbnwsBpH0plWuMxxKceDoecO8paNwwjZfGRtdiqPCAVzQ8V3Vlcl1tf7OpJRUWvfxn4UFgnpuWhlI0XM8zZe6kkI40RnGzZ7CFCZ36tF4izlEGng5tIZ2GYOLHxmNCgAQoHYlfzdyRb0GIyQ70oFTDHTmWLPFDbK9cvq0yRfFLH+26xtLirxmJQYGU/8z78CkFOv87XIpZlVdkWRWYLmAFwPgGuoXklS7kxl/hFNzOyDY1ss/AhCTI8F045DFhxwJx0Do9JaaTAl/y2mqmzY8bSSi8/nnp+iKTDWjae91zMhIxZY= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ddaa7eab-63c7-49b9-e61e-08d711477732 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 21:31:34.0192 (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: adham.abozaeid@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1984 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid during_ip_timer is not required after removing the code that disables powersave while the ip is being obtained. Its handler clear_during_ip is also removed Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/wilc_hif.c | 2 -- .../staging/wilc1000/wilc_wfi_cfgoperations.c | 16 ---------------- 2 files changed, 18 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c index 9345cabe3c93..9bd2d14ad610 100644 --- a/drivers/staging/wilc1000/wilc_hif.c +++ b/drivers/staging/wilc1000/wilc_hif.c @@ -684,8 +684,6 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif, hif_drv->hif_state = HOST_IF_CONNECTED; vif->obtaining_ip = true; - mod_timer(&vif->during_ip_timer, - jiffies + msecs_to_jiffies(10000)); } else { hif_drv->hif_state = HOST_IF_IDLE; } diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 736eedef23b6..5559f27c8e24 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -70,15 +70,6 @@ struct wilc_p2p_mgmt_data { static const u8 p2p_oui[] = {0x50, 0x6f, 0x9A, 0x09}; static const u8 p2p_vendor_spec[] = {0xdd, 0x05, 0x00, 0x08, 0x40, 0x03}; -#define WILC_IP_TIMEOUT_MS 15000 - -static void clear_during_ip(struct timer_list *t) -{ - struct wilc_vif *vif = from_timer(vif, t, during_ip_timer); - - vif->obtaining_ip = false; -} - static void cfg_scan_result(enum scan_event scan_event, struct wilc_rcvd_net_info *info, void *user_void) { @@ -1422,7 +1413,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, priv->p2p.recv_random = 0x00; priv->p2p.is_wilc_ie = false; vif->obtaining_ip = false; - del_timer(&vif->during_ip_timer); switch (type) { case NL80211_IFTYPE_STATION: @@ -1470,8 +1460,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, case NL80211_IFTYPE_P2P_GO: vif->obtaining_ip = true; - mod_timer(&vif->during_ip_timer, - jiffies + msecs_to_jiffies(WILC_IP_TIMEOUT_MS)); wilc_set_operation_mode(vif, WILC_AP_MODE); dev->ieee80211_ptr->iftype = type; priv->wdev.iftype = type; @@ -1949,8 +1937,6 @@ int wilc_init_host_int(struct net_device *net) struct wilc_vif *vif = netdev_priv(net); struct wilc_priv *priv = &vif->priv; - timer_setup(&vif->during_ip_timer, clear_during_ip, 0); - priv->p2p_listen_state = false; mutex_init(&priv->scan_req_lock); @@ -1973,8 +1959,6 @@ void wilc_deinit_host_int(struct net_device *net) mutex_destroy(&priv->scan_req_lock); ret = wilc_deinit(vif); - del_timer_sync(&vif->during_ip_timer); - if (ret) netdev_err(net, "Error while deinitializing host interface\n"); } From patchwork Thu Jul 25 21:31:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11059701 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E62E8912 for ; Thu, 25 Jul 2019 21:31:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D589328A7C for ; Thu, 25 Jul 2019 21:31:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C990E28A80; Thu, 25 Jul 2019 21:31:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43DDE28A81 for ; Thu, 25 Jul 2019 21:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726794AbfGYVbj (ORCPT ); Thu, 25 Jul 2019 17:31:39 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:20977 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbfGYVbi (ORCPT ); Thu, 25 Jul 2019 17:31:38 -0400 Received-SPF: Pass (esa3.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa3.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa3.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: AcVNhtcDfQFU2Cs29sd1aTQKsmyKWCP+k6Ob3NgckGsvXIFpRtnCY0Eomnd+wr/UbDq1oApIzq IMcw/iwGd8x6PHcQTKI9YlJqWTKb2p9Cx/3EKWpCfH1zt+WxAYHjilBnG7H2KFNlqCuEAdCLG7 ZcAbJ+rlYRnbr+h4P9LbsikcdOa2khE4NoLpOs+ELt4nyfv9XhXwUfB9UN+nE/0R/F3p58PRId TDXEFHFIdytRFT/LoU9uUkdqDQPAijoXM+VVfZ0gdwLSQ3L2Feyt1HsP8VvekCweQ58Nimn+ve 188= X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="42815736" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2019 14:31:36 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.87.152) by chn-vm-ex04.mchp-main.com (10.10.87.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 25 Jul 2019 14:31:36 -0700 Received: from NAM02-BL2-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_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 25 Jul 2019 14:31:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S15pPVKXsx68dl7NXpIzIhDX6l2pHp8w4J65zXftg6w1thpOFb9SpZOp4N5KYHF6nKLp0Y/fc1XAwyXPO4Pf4EOUhYtl7RGjCuuxiJlLqmZZcNzGftyiynE63xuXslkoQh+qoU8ySDlar/icCwGoDrEgagMArl4wrXIsjfLJUGgu+2+Ws+zDvHzQMu9yVcWwdtCjOEP3OdX2sSku5NzqIBpHYEMsCLHYFFO0/wHMtwULzUL+tfPKMB2jq4x73zPVMHt9sAzEQhwlT5WwY1SzdwawsbTFvMxZ9T8nd1iefjQOmEtbi4Y4jU0Kihh3SxPC0ZT5UKr8PpUJl8377jlruQ== 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=VL33oM3PwYbtC0leddwZMempv2b1RF+7y6MhQ6V8Pss=; b=anx0q/dpEY0nRVPvbo37sMqPeDDPN1ga03cZEl1s/QY01NUaSmbuc4JffT5NGj5exX8NtSmaFZOiXtMAdnu4MIBJreqxtpbZY4IYEgVhxeNLPfW4QmPvhw4zUga19j/efUDjmhTtekqB9gfM1hMVEQlU968rbzwqu6/gDiEvsvvGH0Va3NthGgBopn/YpNuWIjRsoYV2Lv4vq57iSBRaOKIDjzaUt0+UH5HiZJ8Wt2RChgZcUFBnNi9aZaN933gy50/nVNR+M6TUr9vMOJwTXFpr//BjTrlNyXbyJQT3m8Y6C4zo43ArAMu4F+aCYi2MHp6glpnU/XpomkKZgmHgJA== 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=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VL33oM3PwYbtC0leddwZMempv2b1RF+7y6MhQ6V8Pss=; b=qy6nrBD0UfuRabpNRtt6uh8LDcE0cAs5/zuflU6quON3lyieUdhjlx1ZEl29gZVQLlH5mNZUoYrkKiG6/UgQNQhJb78sKQiX0wTRinBwgbtOL6wU0MJi4LewROo0hhlQR5M0Nr0YH0GPeSJvo0N/dns44DOTr90XfZLdQ9vLj7w= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1984.namprd11.prod.outlook.com (10.175.54.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.13; Thu, 25 Jul 2019 21:31:35 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b%7]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 21:31:35 +0000 From: To: CC: , , , , Subject: [PATCH 3/6] staging: wilc1000: remove unused members Thread-Topic: [PATCH 3/6] staging: wilc1000: remove unused members Thread-Index: AQHVQzBVmkV0XiIfSkqdQ0TzXZfFVQ== Date: Thu, 25 Jul 2019 21:31:34 +0000 Message-ID: <20190725213125.2810-4-adham.abozaeid@microchip.com> References: <20190725213125.2810-1-adham.abozaeid@microchip.com> In-Reply-To: <20190725213125.2810-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: MWHPR04CA0040.namprd04.prod.outlook.com (2603:10b6:300:ee::26) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 236b70ff-5205-4871-fa08-08d7114777ce x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:MWHPR11MB1984; x-ms-traffictypediagnostic: MWHPR11MB1984: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:193; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(189003)(199004)(11346002)(2616005)(476003)(102836004)(386003)(446003)(486006)(6916009)(2351001)(6506007)(66946007)(186003)(99286004)(2501003)(76176011)(26005)(316002)(52116002)(5660300002)(66446008)(256004)(305945005)(6486002)(25786009)(64756008)(66556008)(66476007)(53936002)(1076003)(107886003)(71200400001)(86362001)(71190400001)(4326008)(14444005)(68736007)(478600001)(8936002)(6116002)(6512007)(14454004)(50226002)(8676002)(5640700003)(81166006)(81156014)(3846002)(2906002)(6436002)(66066001)(54906003)(7736002)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1984;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: J2krTnVpfDLQErzak6ihhZrsj/Y2ty/42MRPdhduOq1qmxwwL+ain4IYtQECDTazJwyCjTmE6SJxRuRP30w8FAnr6Tk4OEoCg6hAtn9mHvxRAqN26hLQeqlrxtsjq890R52zxrot9zXRyzalD31KEahiT23cx1cyV8GK1UMTbNltYCjJMK59wdyGs0ks59LS8n9g6tLc9D5fFUVrHB4sgI5j/rPWlSqTp46OPL6nl88Ui8BCPcS1iDULZdo5uZhbjtDkVpZiAbxlcNQh3Y8rFGzjkC99I+QPNxd2yp+A1l9uSrFm/hwgUZlhZk25oTeiQ6ZGMrAdUJ/23s37zw4bfKbxrxjciyK/IBP2hYWVyJbL4j95Z6VKHKFSDGIoIpv90z23mATBZzH+MAlOuVvyo7aN54S+XIg6cWSf85G5vHQ= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 236b70ff-5205-4871-fa08-08d7114777ce X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 21:31:34.9140 (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: adham.abozaeid@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1984 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid remove obtaining_ip from struct wilc_vif Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/wilc_hif.c | 9 ++------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c index 9bd2d14ad610..611f842d2836 100644 --- a/drivers/staging/wilc1000/wilc_hif.c +++ b/drivers/staging/wilc1000/wilc_hif.c @@ -248,7 +248,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, goto error; } - if (vif->obtaining_ip || vif->connecting) { + if (vif->connecting) { netdev_err(vif->ndev, "Don't do obss scan\n"); result = -EBUSY; goto error; @@ -682,8 +682,6 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif, wilc_set_power_mgmt(vif, 0, 0); hif_drv->hif_state = HOST_IF_CONNECTED; - - vif->obtaining_ip = true; } else { hif_drv->hif_state = HOST_IF_IDLE; } @@ -707,7 +705,6 @@ static inline void host_int_handle_disconnect(struct wilc_vif *vif) } if (hif_drv->conn_info.conn_result) { - vif->obtaining_ip = false; wilc_set_power_mgmt(vif, 0, 0); hif_drv->conn_info.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF, @@ -770,7 +767,6 @@ int wilc_disconnect(struct wilc_vif *vif) wid.val = (s8 *)&dummy_reason_code; wid.size = sizeof(char); - vif->obtaining_ip = false; wilc_set_power_mgmt(vif, 0, 0); result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1); @@ -922,7 +918,7 @@ static int handle_remain_on_chan(struct wilc_vif *vif, if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) return -EBUSY; - if (vif->obtaining_ip || vif->connecting) + if (vif->connecting) return -EBUSY; remain_on_chan_flag = true; @@ -1608,7 +1604,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) *hif_drv_handler = hif_drv; vif->hif_drv = hif_drv; - vif->obtaining_ip = false; if (wilc->clients_count == 0) mutex_init(&wilc->deinit_lock); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 5559f27c8e24..6ac0fe58ceed 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -167,7 +167,6 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt, u8 mac_status, } else if (conn_disconn_evt == CONN_DISCONN_EVENT_DISCONN_NOTIF) { u16 reason = 0; - vif->obtaining_ip = false; priv->p2p.local_random = 0x01; priv->p2p.recv_random = 0x00; priv->p2p.is_wilc_ie = false; @@ -1412,7 +1411,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, priv->p2p.local_random = 0x01; priv->p2p.recv_random = 0x00; priv->p2p.is_wilc_ie = false; - vif->obtaining_ip = false; switch (type) { case NL80211_IFTYPE_STATION: @@ -1459,7 +1457,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, break; case NL80211_IFTYPE_P2P_GO: - vif->obtaining_ip = true; wilc_set_operation_mode(vif, WILC_AP_MODE); dev->ieee80211_ptr->iftype = type; priv->wdev.iftype = type; diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 1e74a08e7cf1..704e4d572695 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -203,7 +203,6 @@ struct wilc_vif { struct net_device *ndev; u8 mode; struct timer_list during_ip_timer; - bool obtaining_ip; struct timer_list periodic_rssi; struct rf_info periodic_stat; struct tcp_ack_filter ack_filter; From patchwork Thu Jul 25 21:31:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11059697 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AFC2E17EF for ; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F60F28A80 for ; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9387628A7E; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0734028A80 for ; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726810AbfGYVbj (ORCPT ); Thu, 25 Jul 2019 17:31:39 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:41144 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbfGYVbi (ORCPT ); Thu, 25 Jul 2019 17:31:38 -0400 Received-SPF: Pass (esa4.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: P5wpaA/gMZQi1vFGGjzSw1SoylT/voIUsFNkvoAZ7TUMLOLbOHuJ2n/85bRhiz55jk4lZ9RZY/ hYXjC2z7JMlso5Ie8GJ+A14dpwR0CS5VtzRzEs0coCnHZQfIW2HhucaRI7POBY0KJqIuExx7kz SAgIjfQDwy4E4RIG5O9UlfYKWMcmtpjMBDDmEJ3pWAPMTSa7eG2B5xB7sYx6BvSFVRnw6cicGP f/2lDWey+0H199jP6Jyx8KyDXr5HYN75GjpS9XbYySfShzmSHVW1TaO5VGbeb168GKdUxwnwbj 98o= X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="42013692" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2019 14:31:37 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.87.152) by chn-vm-ex04.mchp-main.com (10.10.87.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 25 Jul 2019 14:31:37 -0700 Received: from NAM02-BL2-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_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 25 Jul 2019 14:31:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XEIYZwtoMXzyDIKi8MLQ3omI/JvKKfFGPAFSIiZTnF3tUdsNbQG/aBO2F49vz5yQOV9Dm1Rr6l7J2zCJD7/chytIOA4TU7++uiONwDlRqtQI9TSJEXALr1cK2HHqnhKCORW0UU69E0tZ70pw88PyKBiS5RdnDYRMk0iNVP1pxFR+h5VOeYSJgDstDA7JOGwv+ojW8LiutIZQbbD5EaK39ygLNSt0wMz7QVp/2kMcZvU16hkliRCxyRjszuagi3oCpdskUwPhLpYBx5F6q78dlafbN/4o2ct8mEKoRWlvm4o5meX5AECwZTYOf1QK+68ohpvQHtpiVAR3gUbxbM3Agg== 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=Kw5/tydGLOV2Am76N9CUgYHZV+HqWjFMZB3ghfhDhAA=; b=E98GrvANI3MdrptMHNyCvHKYXdcTQsQ1/tyDthpDw6HT+C5boz05pB5S/y7LclXn5BnfwbppmysOinm71KF3Gh2aPBmsLPOOrh64E9Xdz1N7R/l+SvNQoefIAyxxPbEPYfNMlLCaFaKY+yRdTmKZQqCwXiOWozld4lV+6t5diHoSVebiv86dLO6X99sO2KwNumYyftBZrOQ8ZEwCEDiPMF3Z0KoORw7961Vf+KR6mXIChcpm1/kzqUZupXrVFqAMzdmQ/L9+bNj1PjxXgP1cA6rXf8a1JdXA2uPGcx6+sDegqgvGVzvAmMxtK+PfyoXKfSL7ZyfwiLtJJmcDKltZ/Q== 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=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kw5/tydGLOV2Am76N9CUgYHZV+HqWjFMZB3ghfhDhAA=; b=PHcHNxFbZ7wi1DJAejTam7VQ6D8A9091V8kAnScA3HNzK4Zh19a4tDEvGo/5Bw74lDDudxWwOXgXzSRuy3EH4NdNNdjl2v4fUZ6S+kvh8lVxXPOcF4OGjEUucUxwuoI6KY0uL20nW5V43/1Dx+q0umgivNNyVR8gFczbr1wCHN8= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1984.namprd11.prod.outlook.com (10.175.54.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.13; Thu, 25 Jul 2019 21:31:36 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b%7]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 21:31:36 +0000 From: To: CC: , , , , Subject: [PATCH 4/6] staging: wilc1000: avoid overriding powersave state Thread-Topic: [PATCH 4/6] staging: wilc1000: avoid overriding powersave state Thread-Index: AQHVQzBVoN2TYYOHTku0fkunV/xJ7w== Date: Thu, 25 Jul 2019 21:31:35 +0000 Message-ID: <20190725213125.2810-5-adham.abozaeid@microchip.com> References: <20190725213125.2810-1-adham.abozaeid@microchip.com> In-Reply-To: <20190725213125.2810-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: MWHPR04CA0040.namprd04.prod.outlook.com (2603:10b6:300:ee::26) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6a6e212a-b4b2-4ba3-3ebd-08d711477851 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:MWHPR11MB1984; x-ms-traffictypediagnostic: MWHPR11MB1984: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1824; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(43544003)(189003)(199004)(11346002)(2616005)(476003)(102836004)(386003)(446003)(486006)(6916009)(2351001)(6506007)(66946007)(186003)(99286004)(2501003)(76176011)(26005)(316002)(52116002)(5660300002)(66446008)(256004)(305945005)(6486002)(25786009)(64756008)(66556008)(66476007)(53936002)(1076003)(107886003)(71200400001)(86362001)(71190400001)(4326008)(14444005)(68736007)(478600001)(8936002)(6116002)(6512007)(14454004)(50226002)(8676002)(5640700003)(81166006)(81156014)(3846002)(2906002)(6436002)(66066001)(54906003)(7736002)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1984;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: QGv4no77C2hlCmln15Iue6Dyoanj3mclhlSYY8ChFwvvEBKktu9kwqiUy8iupSGXZYjQ1kXqNYiGU9RxIISuvFshr66bsqykR6BtuIfEyDtpoKwKWHKqrEHx4IJlHhQwXNv2pbgXFmbqD3I7R56jmPdGLzrjsrEOAuaKV4TLwD5ArHcPOG6NLPYmxrHZpzWbGqxfT1mUhL7drtKoXtK1Blw9X2UNMR74QYtC79KllYgi9JDtb74gpCL/belv8quoShV/aaxwDPDVo1TsBORp6dhVghkiHTIeKLmRYfsfFhzXjzNob0Q34LTuZJkhuziC8ulQBjekiFo3WmLKd63AmEnnYTYlqF2ddBZh49zHP1yXvJTEwI719ZOLC5uaYHCph3UC6z5ir4j8di6wncVYhzO4zBrFixz0YoF2ZzwJD8g= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6a6e212a-b4b2-4ba3-3ebd-08d711477851 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 21:31:35.7637 (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: adham.abozaeid@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1984 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid Don't override powersave state with respect to the open interfaces and let the firmware take care of when it's appropriate to do so Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/wilc_hif.c | 11 ++--------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 15 +-------------- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c index 611f842d2836..16ff610c6a5b 100644 --- a/drivers/staging/wilc1000/wilc_hif.c +++ b/drivers/staging/wilc1000/wilc_hif.c @@ -679,8 +679,6 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif, if (mac_status == WILC_MAC_STATUS_CONNECTED && conn_info->status == WLAN_STATUS_SUCCESS) { ether_addr_copy(hif_drv->assoc_bssid, conn_info->bssid); - wilc_set_power_mgmt(vif, 0, 0); - hif_drv->hif_state = HOST_IF_CONNECTED; } else { hif_drv->hif_state = HOST_IF_IDLE; @@ -704,14 +702,11 @@ static inline void host_int_handle_disconnect(struct wilc_vif *vif) handle_scan_done(vif, SCAN_EVENT_ABORTED); } - if (hif_drv->conn_info.conn_result) { - wilc_set_power_mgmt(vif, 0, 0); - + if (hif_drv->conn_info.conn_result) hif_drv->conn_info.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF, 0, hif_drv->conn_info.arg); - } else { + else netdev_err(vif->ndev, "%s: conn_result is NULL\n", __func__); - } eth_zero_addr(hif_drv->assoc_bssid); @@ -767,8 +762,6 @@ int wilc_disconnect(struct wilc_vif *vif) wid.val = (s8 *)&dummy_reason_code; wid.size = sizeof(char); - wilc_set_power_mgmt(vif, 0, 0); - result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1); if (result) { netdev_err(vif->ndev, "Failed to send disconnect\n"); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 6ac0fe58ceed..716c60d0f962 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1394,8 +1394,7 @@ static int set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, if (!priv->hif_drv) return -EIO; - if (vif->wilc->enable_ps) - wilc_set_power_mgmt(vif, enabled, timeout); + wilc_set_power_mgmt(vif, enabled, timeout); return 0; } @@ -1425,9 +1424,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, memset(priv->assoc_stainfo.sta_associated_bss, 0, WILC_MAX_NUM_STA * ETH_ALEN); - - wl->enable_ps = true; - wilc_set_power_mgmt(vif, 1, 0); break; case NL80211_IFTYPE_P2P_CLIENT: @@ -1438,12 +1434,9 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, vif->iftype = WILC_CLIENT_MODE; wilc_set_operation_mode(vif, WILC_STATION_MODE); - wl->enable_ps = false; - wilc_set_power_mgmt(vif, 0, 0); break; case NL80211_IFTYPE_AP: - wl->enable_ps = false; dev->ieee80211_ptr->iftype = type; priv->wdev.iftype = type; vif->iftype = WILC_AP_MODE; @@ -1452,7 +1445,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif), 0, vif->idx); wilc_set_operation_mode(vif, WILC_AP_MODE); - wilc_set_power_mgmt(vif, 0, 0); } break; @@ -1461,9 +1453,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, dev->ieee80211_ptr->iftype = type; priv->wdev.iftype = type; vif->iftype = WILC_GO_MODE; - - wl->enable_ps = false; - wilc_set_power_mgmt(vif, 0, 0); break; default: @@ -1485,7 +1474,6 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev, netdev_err(dev, "Error in setting channel\n"); wilc_wlan_set_bssid(dev, dev->dev_addr, WILC_AP_MODE); - wilc_set_power_mgmt(vif, 0, 0); return wilc_add_beacon(vif, settings->beacon_interval, settings->dtim_period, &settings->beacon); @@ -1836,7 +1824,6 @@ int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type, *wilc = wl; wl->io_type = io_type; wl->hif_func = ops; - wl->enable_ps = false; wl->chip_ps_state = WILC_CHIP_WAKEDUP; INIT_LIST_HEAD(&wl->txq_head.list); INIT_LIST_HEAD(&wl->rxq_head.list); diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 704e4d572695..7e7ce9471f67 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -261,7 +261,6 @@ struct wilc { struct device *dev; bool suspend_event; - bool enable_ps; int clients_count; struct workqueue_struct *hif_workqueue; enum chip_ps_states chip_ps_state; From patchwork Thu Jul 25 21:31:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11059699 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2941A912 for ; Thu, 25 Jul 2019 21:31:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18D7D28A81 for ; Thu, 25 Jul 2019 21:31:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D0F428A85; Thu, 25 Jul 2019 21:31:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7FFA28A86 for ; Thu, 25 Jul 2019 21:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726816AbfGYVbk (ORCPT ); Thu, 25 Jul 2019 17:31:40 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:41144 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726785AbfGYVbj (ORCPT ); Thu, 25 Jul 2019 17:31:39 -0400 Received-SPF: Pass (esa4.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: vfx4sY7Gtt3oDSyVoneonG3gSiX7Npdg1kuvcsRA1CyAed/iPOCnhfqKIJRg5t4Zvn/BEfD9jj dpFeLZeD5ptuZVA4PsIZWszIO+yt+FNJgTjj6DKg+gpY5kSWlwUoJrUpsjSBwMK8Aed9eay5Fv jIiZCb2GCJ/0/1CebSjc2D2m6jwfUjbosJybetKuBkFIVyvU5sVwD248j8pYNJU9+1lM1IKDCF NYL8P1QMSeHBUhq10QmLBPO4yfs9iT+NVQWfHLx1oDvMpGVgULP2N2Kiowgv3QOKkx5I2UknmF 0J0= X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="42013696" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2019 14:31:38 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.87.152) by chn-vm-ex04.mchp-main.com (10.10.87.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 25 Jul 2019 14:31:38 -0700 Received: from NAM02-BL2-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_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 25 Jul 2019 14:31:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=icWm37SKWFGa+F1UMAN4kgtDnOxFdPJ+sxTG1o/+cN9sR+WArA1NJq39GIXQBlS8NrsaSRHAAaMl/qKPoLVtnHbMxWDw3TWUMt/ohCawkTXYj33KQrvizYzZcj4wcQd/qTBvxVI+xuqg0/qqKU0Dg87cH56Qto6MQy7ia+lgUja7+fz2JJuyrJlRlOWSDFRkyaWMYan5SQNSmdcgR4kCCtefW8qXSxwVvn8MkOhbt6nLOsM09npCQLU8QmazoraKYWqQnoRgIal/iUU8trqkmuQG8K+Kt3ZCw7jtCocEYDf+LUTDnm28XsvIhCVu2WSBH1afo0+xy3U5mnpCtbATag== 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=Wgy0l+Vl92lqCLinfJs95q0omNdQJifh8yhIz/mw76M=; b=e/vQHLFgNLYMf0CY0EZZ744l5nLo1Aa6VHUC1wf0WZj7SmwgnN0VWs7EmToJ1sB0HXR5DxHV360MK/Nsuv1xhsph5DgOm4O3UFyZi30J3+kp/Zvd7aIh6QekuSdQN48iKpN3P9Qx4nliYzQCYkGsk4qGoQe0q9Uj5hDN4iTarc27yKRsxRzFwtkTkRzTp+c/BjcJfmvwwcRyEbfmyX/1qygs+0dc+Uhxf7A5t+2zTZWD9FgrIfBFlkC76Hrtfxm6os12mbE+EbvNYUOl6l27U2ddXXjAdBSYNRPohXg5xzDFOPZjPGF40XdLtUZSm38BagasFoQyDaJAm3wyoKNtTg== 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=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wgy0l+Vl92lqCLinfJs95q0omNdQJifh8yhIz/mw76M=; b=hnkcpX7RZNCpXiaGpIauVIzwt0+ci6g12540+ul1LfXSdmrJwyDWXjmEDjAT3Tnhq165en5g8qdeH+edWTtKd00+IU6B32qseDvO0PxCy7U3Ic+pFBDToVhP5OXuiR5CIRo+RCY9qlfcczxsKYYeaa7EcBBh/d0lafWBEvtr25k= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1984.namprd11.prod.outlook.com (10.175.54.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.13; Thu, 25 Jul 2019 21:31:36 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b%7]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 21:31:36 +0000 From: To: CC: , , , , Subject: [PATCH 5/6] staging: wilc1000: apply power management regardless of open interfaces Thread-Topic: [PATCH 5/6] staging: wilc1000: apply power management regardless of open interfaces Thread-Index: AQHVQzBWJp/Kmut4o0O53F6bDP3YHA== Date: Thu, 25 Jul 2019 21:31:36 +0000 Message-ID: <20190725213125.2810-6-adham.abozaeid@microchip.com> References: <20190725213125.2810-1-adham.abozaeid@microchip.com> In-Reply-To: <20190725213125.2810-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: MWHPR04CA0040.namprd04.prod.outlook.com (2603:10b6:300:ee::26) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 27835f88-952c-4a37-782b-08d7114778d9 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:MWHPR11MB1984; x-ms-traffictypediagnostic: MWHPR11MB1984: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:167; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(189003)(199004)(11346002)(2616005)(476003)(102836004)(386003)(446003)(486006)(6916009)(2351001)(6506007)(66946007)(186003)(99286004)(2501003)(76176011)(26005)(316002)(52116002)(5660300002)(66446008)(256004)(305945005)(6486002)(25786009)(64756008)(66556008)(66476007)(53936002)(1076003)(107886003)(71200400001)(86362001)(71190400001)(4326008)(68736007)(478600001)(8936002)(6116002)(6512007)(14454004)(50226002)(4744005)(8676002)(5640700003)(81166006)(81156014)(3846002)(2906002)(6436002)(66066001)(54906003)(7736002)(36756003)(26953001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1984;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: yGrtt4IlNrxTHU2jE5yb1xvAte6GVEOrbmpjxCMM1NPCbyUyX/b/mHQSaj1g/9CyChteEVpxbzzCDgBFtMxGkxM/bgEUGoLVw+Zl8lN7rjjTLEOMGkIMyg921reaE7/NtIm9/KEZNcqUwqYcLuZ4cLuhYmiiPN8uaJ+P+2M5Lr1AdE4XAghL8F1aK8Z4bsgQ3qZlAzFBc6q7GAXws7ZXT/y1RzaMy4Mquvk9d/b5otpOajF5/YkuPX7/YTp3OegZF2WGmvI7D1TqPrreL22yRkZWDL4vysZRX7W0eUR26rLpe3UkEYdQdVmw47rEGYib2C+eIJkAAIm8fjDOlwdcu9UPLTT11xTJDmCfakwmugWYHE8aECfiDkUfEIUQDd+cZabzMpjoX7z+8JN6AuAHbALD7spDOXY4ahozQ6NLYGU= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 27835f88-952c-4a37-782b-08d7114778d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 21:31:36.6745 (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: adham.abozaeid@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1984 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid Don't ignore power management if 2 interfaces are open Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/wilc_hif.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c index 16ff610c6a5b..75a6931aa147 100644 --- a/drivers/staging/wilc1000/wilc_hif.c +++ b/drivers/staging/wilc1000/wilc_hif.c @@ -2010,9 +2010,6 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout) int result; s8 power_mode; - if (wilc_wlan_get_num_conn_ifcs(vif->wilc) == 2 && enabled) - return 0; - if (enabled) power_mode = WILC_FW_MIN_FAST_PS; else From patchwork Thu Jul 25 21:31:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11059703 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BC966C5 for ; Thu, 25 Jul 2019 21:31:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A8B228A13 for ; Thu, 25 Jul 2019 21:31:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F34EE28A81; Thu, 25 Jul 2019 21:31:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B4D528A13 for ; Thu, 25 Jul 2019 21:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726819AbfGYVbm (ORCPT ); Thu, 25 Jul 2019 17:31:42 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:33037 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbfGYVbj (ORCPT ); Thu, 25 Jul 2019 17:31:39 -0400 Received-SPF: Pass (esa1.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa1.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa1.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: sprf7Gb3d3IUq3RzH2mkjRXW+FUJxI1+uszcQfHNkJmdsvzQ/Ejx6qsHMBxVwsfeclOjvX4E75 ZIYQ6MstidbKT5xBgsq3yNoQVjvnIsRIc50kzP2gTxCGfmyhbV1UK1C+WLEB0kHABgcGU46SSC 73/hU4AAOoPeDH8bgfVNwMrj3XNNFAwaqENTyPHtdzi0C+fi8OvpdB0IJOQyFoJMZDsrogdopO 4fk3DHwKajtYqPYxgqoHm8zdtXpeaK0Okik6JlJtndu3fEO1kKny/wbjvCu3aJop+eyQWHOAe6 wxM= X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="44200131" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2019 14:31:38 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.87.151) by chn-vm-ex03.mchp-main.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 25 Jul 2019 14:31:38 -0700 Received: from NAM02-BL2-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_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 25 Jul 2019 14:31:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W2Tu/E5QxhJwHhFoHDIsSPe06L4NY85gW1RdMYFYILWSt+P0r5yFrqaq6s4enBIFkJKoAcQ/nccUqoDsjYfspLuXaqtg6v4oTqTYozaB+4pLYkQ0Gg+iNLw+4jovKgkBtFNXDFls8RJRvJjpqevljwHqcFlOlPGcXTijk/uBL3ZGBQ2Ij0kH3/NVmpj9VT6ahyn4MQjg/FK5nzltzEF2ANsN4jQn/Gw9fH3GEhOgzuI9DaLNKXm0dsJek4bZtKjZUu4yC3qQCF8AqEBY4tu+yvRLZAHCRSZLQOz7oQVRJWt2MgA/9gp6yC3EtxDAss5KOaGdLZk7oKwSg3X6eRPLsA== 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=UdhnouhEKMMu+QZRhJg7pnlQ60ZuJ2/baK6CduWk0I8=; b=Dvimo7xnCkPhAlKEZIacwDWKob2dxc8LylHBFwdMQXaJsvkZHf0nFCoXZ1/cDMkFUHDVaGTjrcM9YXZpQ0G0ymM1hUL3xkztGrp1qUvpREaUOUTfBEX6mpy5rTXk6yXxD3MVWiFRmTIMYKKHsl1YlR8DLDbAmHYaooT1tQ4IERShkUt6CDCoxjc/vUQVf6bODKmkuAOi4gKFHl+462lpnBCmWzvj7NXGSPrg2dyFZQX+Rbrt0GWeq8+M+bzIfVKbuTskL3TjC2yW0NnJGJGhwaKfueNdrzJOvOLo0Oplk+bHJW/yDrJA0wM76YrCSxw5ii4edJNxO9rmw0Jj5UOdng== 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=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UdhnouhEKMMu+QZRhJg7pnlQ60ZuJ2/baK6CduWk0I8=; b=iuOLSJt8raKf9qDdZF9iaDCqxTmeRXNHHACC/mgZB+sFk2l34+X0GMIpAyGgfjX7zrFCbHoCIyRIXvzUXhiNkIgHCAVbudCX9uZIQ3LTy0O+/+ByoekyxRWNSGgbYPx1Wwl3aRmJg6+AI8x9xp7Lrgnw8sHOuVBKmNowul0Drzg= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1984.namprd11.prod.outlook.com (10.175.54.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.13; Thu, 25 Jul 2019 21:31:37 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::5836:a39e:ab17:983b%7]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 21:31:37 +0000 From: To: CC: , , , , Subject: [PATCH 6/6] staging: wilc1000: remove manual sleep mode Thread-Topic: [PATCH 6/6] staging: wilc1000: remove manual sleep mode Thread-Index: AQHVQzBXBZBvQVoDpUOfPHfWOT1C6w== Date: Thu, 25 Jul 2019 21:31:37 +0000 Message-ID: <20190725213125.2810-7-adham.abozaeid@microchip.com> References: <20190725213125.2810-1-adham.abozaeid@microchip.com> In-Reply-To: <20190725213125.2810-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: MWHPR04CA0040.namprd04.prod.outlook.com (2603:10b6:300:ee::26) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bddb9c8d-073a-4fe6-672d-08d71147795f x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:MWHPR11MB1984; x-ms-traffictypediagnostic: MWHPR11MB1984: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:565; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(189003)(199004)(11346002)(2616005)(476003)(102836004)(386003)(446003)(486006)(6916009)(2351001)(6506007)(66946007)(186003)(99286004)(2501003)(76176011)(26005)(316002)(52116002)(5660300002)(66446008)(256004)(305945005)(6486002)(25786009)(64756008)(66556008)(66476007)(53936002)(1076003)(107886003)(71200400001)(86362001)(71190400001)(4326008)(14444005)(68736007)(478600001)(8936002)(6116002)(6512007)(14454004)(50226002)(8676002)(5640700003)(81166006)(81156014)(3846002)(2906002)(6436002)(66066001)(54906003)(7736002)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1984;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: hpyNn/sicTMkfORwNIc7t0/lWMJwjHzOQpO0ZCl3/8Rp/z8hxFRdOlN/Jyn/sNu4Anq/VcwZsXCH51eoPbF5Rqexcz3X1GSKlXdvXRJypZsZ4Aju2NXu5ncrL+BBwbNzevhMF4EwIrQPHKToWJCBJ91xhwiznCX+bz7AcgVcyeWhPagbjl58AtL5iPQrGAf/lD/oX8Dggq8sCd6qSXZHTovARKkXfLmaw0E+tQe2nvwdmNcLIee2iTArvFGtE4tt/uF3ZjOR1reg/UlckM3LzIlkJJwpFCGSz6BxfecTekoj+pT8dVlvU4MeHJDb1VQGsFvTkuF9aukaOldF3HOZ5ahHzQh+pXSgieAy3CD/OfglNhGeaie2grNqac87YdMNBbpoFG1mJ3BeBUJt6dVjnTw0eQIVAzDiWpkr6WNM4gE= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: bddb9c8d-073a-4fe6-672d-08d71147795f X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 21:31:37.5392 (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: adham.abozaeid@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1984 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid manual sleep mode was used to put the wilc1000 chip in sleep while in disconnected state. This is taken care of in the firmware Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/wilc_hif.c | 4 ---- drivers/staging/wilc1000/wilc_sdio.c | 4 +--- drivers/staging/wilc1000/wilc_wlan.c | 14 -------------- drivers/staging/wilc1000/wilc_wlan.h | 2 -- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c index 75a6931aa147..f8646ea3b0c4 100644 --- a/drivers/staging/wilc1000/wilc_hif.c +++ b/drivers/staging/wilc1000/wilc_hif.c @@ -1056,13 +1056,9 @@ static void handle_scan_timer(struct work_struct *work) static void handle_scan_complete(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); - struct wilc *wilc = msg->vif->wilc; del_timer(&msg->vif->hif_drv->scan_timer); - if (!wilc_wlan_get_num_conn_ifcs(wilc)) - wilc_chip_sleep_manually(wilc); - handle_scan_done(msg->vif, SCAN_EVENT_DONE); kfree(msg); diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 4c1c81fed11f..2f9aa36e0114 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -193,9 +193,7 @@ static int wilc_sdio_suspend(struct device *dev) dev_info(dev, "sdio suspend\n"); chip_wakeup(wilc); - if (!wilc->suspend_event) { - wilc_chip_sleep_manually(wilc); - } else { + if (wilc->suspend_event) { host_sleep_notify(wilc); chip_allow_sleep(wilc); } diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 2cbdbf0090e4..8caa3f4bcdd7 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -455,20 +455,6 @@ void chip_wakeup(struct wilc *wilc) } EXPORT_SYMBOL_GPL(chip_wakeup); -void wilc_chip_sleep_manually(struct wilc *wilc) -{ - if (wilc->chip_ps_state != WILC_CHIP_WAKEDUP) - return; - acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); - - chip_allow_sleep(wilc); - wilc->hif_func->hif_write_reg(wilc, 0x10a8, 1); - - wilc->chip_ps_state = WILC_CHIP_SLEEPING_MANUAL; - release_bus(wilc, WILC_BUS_RELEASE_ONLY); -} -EXPORT_SYMBOL_GPL(wilc_chip_sleep_manually); - void host_wakeup_notify(struct wilc *wilc) { acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index b70014142686..802f11807659 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -293,8 +293,6 @@ int wilc_wlan_cfg_get(struct wilc_vif *vif, int start, u16 wid, int commit, u32 drv_handler); int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, u32 buffer_size, void (*func)(void *, int)); -void wilc_chip_sleep_manually(struct wilc *wilc); - void wilc_enable_tcp_ack_filter(struct wilc_vif *vif, bool value); int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc); netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);