From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Kalle Valo" <kvalo@codeaurora.org>,
"David S . Miller" <davem@davemloft.net>,
"Jérôme Pouiller" <jerome.pouiller@silabs.com>
Subject: [PATCH 26/31] staging: wfx: remove force_ps_timeout
Date: Thu, 13 Jan 2022 09:55:19 +0100 [thread overview]
Message-ID: <20220113085524.1110708-27-Jerome.Pouiller@silabs.com> (raw)
In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com>
From: Jérôme Pouiller <jerome.pouiller@silabs.com>
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 <jerome.pouiller@silabs.com>
---
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 {
--
2.34.1
next prev parent reply other threads:[~2022-01-13 8:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 8:54 [PATCH 00/31] staging/wfx: apply suggestions from the linux-wireless review Jerome Pouiller
2022-01-13 8:54 ` [PATCH 01/31] staging: wfx: fix Makefile and Kconfig licenses Jerome Pouiller
2022-01-13 8:54 ` [PATCH 02/31] staging: wfx: fix HIF API license Jerome Pouiller
2022-01-13 11:50 ` Kalle Valo
2022-01-13 12:16 ` Jérôme Pouiller
2022-01-13 8:54 ` [PATCH 03/31] staging: wfx: fix missing headers Jerome Pouiller
2022-01-13 8:54 ` [PATCH 04/31] staging: wfx: fix comment correctness Jerome Pouiller
2022-01-13 8:54 ` [PATCH 05/31] staging: wfx: explain uncommon Makefile statement Jerome Pouiller
2022-01-13 8:54 ` [PATCH 06/31] staging: wfx: remove unnecessary braces Jerome Pouiller
2022-01-13 8:55 ` [PATCH 07/31] staging: wfx: remove useless #ifdef Jerome Pouiller
2022-01-13 8:55 ` [PATCH 08/31] staging: wfx: use IS_ALIGNED() Jerome Pouiller
2022-01-13 8:55 ` [PATCH 09/31] staging: wfx: replace magic value by WFX_HIF_BUFFER_SIZE Jerome Pouiller
2022-01-13 8:55 ` [PATCH 10/31] stagigg: wfx: replace magic number by HIF_ID_IS_INDICATION Jerome Pouiller
2022-01-13 8:55 ` [PATCH 11/31] staging: wfx: preserve endianness of struct hif_ind_startup Jerome Pouiller
2022-01-13 8:55 ` [PATCH 12/31] staging: wfx: fix ambiguous function name Jerome Pouiller
2022-01-13 8:55 ` [PATCH 13/31] " Jerome Pouiller
2022-01-13 8:55 ` [PATCH 14/31] staging: wfx: prefix functions from hif_*.h with wfx_ Jerome Pouiller
2022-01-13 8:55 ` [PATCH 15/31] staging: wfx: prefix functions from hwio.h " Jerome Pouiller
2022-01-13 8:55 ` [PATCH 16/31] staging: wfx: prefix functions from debug.h " Jerome Pouiller
2022-01-13 8:55 ` [PATCH 17/31] staging: wfx: prefix tx_policy_is_equal() " Jerome Pouiller
2022-01-13 8:55 ` [PATCH 18/31] staging: wfx: prefix structs hif_* " Jerome Pouiller
2022-01-13 8:55 ` [PATCH 19/31] staging: wfx: prefix structs tx_policy and hwbus_ops " Jerome Pouiller
2022-01-13 8:55 ` [PATCH 20/31] staging: wfx: reformat code on 100 columns Jerome Pouiller
2022-01-13 8:55 ` [PATCH 21/31] staging: wfx: reformat comments " Jerome Pouiller
2022-01-13 8:55 ` [PATCH 22/31] staging: wfx: fix structs alignments Jerome Pouiller
2022-01-13 8:55 ` [PATCH 23/31] staging: wfx: use explicit labels for errors Jerome Pouiller
2022-01-13 8:55 ` [PATCH 24/31] staging: wfx: replace compiletime_assert() by BUILD_BUG_ON_MSG() Jerome Pouiller
2022-01-13 8:55 ` [PATCH 25/31] staging: wfx: do not display functions names in logs Jerome Pouiller
2022-01-13 8:55 ` Jerome Pouiller [this message]
2022-01-13 8:55 ` [PATCH 27/31] staging: wfx: map 'compatible' attribute with board name Jerome Pouiller
2022-01-13 8:55 ` [PATCH 28/31] staging: wfx: fix firmware location Jerome Pouiller
2022-01-13 8:55 ` [PATCH 29/31] staging: wfx: drop legacy compatible values Jerome Pouiller
2022-01-13 8:55 ` [PATCH 30/31] staging: wfx: rename "config-file" DT attribute Jerome Pouiller
2022-01-13 8:55 ` [PATCH 31/31] staging: wfx: do not probe the device if not in the DT Jerome Pouiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220113085524.1110708-27-Jerome.Pouiller@silabs.com \
--to=jerome.pouiller@silabs.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).