From patchwork Wed Jan 15 12:12:39 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: 11334129 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 F2315138D for ; Wed, 15 Jan 2020 12:18:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6487207FF for ; Wed, 15 Jan 2020 12:18:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="FmOPBYxk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731946AbgAOMSc (ORCPT ); Wed, 15 Jan 2020 07:18:32 -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 S1730667AbgAOMMo (ORCPT ); Wed, 15 Jan 2020 07:12:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LbjcVHYr7ws+4mhmKNFYK48MT0k3pJf1smHl1f1TIV58mwDDV3pa3m6vKghsrtg5Cy0Ck9Zn4mPJbsORpjv79X2TNj5iaplWybBfuOOSXPZ49R4r8HAKgr1DmYc+5jCM0WLUfVB4odsPUVNYa71hBH/kUxw/jAjw4e4djnwfGieOliDUXBYrO/UBO+PFm/vhoTKw6MoRQkID+ONu5JNIlerA8erW9Fe+Cu/2RDS5ykZdt/0cwdbhPGlj/GgU0eHAaMdxVGgqKZEx89KVJKGpdN7rgvm9JL5BxxxiMXBN8LYfQ0ddAUAiFEqOJvQA9lPK0h/7cjYDizYIt6tP7VN1lA== 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=EyDWq4MM5XzguJy/1tVdbLRwVPRpywmE0qbRXL02dkc=; b=kDA5UTSxUXKYadMhHd+XB+nevKSmUtYbuqVdBpu0Cui63jmbko3NeERgvr3MzsABoJwP3RzbI/f3Xl6CLdI93yL2R5WaWEuWiv2LkCQLpE4NkpRJ4qFqEepbFb8bG9Nc0+1/JKJ3GPIg6SWsEhiVzxWgQdxq6lS0XlXcqy63Uuxn82e+OG/CUsJTeD/TNN4SFgw6eeyV9Z8NyRhBI+ZEVP2VKCiUDz3I5GDqsFWsWG6E82rHn3m9NQ+u8YapROUsPlIkjpdorZQu6h/6BlKbMJb7jdooRL8TVm2nMxJDAPPCSwVdrKPEKBf6tuaf0gUMSwSXd9rwZeeTgfzfQ9zMjA== 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=EyDWq4MM5XzguJy/1tVdbLRwVPRpywmE0qbRXL02dkc=; b=FmOPBYxkfjZMLtuTGwtEx/uVVVBkIlDYm2T09vZlpPz2v5SvjVd2Zn4FXfbL6sewaXYSzwMg5XUsKgiq0X9zvc7bTpBT+ILS4XB8VeQe32cO4NBB+TapCTD+76HdRqxqLlBx6NMS5ugAeknaQmVCIBh2zDJwLmeuhPkG0ZhpLHQ= 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:40 +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:40 +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:38 +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 23/65] staging: wfx: drop wvif->enable_beacon Thread-Topic: [PATCH 23/65] staging: wfx: drop wvif->enable_beacon Thread-Index: AQHVy50UuRVBqeQDKEKkOLFm7Uu3iw== Date: Wed, 15 Jan 2020 12:12:39 +0000 Message-ID: <20200115121041.10863-24-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: b0a2e61d-31f2-465f-373e-08d799b43758 x-ms-traffictypediagnostic: MN2PR11MB4096: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; 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)(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: Lwy1ep467sgeo32ZaPmGZu4ZxXrgQu1Kt6gQTqRiYtqJSyNnpmrId365NgwPlKIpjhzNRdbNgurYlcKTu2Of7S1xcaBsoQBryAT1sm9CH/IUbSknMxWZqC1oAv1l0qAO+zkUqUYs80Pynvg3dCTxo25qcxhK8wem8w3PZM/gwvTXR4nA9cEmrhcT5h7TwxYCJP8HyJQ+rN02Sb1EQRnlHVWDN/xGyi93nXTZGsZvEAKQeyrZM0ItSguilW/iWYtBcSdZ+btaHlLYdHRbJMwMGBJ0gnPDdNTnJ4MLC72OmIvEq1CCU9xEQ+0FyzR7+/S5IOcqijHhYrRWMBZ2C7dzj1TuywI0nEHmjLiBcsxMYW/3JMQ+R0LYN5sD47xpouHoj/GMRFmaS6zcizSMIJCHYFZYu/Q3qU+Wn6IWdBZd4LRQcMUnRLfUGLQKsp9nvBOU Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0a2e61d-31f2-465f-373e-08d799b43758 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 12:12:39.9584 (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: fp9Rp6WTtWb1koJoPUuRQbewjQ2ttWpplPrVOxJHy0SxLU8/Ze0N3qANSjHh+UKsrpJoXYLEFDbVrF/bZMu29w== 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 It seems that current code try to save calls to hif_beacon_transmit() by keeping a copy of the previous value of bss_conf->enable_beacon. However, hif_beacon_transmit() does not cost so much and mac80211 already take care to not send useless events. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 9 ++------- drivers/staging/wfx/wfx.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 376451433e9e..dede6323bb17 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -843,12 +843,8 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, } if (changed & BSS_CHANGED_BEACON_ENABLED && - wvif->state != WFX_STATE_IBSS) { - if (wvif->enable_beacon != info->enable_beacon) { - hif_beacon_transmit(wvif, info->enable_beacon); - wvif->enable_beacon = info->enable_beacon; - } - } + wvif->state != WFX_STATE_IBSS) + hif_beacon_transmit(wvif, info->enable_beacon); if (changed & BSS_CHANGED_BEACON_INFO) hif_set_beacon_wakeup_period(wvif, info->dtim_period, @@ -1299,7 +1295,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw, } memset(wvif->link_id_db, 0, sizeof(wvif->link_id_db)); wvif->sta_asleep_mask = 0; - wvif->enable_beacon = false; wvif->mcast_tx = false; wvif->aid0_bit_set = false; wvif->mcast_buffered = false; diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index bd4b55e07c73..84cb3a83e5d9 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -99,7 +99,6 @@ struct wfx_vif { struct work_struct set_tim_work; int beacon_int; - bool enable_beacon; bool filter_bssid; bool fwd_probe_req; bool disable_beacon_filter;