From patchwork Tue Dec 17 16:15:16 2019 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: 11298137 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 D3DC217F0 for ; Tue, 17 Dec 2019 16:18:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A718A2465E for ; Tue, 17 Dec 2019 16:18:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="Fl4yxAJf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729023AbfLQQPx (ORCPT ); Tue, 17 Dec 2019 11:15:53 -0500 Received: from mail-bn7nam10on2081.outbound.protection.outlook.com ([40.107.92.81]:6496 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728975AbfLQQPs (ORCPT ); Tue, 17 Dec 2019 11:15:48 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PJW3WyGdL3SSh6zdPjFy/Oe7EgKzYIYJxWnITkVOFzUSRFbIkTli5eoVZFW3PZv+p2AoAjuAxIshwjxE7HcaaXzrgVPdmNqcH/UCGvWqsiy0Xeu1FfZK23vf2L1Ufoi7u6yogp+nTZHft9pBQY47PKnTxBfc9X7AgArRoofg3CWwcsVNpTcKFb8QzcL1ghl3+1Koxff+5TjU5UdADJFZZo3M/xw1n/gHdy98DVB0kduyG2x2WlG6Oe2oKqvULu8fSPf2TaHqfEctlfrdexWpsrNe8Sw/iQ0/zGTl78A+a2ga01lDnUBERsJyVuCjqKbGjqi2QMBGvyraNqHnb2Zmug== 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=LsYEN3xCNjMITk1ynv6bBic/C8RRN8e9RiyMJczZy8A=; b=jsp6naKKODLakAahNv/rdiekS035airqPrBnmNm/+tAU/LMumWpoAfMCHG4SMuMiZ3VInwpJejMMck4/soWCSdYz+N1227vVWI847ApFYQkL44iyRQo5cfyMir8EJCgYALpiHYViOOUehQFK5lOqKxPVR84Xxv4+omTGvpRSAHQ2b+wbkd0Im4UHj50FSQLyfFGIhvFx6LYTdiVwhUQT9wVvlCZ8xBkasbFn+24k35AcPK9wRTnjRi8WZLhHe0hYm5HzDiPphVN8A7kos01RMou/c7vCksk0GTBD5UfxdVu8mhficVzHqzeogT8dZqHTcVJGCueG8llXkzbkrqRZyg== 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=LsYEN3xCNjMITk1ynv6bBic/C8RRN8e9RiyMJczZy8A=; b=Fl4yxAJfBN3meDnMTJCq+gFdOVF6NmPVgK542UwpWqgZ6+R2TRKi48A5pMpZ/PnYo+NtW5iQQ1lhougv23aLcrWpyoRAy2riAoUrgeRdl+Vxqom+OfxGS+NoR+i+cwnaSVQLgCuHNDLq8hb9OeBTCXrIJFPEDYneaE0BDaK/WFg= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4208.namprd11.prod.outlook.com (52.135.36.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.20; Tue, 17 Dec 2019 16:15: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.2538.019; Tue, 17 Dec 2019 16:15:42 +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 v2 35/55] staging: wfx: do not try to save call to hif_set_pm() Thread-Topic: [PATCH v2 35/55] staging: wfx: do not try to save call to hif_set_pm() Thread-Index: AQHVtPUriD2tbdCv5kG06TO5hzkHMg== Date: Tue, 17 Dec 2019 16:15:16 +0000 Message-ID: <20191217161318.31402-36-Jerome.Pouiller@silabs.com> References: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0174.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::18) 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.24.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c4439483-8024-40f5-8c54-08d7830c4dc0 x-ms-traffictypediagnostic: MN2PR11MB4208: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-forefront-prvs: 02543CD7CD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39850400004)(396003)(366004)(136003)(376002)(346002)(199004)(189003)(5660300002)(316002)(6506007)(85182001)(478600001)(71200400001)(2906002)(36756003)(186003)(26005)(81166006)(54906003)(1076003)(110136005)(66574012)(4326008)(8676002)(86362001)(6486002)(6666004)(52116002)(6512007)(64756008)(85202003)(66946007)(66476007)(66446008)(66556008)(8936002)(107886003)(2616005)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4208;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: oJmg0mNijgUFeAC7jq8UQlPXhK/Wrttw+QdeGl5z+OSwtFJb1Sa1h3sX/VA3B9tjHnbn3owficNr1A7iRpziZrDW1XunvseUhiw5JjmD4rWGKDI4RUDx0QIjLFlpMJDyE429uiK1a5LL5UpAvEosC8HcJGDQJVvQ0GaX+S6OV9+HKFwyPkH9IzQ8SQUixfSpOMAIzgQPaXXTumkJL4Uswi0xHVmLNaVti2jLwmZBgvywj5k/gqFaY46ensyWClwGqKHTK1CsOdW4fOKjDVMgoYNjoYJoccVSQLCeBEG2rRKtiV5aWI/wxGRTnhGDV89fmFMF2x1cM4/oMNqM2YBzPJMXvfFO3UWpnkfI/vO618uk+XydD253i9Vza8jJmbTrE/CsduZO5iOLIBMdww9GcqgAgmq5bnZO6OEOHFZqiFygeBMX8bvStY1FH3tGyBIE Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4439483-8024-40f5-8c54-08d7830c4dc0 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 16:15:16.5284 (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: YaO2E8bSZXFheEKAEh0bsLcAPhT2yQxCt4Bc3GPBaNxfnWxjCvVxcsbPmxDRCCGkcCZrlP1J79mIWup70WZBKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4208 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Current code try to not exchange data with device if it is not necessary. However, it seems that the additional code does not provide any gain. So, we prefer to keep a simpler code. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index c57135f77572..dcb4693ec980 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -371,14 +371,11 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct wfx_dev *wdev = hw->priv; struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv; int ret = 0; - /* To prevent re-applying PM request OID again and again*/ - u16 old_uapsd_flags, new_uapsd_flags; struct hif_req_edca_queue_params *edca; mutex_lock(&wdev->conf_mutex); if (queue < hw->queues) { - old_uapsd_flags = *((u16 *) &wvif->uapsd_info); edca = &wvif->edca.params[queue]; wvif->edca.uapsd_enable[queue] = params->uapsd; @@ -395,10 +392,8 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (wvif->vif->type == NL80211_IFTYPE_STATION) { ret = wfx_set_uapsd_param(wvif, &wvif->edca); - new_uapsd_flags = *((u16 *) &wvif->uapsd_info); if (!ret && wvif->setbssparams_done && - wvif->state == WFX_STATE_STA && - old_uapsd_flags != new_uapsd_flags) + wvif->state == WFX_STATE_STA) ret = wfx_update_pm(wvif); } } else {