From patchwork Tue Dec 17 16:15:24 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: 11298127 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 1E50F6C1 for ; Tue, 17 Dec 2019 16:18:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCA8C24679 for ; Tue, 17 Dec 2019 16: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="ivxTa0FQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729127AbfLQQRu (ORCPT ); Tue, 17 Dec 2019 11:17:50 -0500 Received: from mail-bn8nam11on2041.outbound.protection.outlook.com ([40.107.236.41]:6164 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729026AbfLQQPz (ORCPT ); Tue, 17 Dec 2019 11:15:55 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WJNKjo8XtLM1Y3d2NxLd1GUvKr75bruHvRtQaDw/rHO0WjdkzQboX/1w8amjX9VVtLnqjVN5CMsRkYNxyuVsZ68rpwxIyvE8m1gRbPegijAd+rm6y4mn8niNviL8vjhIvtskslvfpWjatWhWqKbFGNWGW6+/T1DMYSM+ZFnGTn+bqYJzsXAqVBWZ/iw+xbkumRrbjm/EtzzAx8KQIUo3CFkkFA90QiJ7Lc8onTZCOaXVR3Llth00fpwIBInd/wwGFQEbOTkifiaedOe7e0MZikiwM0pteZINa9NSOb1VWLeR8oGh3cJcv3oAWidOKo+gX5/b0aZ8Ig4bdZ0TajZckg== 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=78O391xvezVfVShOvr/3rZg1ZEK/46UR+LHZdfYcB/k=; b=crWZO6iAfT6RqqmPbjqfx4Ce+WGlI16Ox5UUlKnICBOfftMiniU3DELNSK/zzxJmPW31qGUgtY8Q8p5Hk09huYhzldJUkVLb5j6pmKaIiWt4NWwd+ZYdUTWmahz5vPkPcQ6uNsKyRblfUBlb+XD7ckjw+kWAALwZ2hHtMtuiG8NZbkdkv9m58s0DfhvsxvQERF32aPOzq4RD7+Yja6P5xBeEPZzU7/A/iXHTJYKWFPlKA7RkCnPUzijW3zfvHZRwHKWL5nhSlw+GevFqTnaUTSBN2kCLxHsmAzoI1j3b4Waq+gwRgLw8l+c+VPTSpopRmDyOxOHc1Q+D+A4lPCozlg== 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=78O391xvezVfVShOvr/3rZg1ZEK/46UR+LHZdfYcB/k=; b=ivxTa0FQxERuu4sd1q1cLVZNHNijGaHuegUjP3UoEEbZIxWyT0TcRBcCQXTDqmYYXPjhAlGD7EpfFRWAEY9X6QmZjsZBoVsGR3D8iuKqCggnWegXJaoHWhfz7bqofDnNpON2MJw2vu3bJq88CNnc2bH2utoeKZg+64aZjEMdd+U= 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:45 +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:45 +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 41/55] staging: wfx: drop struct wfx_edca_params Thread-Topic: [PATCH v2 41/55] staging: wfx: drop struct wfx_edca_params Thread-Index: AQHVtPUwWk98GQmzz0KLSnhUUoS1sQ== Date: Tue, 17 Dec 2019 16:15:24 +0000 Message-ID: <20191217161318.31402-42-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: e3bd905e-8e42-4130-cce2-08d7830c5273 x-ms-traffictypediagnostic: MN2PR11MB4208: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1728; 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: twcIQ2aNkEgCH5ECsCruoMffLR5NgJqlhImVa7+5P9z74eCbBgRvCLhuB2n3sZ6D52Dtt3Ff0dgr+WS3kk1+NVZKEgx5rENiVshqry89Jcl+qvlpO0CFY70jAe7+d6FuMOuhKhcrEA1xoUjr9zRXtPuJR9aptIyW7xqy8DYKP1tXSsMdhyrHIGwpyNEStccKj/lqzZJE1cNd5AI/ttdA5qBfJVb4kegw+13YLNkv0Lh2p5i6eiD5IjUC4EE3/YTUBI0T4fI7RcVieaXqxdYjTE4T3sSHRuL5enKeuVqJQke4gpXSo7tmKBVs9OfXW0Zr8S7KMsgzMQSN/q3rrKCbdP1mMK73ziRPscsAPKR99oRiR1NCM/YnxF6Oab3omGO9ZWtb0YsjoYcTg1c1DSL+VlLQ6sBHj/x+CAJqRXt1zbpWPw27p0VuKA0+qVNY324h Content-ID: <775F3C3EFA365240BDD3943E1FB4745D@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3bd905e-8e42-4130-cce2-08d7830c5273 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 16:15:24.3910 (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: xD5FiOFuvaTSSgxvzPYyI5RXNnhsmdIgL/V2N17oILzLu0Oh+lA1nfgERXrECKvTtCJStaH8GXMftqGROsafUw== 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 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;