From patchwork Wed Jan 15 13:54:38 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: 216644 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 40775C33CB1 for ; Wed, 15 Jan 2020 13:55:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0949D24656 for ; Wed, 15 Jan 2020 13:55:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="QAsSU45m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729610AbgAONy5 (ORCPT ); Wed, 15 Jan 2020 08:54:57 -0500 Received: from mail-dm6nam11on2085.outbound.protection.outlook.com ([40.107.223.85]:14113 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729593AbgAONy4 (ORCPT ); Wed, 15 Jan 2020 08:54:56 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cBvouFCR5c/7zo7uR8e4tAChJUHBy8/DMyLrAruYEoG2B7/Q5824A+f05DyG/Zh3soYWATWaHL9Tnjo0zdfWtwkrN/2YMRJE2EDPZIKkiDWlmw+iJ5fyE0MjfdgLP5LQ6QTQLW3nwbDmedOpdkcq+sP4DJVsNOlpwR7a9pqqFUTFdBEWzR+UzA/fh0Zl+VxfxkBs5c/FS4GeB1C1JmPBbbZFssDjfymIP90xIw/gZMVkVQW19F15pb4DuMG6PwNPaOOyq9yY1kXNIEg/JNpf9xBF8KrKz8wZqd6qcI9RrAZF1Ru7GTzrOOEwi6jiFRLkegELD34BIy/caG2hxenM3g== 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=G1jYC2YRBXlLMcH5ud3pus73ZeXzpusXg9vtoBENwOux5dbxHqugkPoJDIO8EwooCGSxmeBmZgERpM0/cHwshyumvI9QsKuwTvEnf0Vls3MtodsGgnj+oZ4IupMqA+YILdXQfXDNOqAxVJg0w2G7zLMSuwzH/g74IvJByPjXKhnXzM4uxAZp+AQz9/Tj0OVKdMQRSdRbco71CBGS4cPur554K4sKr3UaVLs3meFPQnU4Q587ANozycExWC28dcqp/ZY+YPiT6F6+CblSGPMUYA/LIs72bvKqI4c/yJFjbK0gIgtVu/2aNjDbHnyotze0LhdhRuPKoGkzqa6ZQ8NcyQ== 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=QAsSU45mx9hebVmZVG6sDM+Jade8PW9SVuKDtjbWvtQyKbqNnqt4eee0/h4WgnKqAx8fAZZuoAPAMlMgLVP0pSp5L3SXle5QY3DohvG/YqUDjN9J32DMz7OMs8gxRBBBlwA5zMJud4Xm9MELjwH4OSdHDB5aFnN/BxmZndFZyu8= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4094.namprd11.prod.outlook.com (10.255.180.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Wed, 15 Jan 2020 13:54:38 +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 13:54:38 +0000 Received: from pc-42.home (2a01:e35:8bf5:66a0:3dbe:4cb5:6059:a948) by PR2P264CA0008.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::20) 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 13:54:37 +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?SsOpcsO0bWUgUG91?= =?utf-8?q?iller?= Subject: [PATCH v2 25/65] staging: wfx: drop wvif->setbssparams_done Thread-Topic: [PATCH v2 25/65] staging: wfx: drop wvif->setbssparams_done Thread-Index: AQHVy6tT151hzhi3V0aXThOObsMaWQ== Date: Wed, 15 Jan 2020 13:54:38 +0000 Message-ID: <20200115135338.14374-26-Jerome.Pouiller@silabs.com> References: <20200115135338.14374-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20200115135338.14374-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR2P264CA0008.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::20) 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: [2a01:e35:8bf5:66a0:3dbe:4cb5:6059:a948] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9140b8a6-d657-409f-d364-08d799c27659 x-ms-traffictypediagnostic: MN2PR11MB4094: 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)(39850400004)(366004)(396003)(346002)(136003)(376002)(189003)(199004)(316002)(110136005)(54906003)(85202003)(81156014)(5660300002)(8676002)(71200400001)(8936002)(81166006)(186003)(6506007)(86362001)(66946007)(66446008)(66476007)(66556008)(2906002)(64756008)(478600001)(6512007)(52116002)(66574012)(6486002)(1076003)(16526019)(4326008)(85182001)(107886003)(36756003)(8886007)(2616005); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4094; H:MN2PR11MB4063.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V/MEr8X8R2iOw/uCYtY+F/1o+wYY+qJe1kHH0EWznLz73lhU7JRczfo57zg/A/SHcOD91lUReqPCpmrt/lrVnDLOcUXy50pe8vuepKGtLf7lu99PD4fH853+g6i7E6OOFo01CFUUaWT+uIxDIYaeDmIY7AROA/fiMZB3ruhIEaM3VF9mUDnjhskdLpntCkQan5yyvwUP6dWDP3FmPUzFsE/DCZoaz1qo2aAMurz7CcH1x58S9ZHR1zE/qAi5oYxZMBynvNFza/YxaikX8GgT5tr5/OL23wat/o7lIPRGOdfCrI6TmcoDvc0ZfUxUYYi3M0WT1P5sSoIgQiELmNUDonr4VFiEy9VuNw4CPj/r3gXGlVzY7PuPTnE7/0vW7eKg1awmFgXkZfG5enVo6J/YxNiWoyXlcUySVHvukqBiRc3vIJJMK3aMxtfXU7LEMxzK Content-ID: <7E6E70C6E576E648A96EA30D450A6B09@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9140b8a6-d657-409f-d364-08d799c27659 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 13:54:38.6526 (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: 5nWjg8bYYqjduXj5YHqSWwR24/F7fad2pwr6UweHaMHquqxIGbn1APNTKALtRPmR1C+pbNpgyWim4KGBuAB1hg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4094 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;