Linux wireless drivers development
 help / color / mirror / Atom feed
From: stf_xl@wp.pl
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH 2/3] wifi: iwlegacy: 4965: remove custom sysfs files
Date: Tue,  6 Oct 2026 10:14:42 +0200	[thread overview]
Message-ID: <20261006081443.28017-3-stf_xl@wp.pl> (raw)
In-Reply-To: <20261006081443.28017-1-stf_xl@wp.pl>

From: Stanislaw Gruszka <stf_xl@wp.pl>

Remove undocumented sysfs files used for driver debugging and
development.

Given the age of the driver, it is highly unlikely that access to any
of this information is needed, but if so, proper debugfs entries can
be added.

Suggested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
---
 .../net/wireless/intel/iwlegacy/4965-mac.c    | 75 -------------------
 1 file changed, 75 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
index dc420366dff3..621a6ccdaaa6 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
@@ -4520,74 +4520,6 @@ il4965_irq_tasklet(struct tasklet_struct *t)
 #endif
 }
 
-/*****************************************************************************
- *
- * sysfs attributes
- *
- *****************************************************************************/
-
-static ssize_t
-il4965_show_temperature(struct device *d, struct device_attribute *attr,
-			char *buf)
-{
-	struct il_priv *il = dev_get_drvdata(d);
-
-	if (!il_is_alive(il))
-		return -EAGAIN;
-
-	return sprintf(buf, "%d\n", il->temperature);
-}
-
-static DEVICE_ATTR(temperature, 0444, il4965_show_temperature, NULL);
-
-static ssize_t
-il4965_show_tx_power(struct device *d, struct device_attribute *attr, char *buf)
-{
-	struct il_priv *il = dev_get_drvdata(d);
-
-	if (!il_is_ready_rf(il))
-		return sprintf(buf, "off\n");
-	else
-		return sprintf(buf, "%d\n", il->tx_power_user_lmt);
-}
-
-static ssize_t
-il4965_store_tx_power(struct device *d, struct device_attribute *attr,
-		      const char *buf, size_t count)
-{
-	struct il_priv *il = dev_get_drvdata(d);
-	unsigned long val;
-	int ret;
-
-	ret = kstrtoul(buf, 10, &val);
-	if (ret)
-		IL_INFO("%s is not in decimal form.\n", buf);
-	else {
-		mutex_lock(&il->mutex);
-		ret = il_set_tx_power(il, val, false);
-		mutex_unlock(&il->mutex);
-		if (ret)
-			IL_ERR("failed setting tx power (0x%08x).\n", ret);
-		else
-			ret = count;
-	}
-	return ret;
-}
-
-static DEVICE_ATTR(tx_power, 0644, il4965_show_tx_power,
-		   il4965_store_tx_power);
-
-static struct attribute *il_sysfs_entries[] = {
-	&dev_attr_temperature.attr,
-	&dev_attr_tx_power.attr,
-	NULL
-};
-
-static const struct attribute_group il_attribute_group = {
-	.name = NULL,		/* put in device directory */
-	.attrs = il_sysfs_entries,
-};
-
 /******************************************************************************
  *
  * uCode download functions
@@ -4922,12 +4854,6 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context)
 
 	il_dbgfs_register(il, DRV_NAME);
 
-	err = sysfs_create_group(&il->pci_dev->dev.kobj, &il_attribute_group);
-	if (err) {
-		IL_ERR("failed to create sysfs device attributes\n");
-		goto out_unbind;
-	}
-
 	/* We have our copies now, allow OS release its copies */
 	release_firmware(ucode_raw);
 	complete(&il->_4965.firmware_loading_complete);
@@ -6653,7 +6579,6 @@ il4965_pci_remove(struct pci_dev *pdev)
 	D_INFO("*** UNLOAD DRIVER ***\n");
 
 	il_dbgfs_unregister(il);
-	sysfs_remove_group(&pdev->dev.kobj, &il_attribute_group);
 
 	/* ieee80211_unregister_hw call wil cause il_mac_stop to
 	 * be called and il4965_down since we are removing the device
-- 
2.50.1


  parent reply	other threads:[~2026-10-06  8:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06  8:14 [PATCH 0/3] wifi: iwlegacy: remove undocumented sysfs files stf_xl
2026-10-06  8:14 ` [PATCH 1/3] wifi: iwlegacy: set debug level using debugfs stf_xl
2026-10-06  8:14 ` stf_xl [this message]
2026-10-06  8:14 ` [PATCH 3/3] wifi: iwlegacy: 3945: remove custom sysfs files 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=20261006081443.28017-3-stf_xl@wp.pl \
    --to=stf_xl@wp.pl \
    --cc=johannes@sipsolutions.net \
    --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