Re: [PATCH v7 21/24] wfx: add debug.c/debug.h

From: Kalle Valo
Date: Fri Oct 01 2021 - 08:01:49 EST


Jerome Pouiller <Jerome.Pouiller@xxxxxxxxxx> writes:

> From: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>
>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>

[...]

> +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;
> +
> + d = debugfs_create_dir("wfx", wdev->hw->wiphy->debugfsdir);
> + debugfs_create_file("counters", 0444, d, wdev, &wfx_counters_fops);
> + debugfs_create_file("rx_stats", 0444, d, wdev, &wfx_rx_stats_fops);
> + 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);

ps_timeout sounds like something which should be in nl80211, not in
debugfs. Please remove it until the driver is accepted.

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches