From patchwork Mon Sep 7 10:15:06 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: 11760461 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 EA57715AB for ; Mon, 7 Sep 2020 10:25:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC2DB21473 for ; Mon, 7 Sep 2020 10:25:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="U0VZIatD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728847AbgIGKZ0 (ORCPT ); Mon, 7 Sep 2020 06:25:26 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728525AbgIGKQh (ORCPT ); Mon, 7 Sep 2020 06:16:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RdQ9cqAuhEU2aMH1Unl/khBDoy0AKApg/qCjSZowXOGk1M9tgrf5o+4BKExpVf1Or5ay0PCkxb+kzI0P6ZdxcF//St1vddZHvHGrM79rJc2lQzsNoOuMud9wcEySpw8zU2UVPbYE+zvmvGEyblt4UBrnrOdQRm2/6RQmJJzaMI043hcy+Rb7i4L2dL9twLuiUJ1JIGUWFSQHPTEBOm2D8/JvflzHcf0p3Ya8TqPq1g7fKEQzLLdErVZkh0RDYMkQCZ1/+4qp309e61C78dbtqet2SO2vqHXPyvamsqUI0a7tiC0PRe0AeESISz+agwog+bRreu/0nFB0/LqbKmZc4A== 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=8/rLImZdR+5ufn6LoNn8ygLK+eYAQzrdfMxmL7GsftI=; b=jMKoiOUDoqo/LkkiL7igd/yvKglDcrT5B2kt216TptJ/OR6H61LMwnjAVQWH4Vw9DQ2zSAiYPH3tvIFzHW5QeE+m9WCoPA/lx6eJRjn3tQ0P1OU2X/qybSDTWClAU3J6GJ2Yk43CGieaDLpxZnznnQVeMrnu9TbJ1Lc8VoC1kCUHVO+rInGm+pZH42Uxn8nes+q1YoCYArbgNdFknGf4FNu9Alo/JFzXBaBsh1KMlbdVz7P9ncS/Kw0uFiBJWwx/km9/vD6fQ9uMEiWM7ewpyRfdGLIWmwfdKSF8WfTP+DqTIQnWgnyxjO2vj5cF+XobgSHr/AR7rrxBpe5swu1kqA== 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=8/rLImZdR+5ufn6LoNn8ygLK+eYAQzrdfMxmL7GsftI=; b=U0VZIatDeDkc5UmNc93bQgYQK8eJXgq9zEEuIAkgGkmKATrksmUzN4lWlKUSiPbnGw+s9j29+KV72+ahHI21w56bh7ylDB+WZ9QtGJIyyrbG5zp51Gvsb2F4DLQ/hN7diWWdwyLOfg7UnNlRb9kUpoyP3m/v+bL8Yp0+1xkQRgg= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none;driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:11 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::85c9:1aa9:aeab:3fa6]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::85c9:1aa9:aeab:3fa6%4]) with mapi id 15.20.3348.019; Mon, 7 Sep 2020 10:16:10 +0000 From: Jerome Pouiller 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 16/31] staging: wfx: drop useless struct hif_pm_mode Date: Mon, 7 Sep 2020 12:15:06 +0200 Message-Id: <20200907101521.66082-17-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200907101521.66082-1-Jerome.Pouiller@silabs.com> References: <20200907101521.66082-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0109.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::25) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (37.71.187.125) by PR0P264CA0109.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.16 via Frontend Transport; Mon, 7 Sep 2020 10:16:09 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [37.71.187.125] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff3092e2-330b-4566-cfa7-08d853170af9 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:962; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gzlIPPkQW4AMzXIBFhuMlF9McR1k+kj2O64NqU2pGHlOw+v3bc+/Z0TE9wam/Dnxf2jEg1milfVFalHSqvQXbMsf/iXGMTsBwu3M8kQvXP6lTar0tbDYHiB1cemLTADGbTHa+mSVGBO6SQpxllOze1YisHYLeaBURGkjoqNsGsCYMZSxUhtgISWHLYQDm4AKQNsx5JaYXghkooJYKV2n2o2OlopfjX9YBHAqOWW9Zti+2vYhYgoI7iMy/XCuLa1mHoihqxyrnCFwEUZJq4Be0qwg6TJ9tFzHoXy+6b+ZJ93R+UqGullfsqUWkbo2sZPvibqa5af3eXK5gZRWYGo5pQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: exxEdnn1alfKLwbnCfMp1VJM5Vs5KKLQ+ReWvM/KQQuhMiO5RS+JmtkHJKKZcE/+zndNDUnUFeFHCmejvIpGGgFdn93ip2EpKIjWTFg5CXTAdpplKFjAghz2SyMZw0/fSbrQs9sjktFdShLz1lw0jJHOOVlUG/sgbD3c/mom777OlN2/r1/FFhw9dP9kRbZXSrrmc9x7CEbC5il+tfCho5KEcWOOlHfh9/yuh9cGhgDp8ofus8PJsStMb+6cFR9H7ujhy8mfgQfK6mY9GKfhuNo2smViGL5kOKbL+RqI0j/Fog1WlCADKnUPa5kkEcnpalDu4UsBaPDLmbEOkmZI/gRcxgx2+8Z4zKE4gw3DiiivtduEwl6WgCag9KlRjoXpJ1aOvFRO+zb6AM825ez50lQnoR1CwBJkz/pDUkzTRq4wBpmLhnieHjAq4XEceYgGvO3T3PupTgGfbHiPROy+Kr7sVTaVIhE3o9yHzH70yfpWTEqwmVYT+wizHlGJvTeJkfIpHGistrkQ6/k2Y5ng8LbMnHxvHMEoHvUhjb7bZAomH4meDlMvpVO7HEtZubLzXo03N4ibQAHzVPmlRZ4zqqMfqzVoq6fV695wzPD7KSCa8CN8TnnbuC9oZoU+kkMDeGkL3I+6T/hnXxzdwP5oBA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff3092e2-330b-4566-cfa7-08d853170af9 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2020 10:16:10.8261 (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: 1irotb5hhDkMgw/J/hAnL/UZ35TUVAckLY776DtroWg8J6H2tVLS5RgGb5TjLb+XCTwIQu8yKEz8AqaSAGquMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_pm_mode has no reason to exist. Drop it and simplify access to struct hif_req_set_pm_mode. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +----- drivers/staging/wfx/hif_tx.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 4b01be677e08..6ecb23ceaf8c 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -378,14 +378,10 @@ struct hif_cnf_set_bss_params { __le32 status; } __packed; -struct hif_pm_mode { +struct hif_req_set_pm_mode { u8 enter_psm:1; u8 reserved:6; u8 fast_psm:1; -} __packed; - -struct hif_req_set_pm_mode { - struct hif_pm_mode pm_mode; u8 fast_psm_idle_period; u8 ap_psm_change_period; u8 min_auto_ps_poll_period; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index eddb60dec069..134af4daee96 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -439,11 +439,11 @@ int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) if (!hif) return -ENOMEM; if (ps) { - body->pm_mode.enter_psm = 1; + body->enter_psm = 1; // Firmware does not support more than 128ms body->fast_psm_idle_period = min(dynamic_ps_timeout * 2, 255); if (body->fast_psm_idle_period) - body->pm_mode.fast_psm = 1; + body->fast_psm = 1; } wfx_fill_header(hif, wvif->id, HIF_REQ_ID_SET_PM_MODE, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false);