From patchwork Wed Jan 15 12:12:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 11334079 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7032317EA for ; Wed, 15 Jan 2020 12:18:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4511D24671 for ; Wed, 15 Jan 2020 12:18:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="B9UKXii9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730790AbgAOMMr (ORCPT ); Wed, 15 Jan 2020 07:12:47 -0500 Received: from mail-bn7nam10on2047.outbound.protection.outlook.com ([40.107.92.47]:27390 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730768AbgAOMMr (ORCPT ); Wed, 15 Jan 2020 07:12:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H48j5rsNlMcwo2UslbG/uCUru8vN1eI7mVVWi24+qGFmGNOoe+T5fZ1gLQF8+7zdBSUDh5t3KO+Zt9vEG/dDJHjEvoMU10zPo9nlWJI3/rSYyC72rOklH5F4vpJJOhYzHotY7geYZ5kTLRoyzUQsOkms2aUpHbCgVwOzV6IxGJUMk8MgYO0pEtv3mxXxNbyzMgfQzawZJUFtUtpoIia7GxHHXKKL1daExmlGmAHzBwKmrouO4O/0bNClZiBhcnUK8W8+w1gLLqcpIbhCA/txKl6iNDr+L7+jwz7F0X9g3uWXiNYtKzvH5wo0l52jt3PuYWuKJL8UHQ/UuHOaD1Jl6w== 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=tjKAuLPHt5gNg/Eo1CFrDExKSrzLBhwAanAjvAIxEpw=; b=XDIR5hJwkqXsiBX4yRAmRA2zrvhV3lGU9x5ccEMLrd4xJrTx6/Bt44y+c2d7hJi8e5z9cnxDw4DWGLRVSfdAQQfcRP74Ef9/JfUaaSh6WXyzzNK4Skykjf/RYRY1tZoaQbBH1EPemagmScQwQU2G/vMzvu/0zudi8agybzAJc7dQnm2TvOy1QtxOV2poQOLWpPsNh93BEvf2HqCNkIBDFNX01tsbZvvXAgYR6Z9ZI9S+6WdNbp4CpCSBW1cUusGIg19Z7nXwk40VJ8QUpX3//JkHoFpMDohbrbCyKwPfG1G8rLFdSoktibfl00ecCB+do7oQNKag+yXfAEZJezkbfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tjKAuLPHt5gNg/Eo1CFrDExKSrzLBhwAanAjvAIxEpw=; b=B9UKXii9bmPwmDNUpanH7WeWNp39UXpDNw664I/jA6m0Wzxz55tb+K/eNI4edBDyAHe0q0KCQNYvlPtlCUL7FzIr2rSkF4YeTZ2nLC8aYcMvv4ZLJgRy8r69jIltKTngw5vDtCUJuD4JP9A8cJsjXIN9jIFtrEq6UVPJnj/spBA= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4096.namprd11.prod.outlook.com (20.179.150.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.10; Wed, 15 Jan 2020 12:12:42 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2623.018; Wed, 15 Jan 2020 12:12:42 +0000 Received: from pc-42.silabs.com (37.71.187.125) by PR2PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:101:16::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Wed, 15 Jan 2020 12:12:41 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= To: "devel@driverdev.osuosl.org" , "linux-wireless@vger.kernel.org" CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 25/65] staging: wfx: drop wvif->setbssparams_done Thread-Topic: [PATCH 25/65] staging: wfx: drop wvif->setbssparams_done Thread-Index: AQHVy50WzQfPu0vHNUOzW0r1UjWjTQ== Date: Wed, 15 Jan 2020 12:12:42 +0000 Message-ID: <20200115121041.10863-26-Jerome.Pouiller@silabs.com> References: <20200115121041.10863-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20200115121041.10863-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR2PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:101:16::21) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.25.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 270c3111-4dff-4aee-7a72-08d799b438e5 x-ms-traffictypediagnostic: MN2PR11MB4096: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(346002)(39860400002)(366004)(376002)(136003)(199004)(189003)(85202003)(66946007)(66446008)(66476007)(2906002)(107886003)(66556008)(1076003)(66574012)(64756008)(5660300002)(8936002)(6486002)(186003)(26005)(8676002)(316002)(81156014)(36756003)(52116002)(2616005)(7696005)(478600001)(16526019)(956004)(54906003)(110136005)(86362001)(71200400001)(85182001)(4326008)(81166006);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4096;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iY5V72mlDdlh+oqsENl/+Z3Y1pyXDP2AllKH4wYnXppw775p7q5CIsIV4R8Kr3Th0zanfllM596pw2yBVXRpDhzwhYbXjNIspDtoCiPqQWgQPRdIT0MEO8NwtHHCUaxWanw2O25FosM5uS3tEo/VedassqWmFn6314t35qQe8iByaE4mwfd1RIZtomQtFNwEz1czGb7oj0oz+QpgJdewlNPH+hgM5Yfb51oXaEGPIDG0f3rA6u/Czv/AcWv77RTNJWV2AGAlskjMZPpCHtwKomO9FZ692T1BtcyRn7ZQAOWgjrANMX91xnLiQE0OFocy4+ea4CqOZny+JrPZNrvCSFDRMjsVO4+0B1CyVIJwD4TOsfocZYI+NEqjm1Xb3snF7oGBjLJ6bE6f1908o3ySijxdcznefqph9wz0xw7NIRysF1HROFp8y+mhapq3J5tK Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 270c3111-4dff-4aee-7a72-08d799b438e5 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 12:12:42.5789 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lwYIWj0HkurDu5ZdfS0mPfCkqg6ovO0WeF2nmYxocakdVuEJ0JnvreqWDUvmiDlB63X610gLoe2+RIacVl2G3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4096 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller setbssparams_done was here to ensure that the firmware does not enable powersave before to get the first beacon. However, mac80211 already ensures it gets a beacon before to associate to the BSS. And even, if it won't, the firmware wake up at least on every DTIM, which is sufficient to finalize the association. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 8 +++----- drivers/staging/wfx/wfx.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 021daa9f7a33..7abe272ddc0d 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -326,8 +326,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, hif_set_edca_queue_params(wvif, queue, params); if (wvif->vif->type == NL80211_IFTYPE_STATION) { hif_set_uapsd_info(wvif, wvif->uapsd_mask); - if (wvif->setbssparams_done && wvif->state == WFX_STATE_STA) - ret = wfx_update_pm(wvif); + wfx_update_pm(wvif); } mutex_unlock(&wdev->conf_mutex); return ret; @@ -475,7 +474,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif) wvif->disable_beacon_filter = false; wfx_update_filtering(wvif); memset(&wvif->bss_params, 0, sizeof(wvif->bss_params)); - wvif->setbssparams_done = false; done: mutex_unlock(&wvif->wdev->conf_mutex); @@ -799,7 +797,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif, if (!info->ibss_joined) { hif_keep_alive_period(wvif, 30 /* sec */); hif_set_bss_params(wvif, &wvif->bss_params); - wvif->setbssparams_done = true; hif_set_beacon_wakeup_period(wvif, info->dtim_period, info->dtim_period); wfx_update_pm(wvif); @@ -1224,7 +1221,8 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) INIT_WORK(&wvif->mcast_stop_work, wfx_mcast_stop_work); timer_setup(&wvif->mcast_timeout, wfx_mcast_timeout, 0); - wvif->setbssparams_done = false; + memset(&wvif->bss_params, 0, sizeof(wvif->bss_params)); + mutex_init(&wvif->bss_loss_lock); INIT_DELAYED_WORK(&wvif->bss_loss_work, wfx_bss_loss_work); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 1b487d96eca2..5e1a763eb4b5 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -105,7 +105,6 @@ struct wfx_vif { struct work_struct update_filtering_work; u32 erp_info; - bool setbssparams_done; unsigned long uapsd_mask; struct ieee80211_tx_queue_params edca_params[IEEE80211_NUM_ACS]; struct hif_req_set_bss_params bss_params;