staging: wfx: remove force_ps_timeout
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Thu, 13 Jan 2022 08:55:19 +0000 (09:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 15:19:42 +0000 (16:19 +0100)
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>
Link: https://lore.kernel.org/r/20220113085524.1110708-27-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/debug.c
drivers/staging/wfx/main.c
drivers/staging/wfx/sta.c
drivers/staging/wfx/wfx.h

index ae7895ea36d92e5807b121491bbe51e644895c4d..e8265208f9a5d17d23ffdeb71b2539762a794ba5 100644 (file)
@@ -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;
 }
index 46fd5702e4712d12b67540c5ea108b4b1e36cf7d..a98a261f6d7615bd1e2a8a4612c78bc2b9121866 100644 (file)
@@ -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;
index 83f1ac87e0f24b97fa01cf9fb584058ad6449f25..ba53e4d70c4f88f71117a6962065ddc4d29103ff 100644 (file)
@@ -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;
index 0fc8366d9fb335d0ce861df4f1b6b40f1e27304c..6594cc647c2f6892e3bc8e9be4bf55152cf4af23 100644 (file)
@@ -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 {