iwlwifi: LED cleanup
The iwlwifi drivers have LED blinking requirements that mac80211 cannot fulfill due to the use of just a single LED instead of different ones for TX, RX, radio etc. Instead, the single LED blinks according to transfers and is solid on the rest of the time. As such, having LED class devices registered that mac80211 triggers are connected to is pointless as we don't use the triggers anyway. Remove all the useless code and add hooks into the driver itself. At the same time, make the LED code abstracted so the core code that determines blink rate etc. can be shared between 3945 and agn in iwlcore. At the same time, the fact that we removed the use of the mac80211 LED triggers means we can also remove the IWLWIFI_LEDS Kconfig symbol since the LED support is now self-contained. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
be1a71a128
commit
e932a609e9
@@ -677,7 +677,6 @@ static ssize_t iwl_dbgfs_qos_read(struct file *file, char __user *user_buf,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_LEDS
|
||||
static ssize_t iwl_dbgfs_led_read(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
@@ -702,7 +701,6 @@ static ssize_t iwl_dbgfs_led_read(struct file *file, char __user *user_buf,
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static ssize_t iwl_dbgfs_thermal_throttling_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
@@ -866,9 +864,7 @@ DEBUGFS_READ_FILE_OPS(channels);
|
||||
DEBUGFS_READ_FILE_OPS(status);
|
||||
DEBUGFS_READ_WRITE_FILE_OPS(interrupt);
|
||||
DEBUGFS_READ_FILE_OPS(qos);
|
||||
#ifdef CONFIG_IWLWIFI_LEDS
|
||||
DEBUGFS_READ_FILE_OPS(led);
|
||||
#endif
|
||||
DEBUGFS_READ_FILE_OPS(thermal_throttling);
|
||||
DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40);
|
||||
DEBUGFS_READ_WRITE_FILE_OPS(sleep_level_override);
|
||||
@@ -1666,9 +1662,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
|
||||
DEBUGFS_ADD_FILE(status, data);
|
||||
DEBUGFS_ADD_FILE(interrupt, data);
|
||||
DEBUGFS_ADD_FILE(qos, data);
|
||||
#ifdef CONFIG_IWLWIFI_LEDS
|
||||
DEBUGFS_ADD_FILE(led, data);
|
||||
#endif
|
||||
DEBUGFS_ADD_FILE(sleep_level_override, data);
|
||||
DEBUGFS_ADD_FILE(current_sleep_command, data);
|
||||
DEBUGFS_ADD_FILE(thermal_throttling, data);
|
||||
@@ -1721,9 +1715,7 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv)
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_status);
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_interrupt);
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_qos);
|
||||
#ifdef CONFIG_IWLWIFI_LEDS
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_led);
|
||||
#endif
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_thermal_throttling);
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_disable_ht40);
|
||||
DEBUGFS_REMOVE(priv->dbgfs->dir_data);
|
||||
|
Reference in New Issue
Block a user