From patchwork Mon Dec 16 17:03:54 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: 11294779 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 EED861580 for ; Mon, 16 Dec 2019 17:09:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8EBD206D7 for ; Mon, 16 Dec 2019 17:09:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="S4JDh18G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727840AbfLPRG4 (ORCPT ); Mon, 16 Dec 2019 12:06:56 -0500 Received: from mail-eopbgr690078.outbound.protection.outlook.com ([40.107.69.78]:42057 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727333AbfLPRGz (ORCPT ); Mon, 16 Dec 2019 12:06:55 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZ9Kv/u6b8kbTwAa44GEmKZ5Yg1/kBsQ+FDNGJV8CHWcH8TVsGe5pkvzJflUwzcqL/6aliMZil3IsfxNuf13yMkFGPq56rr1xqmt0UR7FtDU15GAmJTI6YmFDwOExZjbZ5mx+B8R8pcOPzPgrHy3OysaSL1gL8mqbEWRKB21oG9967AgA8jelVgRhS7mQvRLIU96UNJEew9OmjmfU2Nd1ZEeIkMBzWfrngKLmBUSgYY0DDM0w/3hdt5+nFzYMYEWKwLCIzWUHjji74LPeRaVjLpdqaaQ4S/Gv8RM3yK2Wq2XuB/JaYvio7ZHLC4/Nap7BJ+5dujGOnlyCfV4Ys0GDQ== 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=oPI2+zKloIdi3mw1LJzSr/ob4fEW7wZUVC1yI5KsAqQ=; b=lfZH4IQ3Wpw6XgQhR6N9QaOxJfPGDi7yaJSXa/CtOFY3bYuMl8OHimYK/DnS8GaDdJA83d2JeLc27alOBQGE1uY+4kZC2NxfW7a1yIeQ+bEZf+ltQfW9zUSUCCuVKg3grmRV6+RzWo/+hHeExo4OC0+GQ8kbSf1Y6bT8RYHPnUTMrP2NVddpAsiKpWTMYPyveE/mAHRyUU5ZDAo0jfULUra29MkbQ+pTRoulDGRrq3HsmuFSJxHcLF/nk/MXps1PMXMZmqrpyHjitTdbE3irqtGhcmcYE1VrRxGx2G9t+sTCEyuV7t32l7ZRyJ92hIfBw3niwUX5Y/5z3ENhXHr9Tg== 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=oPI2+zKloIdi3mw1LJzSr/ob4fEW7wZUVC1yI5KsAqQ=; b=S4JDh18GoQj3UzoX8fIDhs49fiO8qEoMAD0ZMmhoh3Gr4Y6GqyhwOo/JvNZo/71LSiPr+LSW5OLCgrhGsUipXhXzhN7R7s8CDmWgUM+uNzeXlk0FlYjwS5U1YOEXqJakN668mM1kNzubasdtNEs4tYYdvl/uI2qOKvQU1fnC/aQ= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4142.namprd11.prod.outlook.com (20.179.149.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15; Mon, 16 Dec 2019 17:06:43 +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; Mon, 16 Dec 2019 17:06:43 +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 41/55] staging: wfx: drop struct wfx_edca_params Thread-Topic: [PATCH 41/55] staging: wfx: drop struct wfx_edca_params Thread-Index: AQHVtDLMBzawDDar5UiFx9jQRQ1KLQ== Date: Mon, 16 Dec 2019 17:03:54 +0000 Message-ID: <20191216170302.29543-42-Jerome.Pouiller@silabs.com> References: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba5b93bd-bf99-4b25-31f7-08d7824a5336 x-ms-traffictypediagnostic: MN2PR11MB4142: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1728; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(346002)(136003)(376002)(39850400004)(199004)(189003)(6512007)(71200400001)(91956017)(6486002)(8676002)(2906002)(54906003)(81166006)(81156014)(186003)(76116006)(478600001)(36756003)(85182001)(85202003)(6666004)(66556008)(66476007)(66446008)(64756008)(1076003)(66574012)(316002)(2616005)(4326008)(6506007)(26005)(8936002)(110136005)(5660300002)(107886003)(66946007)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4142;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: /6azdlRo34+khDdwWl/9R4YOxu7Ik4MvtgmQt6s8Y8qrr9SnId72Rpbca3XpyuRqQxGToUj7wAHEyywQP6VJbZZbHxBASnIZ2uN56PbwRrXT+KREZ5SfXLdIuR98EzhZdujDWUeTDDDaAB4EaxUiqvDhSc37ZuZ3gp/DWFkLJI5lIvK6XEvHL9ia/kxRHJU4lXpkn/jHnTRTdlB/jmmj7JSJ+6mOZFWdneuS5EXr5E6a7GOeZ+bVNyi6jFKV0AUpH5EE7HRhb884hd7tvi1nrPY/tf9aiI035TXnl+mYwopJHheIk8HCfv590bHE+sUXm4vycPUraxBcxD7EcIs5b9/LaE6ojL7wxSRpOf8fbxQVRWHWFAgJpkwyagtv/hracj5oJLvd1ekZbI8FWBgdeaWODvmYfDv2msVI0qJXVHIV0oa0HEYK2yw+JuV/HL/0 Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba5b93bd-bf99-4b25-31f7-08d7824a5336 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 17:03:54.6240 (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: MDHxeyWZj6zA+M8hMRwSH9JOy534dqRVXUythelPOIB3Udd4+1qKCioyG5ljAGT6fFf4lw1q8tjLqoyhPOWxsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Intermediate structure wfx_edca_params does not help. This patch relocates its members directly in struct wfx_vif. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 4 ++-- drivers/staging/wfx/sta.c | 18 +++++++++--------- drivers/staging/wfx/sta.h | 6 ------ drivers/staging/wfx/wfx.h | 3 ++- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 680fed31cefb..16216afe6cfc 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -452,7 +452,7 @@ static int wfx_get_prio_queue(struct wfx_vif *wvif, for (i = 0; i < IEEE80211_NUM_ACS; ++i) { int queued; - edca = &wvif->edca.params[i]; + edca = &wvif->edca_params[i]; queued = wfx_tx_queue_get_num_queued(&wvif->wdev->tx_queue[i], tx_allowed_mask); if (!queued) @@ -595,7 +595,7 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) wvif->pspoll_mask &= ~BIT(tx_priv->raw_link_id); /* allow bursting if txop is set */ - if (wvif->edca.params[queue_num].tx_op_limit) + if (wvif->edca_params[queue_num].tx_op_limit) burst = (int)wfx_tx_queue_get_num_queued(queue, tx_allowed_mask) + 1; else burst = 1; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index b4007afcd0c6..d52f618062a6 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -299,7 +299,7 @@ static int wfx_update_pm(struct wfx_vif *wvif) return 0; if (!ps) ps_timeout = 0; - if (wvif->edca.uapsd_mask) + if (wvif->uapsd_mask) ps_timeout = 0; // Kernel disable PowerSave when multiple vifs are in use. In contrary, @@ -327,8 +327,8 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, WARN_ON(queue >= hw->queues); mutex_lock(&wdev->conf_mutex); - assign_bit(queue, &wvif->edca.uapsd_mask, params->uapsd); - edca = &wvif->edca.params[queue]; + assign_bit(queue, &wvif->uapsd_mask, params->uapsd); + edca = &wvif->edca_params[queue]; edca->aifsn = params->aifs; edca->cw_min = params->cw_min; edca->cw_max = params->cw_max; @@ -337,7 +337,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, hif_set_edca_queue_params(wvif, edca); if (wvif->vif->type == NL80211_IFTYPE_STATION) { - hif_set_uapsd_info(wvif, wvif->edca.uapsd_mask); + hif_set_uapsd_info(wvif, wvif->uapsd_mask); if (wvif->setbssparams_done && wvif->state == WFX_STATE_STA) wfx_update_pm(wvif); } @@ -1426,7 +1426,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) }, }; - BUILD_BUG_ON(ARRAY_SIZE(default_edca_params) != ARRAY_SIZE(wvif->edca.params)); + BUILD_BUG_ON(ARRAY_SIZE(default_edca_params) != ARRAY_SIZE(wvif->edca_params)); if (wfx_api_older_than(wdev, 2, 0)) { default_edca_params[IEEE80211_AC_BE].queue_id = HIF_QUEUE_ID_BACKGROUND; default_edca_params[IEEE80211_AC_BK].queue_id = HIF_QUEUE_ID_BESTEFFORT; @@ -1502,12 +1502,12 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) hif_set_macaddr(wvif, vif->addr); for (i = 0; i < IEEE80211_NUM_ACS; i++) { - memcpy(&wvif->edca.params[i], &default_edca_params[i], + memcpy(&wvif->edca_params[i], &default_edca_params[i], sizeof(default_edca_params[i])); - hif_set_edca_queue_params(wvif, &wvif->edca.params[i]); + hif_set_edca_queue_params(wvif, &wvif->edca_params[i]); } - wvif->edca.uapsd_mask = 0; - hif_set_uapsd_info(wvif, wvif->edca.uapsd_mask); + wvif->uapsd_mask = 0; + hif_set_uapsd_info(wvif, wvif->uapsd_mask); wfx_tx_policy_init(wvif); wvif = NULL; diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 74755f6fa030..9595e1fc60db 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -34,12 +34,6 @@ struct wfx_hif_event { struct hif_ind_event evt; }; -struct wfx_edca_params { - /* NOTE: index is a linux queue id. */ - struct hif_req_edca_queue_params params[IEEE80211_NUM_ACS]; - unsigned long uapsd_mask; -}; - struct wfx_grp_addr_table { bool enable; int num_addresses; diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index ff29163436b6..5a2f8af17eb7 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -113,7 +113,8 @@ struct wfx_vif { int cqm_rssi_thold; bool setbssparams_done; struct wfx_ht_info ht_info; - struct wfx_edca_params edca; + unsigned long uapsd_mask; + struct hif_req_edca_queue_params edca_params[IEEE80211_NUM_ACS]; struct hif_req_set_bss_params bss_params; struct work_struct bss_params_work; struct work_struct set_cts_work;