From: stf_xl@wp.pl
To: linux-wireless@vger.kernel.org
Subject: [PATCH wireless-next v2 2/3] wifi: iwlegacy: remove channels debugfs file
Date: Tue, 27 Oct 2026 17:36:10 +0100 [thread overview]
Message-ID: <20261027163611.5161-3-stf_xl@wp.pl> (raw)
In-Reply-To: <20261027163611.5161-1-stf_xl@wp.pl>
From: Stanislaw Gruszka <stf_xl@wp.pl>
Remove the debugfs file that lists supported channels and their
properties, as the same information is provided by 'iw phy'
command.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
---
drivers/net/wireless/intel/iwlegacy/debug.c | 81 ---------------------
1 file changed, 81 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlegacy/debug.c b/drivers/net/wireless/intel/iwlegacy/debug.c
index a7db62f75d7a..a8cc01ce293b 100644
--- a/drivers/net/wireless/intel/iwlegacy/debug.c
+++ b/drivers/net/wireless/intel/iwlegacy/debug.c
@@ -493,85 +493,6 @@ il_dbgfs_nvm_read(struct file *file, char __user *user_buf, size_t count,
return ret;
}
-static ssize_t
-il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count,
- loff_t *ppos)
-{
- struct il_priv *il = file->private_data;
- struct ieee80211_channel *channels = NULL;
- const struct ieee80211_supported_band *supp_band = NULL;
- int pos = 0, i, bufsz = PAGE_SIZE;
- char *buf;
- ssize_t ret;
-
- if (!test_bit(S_GEO_CONFIGURED, &il->status))
- return -EAGAIN;
-
- buf = kzalloc(bufsz, GFP_KERNEL);
- if (!buf) {
- IL_ERR("Can not allocate Buffer\n");
- return -ENOMEM;
- }
-
- supp_band = il_get_hw_mode(il, NL80211_BAND_2GHZ);
- if (supp_band) {
- channels = supp_band->channels;
-
- pos +=
- scnprintf(buf + pos, bufsz - pos,
- "Displaying %d channels in 2.4GHz band 802.11bg):\n",
- supp_band->n_channels);
-
- for (i = 0; i < supp_band->n_channels; i++)
- pos +=
- scnprintf(buf + pos, bufsz - pos,
- "%d: %ddBm: BSS%s%s, %s.\n",
- channels[i].hw_value,
- channels[i].max_power,
- channels[i].
- flags & IEEE80211_CHAN_RADAR ?
- " (IEEE 802.11h required)" : "",
- ((channels[i].
- flags & IEEE80211_CHAN_NO_IR) ||
- (channels[i].
- flags & IEEE80211_CHAN_RADAR)) ? "" :
- ", IBSS",
- channels[i].
- flags & IEEE80211_CHAN_NO_IR ?
- "passive only" : "active/passive");
- }
- supp_band = il_get_hw_mode(il, NL80211_BAND_5GHZ);
- if (supp_band) {
- channels = supp_band->channels;
-
- pos +=
- scnprintf(buf + pos, bufsz - pos,
- "Displaying %d channels in 5.2GHz band (802.11a)\n",
- supp_band->n_channels);
-
- for (i = 0; i < supp_band->n_channels; i++)
- pos +=
- scnprintf(buf + pos, bufsz - pos,
- "%d: %ddBm: BSS%s%s, %s.\n",
- channels[i].hw_value,
- channels[i].max_power,
- channels[i].
- flags & IEEE80211_CHAN_RADAR ?
- " (IEEE 802.11h required)" : "",
- ((channels[i].
- flags & IEEE80211_CHAN_NO_IR) ||
- (channels[i].
- flags & IEEE80211_CHAN_RADAR)) ? "" :
- ", IBSS",
- channels[i].
- flags & IEEE80211_CHAN_NO_IR ?
- "passive only" : "active/passive");
- }
- ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
- kfree(buf);
- return ret;
-}
-
static ssize_t
il_dbgfs_status_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
@@ -802,7 +723,6 @@ il_dbgfs_disable_ht40_read(struct file *file, char __user *user_buf,
DEBUGFS_READ_WRITE_FILE_OPS(sram);
DEBUGFS_READ_FILE_OPS(nvm);
DEBUGFS_READ_FILE_OPS(stations);
-DEBUGFS_READ_FILE_OPS(channels);
DEBUGFS_READ_FILE_OPS(status);
DEBUGFS_READ_WRITE_FILE_OPS(interrupt);
DEBUGFS_READ_FILE_OPS(qos);
@@ -1303,7 +1223,6 @@ il_dbgfs_register(struct il_priv *il, const char *name)
DEBUGFS_ADD_FILE(nvm, dir_data, 0400);
DEBUGFS_ADD_FILE(sram, dir_data, 0600);
DEBUGFS_ADD_FILE(stations, dir_data, 0400);
- DEBUGFS_ADD_FILE(channels, dir_data, 0400);
DEBUGFS_ADD_FILE(status, dir_data, 0400);
DEBUGFS_ADD_FILE(interrupt, dir_data, 0600);
DEBUGFS_ADD_FILE(qos, dir_data, 0400);
--
2.50.1
next prev parent reply other threads:[~2026-10-27 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 16:36 [PATCH wireless-next v2 0/3] small debugfs cleanups stf_xl
2026-10-27 16:36 ` [PATCH wireless-next v2 1/3] wifi: iwlegacy: remove configurable watchdog timeout stf_xl
2026-10-27 16:36 ` stf_xl [this message]
2026-10-27 16:36 ` [PATCH wireless-next v2 3/3] wifi: iwlegacy: remove disable_ht40 debugfs file stf_xl
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=20261027163611.5161-3-stf_xl@wp.pl \
--to=stf_xl@wp.pl \
--cc=linux-wireless@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