From patchwork Thu Jan 13 08:55:19 2022 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: 12712468 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BD6AC433EF for ; Thu, 13 Jan 2022 08:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233485AbiAMI6Z (ORCPT ); Thu, 13 Jan 2022 03:58:25 -0500 Received: from mail-dm6nam11on2085.outbound.protection.outlook.com ([40.107.223.85]:34208 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233451AbiAMI5f (ORCPT ); Thu, 13 Jan 2022 03:57:35 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fC652Ts07GlJdedmizfA/TNirWD2yFP+6HwLwV3b22LDzI4Oy9VrxN2l6QKNK3VV/hpnZMEAmV1GmSKHFCUhPhuG/vBpJiJtNtyUg9+aYqL6WGa+HklGDPCiCBS7SBjilHdFlUyEX2M8TeBmkP9hOhCxJeq9aiad94RznfQQViNMefINe8981z3kz0CDTr2lOS6ieBzz4IfkVRU4sV3WqBILAk41ZlARyTFugFwnsG++r8ufIBOZQW2sgwi8MQA1kfLsvxHxpw+hDj8ewYSXY9K58xcprE7WPB3MR57bM2MNfc9lrF1K+Zc/WEiNCAp7TfPJwvLkaeCBgrcGsYxaUA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dg4CGuc2nBytV62h3DFwdZV0CKyHJG+AG38cTB1YZVo=; b=HQle/gQhQ8iBQNJT1ZrGRaytlqBeTHNkR6dyhwEZcN8gOeYTa6ptE/1ZIQOs1AOYw2bypj9l9O7PVHSjG4vPdD7L8vulpBqTsr2WaWQLNciyITK/eNlUCrC/xwvObbxrcGoLax12Xjhf/aiEH5Ee5j53LWufsPrFJOnS2mTTf+82GoHQHQdZTOsFCaXDmy+pqY+3hCyTA5T2YVRwQgnSPfCW3imMnfzf/zSQAQXpXkvClPUDkN7KIX2Z8dFmFao7d8zfhBA4qRa3HeVXaCoIIgDK5bE1vVhSLMhzvZWlwaKtavVoluu/GYIfY0t2nFBBKabkYiNOrwUV8KITiAPzEw== 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=dg4CGuc2nBytV62h3DFwdZV0CKyHJG+AG38cTB1YZVo=; b=bSFfTNOhONyJvgKCtF4xCCcm1VlS2IJa3Dvu7O2RAcS7n0HM7OdnL+bbLPlwRh3f2SPpT18VEzSxs96b7o/f/M2RFYIjKAM5rOnkwv8KoTADEwT81I0FtOs2lODhRKDdXcwnWHU8/aSYAs5KwAddNAjCQMauFlPnIhbvlwkr8O4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:30 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:30 +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 26/31] staging: wfx: remove force_ps_timeout Date: Thu, 13 Jan 2022 09:55:19 +0100 Message-Id: <20220113085524.1110708-27-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a55299d7-24df-4827-e9d6-08d9d6729769 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t11hr28O5GYoK4hRX6VUlLX53HNMqAsNwjajp/gehn0Is2TSfpjNUpWiN7Bwg4g8gsfXhx8vKz9SO76fg6lcb4bgS13RLarLqHKjbK+tEiHTri2mu6ptb8OJLmu2a6SKaOxIWR/siHNEtHbkrWjuMzPvEnrTx7byiTDLdk4R6ILwSN2IpxaUK86ujZ5/F5x0tM5DEbwNwhA73XcGTNAt7iM31EN6ZGhNF+vtumc3OnX87W49HZW8+O7tBRubzCciGcYBBi9R67qUWbn2NepsDuQR/yifK7QsAqwFvflo2HbjGXVsIwMammfij8eWcWVWnUf0Ud1+kDlsQL8neUzq1Zi0OsShiV56MKGOAsWcQOqDjYpKnQeVloGxWup8v7HAgMB11ybDEfXd8MsnjxTL7HHlnY7cBLS+NdeSfaR8ww2jmvKe4HI97fm6H7kRBdO1WUSEvDiBBf9pQg21m4ivboa0i53XTzObHJz8bmW50T+iVe4yz5tNAtmeE9UtNZPBpbREWluSHPTvbR9T57eOn6sYMxHu3MdsJSDXNQxRLIK6LvIdm0uz+D6ESNHzadeEytaMMFKThsycvFpHJkKQhs28QKP50OCfkSBiOz9OwgsbEvSY+hPdwsjE2mmOZZ8JjB0Jg3U1J0egLBo5qjMYlA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(66574015)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4bkgQOPaVXYHd+KUewJRAZW12MfN?= =?utf-8?q?vizPwqRFAVDmM8HsUQ9aaAZgUbFhDm72HNSJ6mWStfZV+DaGwN9yJu+j7ifgyLc6l?= =?utf-8?q?4DPnbqwpTMruf/zDAFAjEBR/OyAAAa27yb6uJLKk3jxraI6qM4+jjuJh2uEp6TROu?= =?utf-8?q?21ZbMtk0ab/4oHfzWHRhzb8oE0I6SS+7kKRlvxDwxUzTLdsjTEYmGuKmHun8raY+H?= =?utf-8?q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?utf-8?q?zVHc1TB/xuYS4lt4fC2WxLUFaBmFPZvi87WodfKX1H+xI3hfHb9rw7UjcrCdeWFlh?= =?utf-8?q?nflhCNMWeTnKMNltY7svhO4IdefUQopm2kQZRZGvbYGCjXt8D1Dd+JU1i9dtqwqlQ?= =?utf-8?q?WPjAFqb874oETy8pcY2CdWFmimDAD7RzMh0zt1VOQScKnfzTYivDrvSW04YBCKlka?= =?utf-8?q?W7GxtzeyxIebJetUMeNCGSHzOr+uxzINAVURk4dW49zxjO7sWTZn/onKNVuMkJ+ff?= =?utf-8?q?NCJUbZmJ/yt1BTuVIEGuQbNMwgLz5s5/qSYbImJCbbdbbrwP/NsSl/URUDdqwdkH7?= =?utf-8?q?8DhJ7pQqB6C5KJY5B0uZk0d9Dys2BnPd8jqqF9sw4k5Hddhq1Kk3UL6BFeURJ0eLk?= =?utf-8?q?uVRmmNcWFzvKuKrT7VF5o54xxe5otOAZrk8Gh9KOzkcfS3dWnHbTxp+yDNNj1J7QU?= =?utf-8?q?28c9GxTMNmCY4N6nalGYinhk0WaWA3PSPlILiNH07tUnALX2eejTCWp7nFh9hKVEW?= =?utf-8?q?OGdtCrREIT72DENX3MlEezhg32nrBcCaC7YBVJeG9cjkF5oXEL70Hg=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a55299d7-24df-4827-e9d6-08d9d6729769 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:30.6583 (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: RBBSlHOSZ0ABtDBEGkJ4YcVY+b5ghsrOVX/Y5+1UGxVsygjqpN+F2yGXBfpJ1yLH4ebRrF6NoIKIghRFrcWIdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller ps_timeout should be in nl80211, not in debugfs. Let's remove it until the driver is accepted. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 23 ----------------------- drivers/staging/wfx/main.c | 1 - drivers/staging/wfx/sta.c | 8 ++------ drivers/staging/wfx/wfx.h | 1 - 4 files changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index ae7895ea36d9..e8265208f9a5 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -316,28 +316,6 @@ static const struct file_operations wfx_send_hif_msg_fops = { .read = wfx_send_hif_msg_read, }; -static int wfx_ps_timeout_set(void *data, u64 val) -{ - struct wfx_dev *wdev = (struct wfx_dev *)data; - struct wfx_vif *wvif; - - wdev->force_ps_timeout = val; - wvif = NULL; - while ((wvif = wvif_iterate(wdev, wvif)) != NULL) - wfx_update_pm(wvif); - return 0; -} - -static int wfx_ps_timeout_get(void *data, u64 *val) -{ - struct wfx_dev *wdev = (struct wfx_dev *)data; - - *val = wdev->force_ps_timeout; - return 0; -} - -DEFINE_DEBUGFS_ATTRIBUTE(wfx_ps_timeout_fops, wfx_ps_timeout_get, wfx_ps_timeout_set, "%lld\n"); - int wfx_debug_init(struct wfx_dev *wdev) { struct dentry *d; @@ -348,7 +326,6 @@ int wfx_debug_init(struct wfx_dev *wdev) debugfs_create_file("tx_power_loop", 0444, d, wdev, &wfx_tx_power_loop_fops); debugfs_create_file("send_pds", 0200, d, wdev, &wfx_send_pds_fops); debugfs_create_file("send_hif_msg", 0600, d, wdev, &wfx_send_hif_msg_fops); - debugfs_create_file("ps_timeout", 0600, d, wdev, &wfx_ps_timeout_fops); return 0; } diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 46fd5702e471..a98a261f6d76 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -324,7 +324,6 @@ struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_da skb_queue_head_init(&wdev->tx_pending); init_waitqueue_head(&wdev->tx_dequeue); wfx_init_hif_cmd(&wdev->hif_cmd); - wdev->force_ps_timeout = -1; if (devm_add_action_or_reset(dev, wfx_free_common, wdev)) return NULL; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 83f1ac87e0f2..ba53e4d70c4f 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -171,18 +171,14 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) /* It is necessary to enable PS if channels are different. */ if (enable_ps) *enable_ps = true; - if (wvif->wdev->force_ps_timeout > -1) - return wvif->wdev->force_ps_timeout; - else if (wfx_api_older_than(wvif->wdev, 3, 2)) + if (wfx_api_older_than(wvif->wdev, 3, 2)) return 0; else return 30; } if (enable_ps) *enable_ps = wvif->vif->bss_conf.ps; - if (wvif->wdev->force_ps_timeout > -1) - return wvif->wdev->force_ps_timeout; - else if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps) + if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps) return conf->dynamic_ps_timeout; else return -1; diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 0fc8366d9fb3..6594cc647c2f 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -57,7 +57,6 @@ struct wfx_dev { struct mutex rx_stats_lock; struct wfx_hif_tx_power_loop_info tx_power_loop_info; struct mutex tx_power_loop_info_lock; - int force_ps_timeout; }; struct wfx_vif {