small debugfs cleanups
[email protected]
maintainerv2 cover small debugfs cleanups
From: Stanislaw Gruszka <[email protected]>
Remove some no longer needed knobs that can change driver behaviour.
v2: add wifi prefix to the topic
Stanislaw Gruszka (3):
wifi: iwlegacy: remove configurable watchdog timeout
wifi: iwlegacy: remove channels debugfs file
wifi: iwlegacy: remove disable_ht40 debugfs file
.../net/wireless/intel/iwlegacy/3945-mac.c | 2 +- drivers/net/wireless/intel/iwlegacy/3945.c | 2 - .../net/wireless/intel/iwlegacy/4965-mac.c | 2 +- drivers/net/wireless/intel/iwlegacy/4965.c | 1 - drivers/net/wireless/intel/iwlegacy/common.c | 36 +---- drivers/net/wireless/intel/iwlegacy/common.h | 10 +- drivers/net/wireless/intel/iwlegacy/debug.c | 149 ------------------ 7 files changed, 8 insertions(+), 194 deletions(-)
Signature · 1 line
2.50.1
[email protected]
maintainerPATCH v2 1/3 wifi: iwlegacy: remove configurable watchdog timeout
From: Stanislaw Gruszka <[email protected]>
Remove the debugfs file used to configure the TX queue watchdog timeout. It was used to experiment with different timeout values to determine a suitable default, which is no longer necessary.
--- .../net/wireless/intel/iwlegacy/3945-mac.c | 2 +- drivers/net/wireless/intel/iwlegacy/3945.c | 2 -- .../net/wireless/intel/iwlegacy/4965-mac.c | 2 +- drivers/net/wireless/intel/iwlegacy/4965.c | 1 - drivers/net/wireless/intel/iwlegacy/common.c | 31 ++----------------- drivers/net/wireless/intel/iwlegacy/common.h | 9 +++--- drivers/net/wireless/intel/iwlegacy/debug.c | 26 ---------------- 7 files changed, 8 insertions(+), 65 deletions(-)
drivers/net/wireless/intel/iwlegacy/3945-mac.c +1 -1
@@ -2132,7 +2132,7 @@ il3945_alive_start(struct il_priv *il)set_bit (S_ALIVE , &il->status);/* Enable watchdog to monitor the driver tx queues */ -il_setup_watchdog (il); +mod_timer (&il->watchdog, jiffies +msecs_to_jiffies (IL_WD_TICK ));if (il_is_rfkill (il))return ;
drivers/net/wireless/intel/iwlegacy/3945.c +0 -2
@@ -2670,7 +2670,6 @@ static const struct il_cfg il3945_bg_cfg = { .set_l0s = false, .use_bsm = true, .led_compensation = 64, - .wd_timeout = IL_DEF_WD_TIMEOUT, .regulatory_bands = { EEPROM_REGULATORY_BAND_1_CHANNELS,
@@ -2699,7 +2698,6 @@ static const struct il_cfg il3945_abg_cfg = { .set_l0s = false, .use_bsm = true, .led_compensation = 64, - .wd_timeout = IL_DEF_WD_TIMEOUT, .regulatory_bands = { EEPROM_REGULATORY_BAND_1_CHANNELS,
drivers/net/wireless/intel/iwlegacy/4965-mac.c +1 -1
@@ -5291,7 +5291,7 @@ il4965_alive_start(struct il_priv *il)set_bit (S_ALIVE , &il->status);/* Enable watchdog to monitor the driver tx queues */ -il_setup_watchdog (il); +mod_timer (&il->watchdog, jiffies +msecs_to_jiffies (IL_WD_TICK ));if (il_is_rfkill (il))return ;
drivers/net/wireless/intel/iwlegacy/4965.c +0 -1
@@ -1913,7 +1913,6 @@ struct il_cfg il4965_cfg = { .use_bsm = true, .led_compensation = 61, .chain_noise_num_beacons = IL4965_CAL_NUM_BEACONS, - .wd_timeout = IL_DEF_WD_TIMEOUT, .temperature_kelvin = true, .ucode_tracing = true, .sensitivity_calib_by_driver = true,
drivers/net/wireless/intel/iwlegacy/common.c +2 -29
@@ -4772,9 +4772,7 @@ il_check_stuck_queue(struct il_priv *il, int cnt)return 0 ; } - timeout = - txq->time_stamp + -msecs_to_jiffies (il->cfg->wd_timeout); + timeout = txq->time_stamp +msecs_to_jiffies (IL_WD_TIMEOUT );if (time_after (now, timeout)) { IL_ERR("Queue %d stuck for %u ms.\n", q->id,
@@ -4786,12 +4784,6 @@ il_check_stuck_queue(struct il_priv *il, int cnt)return 0 ; } -/* -* Making watchdog tick be a quarter of timeout assure we will -* discover the queue hung between timeout and 1.25*timeout -*/ -#define IL_WD_TICK (timeout) ((timeout) / 4) -/* * Watchdog timer callback, we check each tx queue for stuck, if hung * we reset the firmware. If everything is fine just rearm the timer.
@@ -4801,15 +4793,10 @@ il_bg_watchdog(struct timer_list *t) {struct il_priv *il =timer_container_of (il, t, watchdog);int cnt; -unsigned long timeout;if (test_bit (S_EXIT_PENDING , &il->status))return ; - timeout = il->cfg->wd_timeout; -if (timeout ==0 ) -return ; -/* monitor and check for stuck cmd queue */ if (il_check_stuck_queue (il, il->cmd_queue))return ;
@@ -4823,24 +4810,10 @@ il_bg_watchdog(struct timer_list *t)return ; } -mod_timer (&il->watchdog, - jiffies +msecs_to_jiffies (IL_WD_TICK (timeout))); +mod_timer (&il->watchdog, jiffies +msecs_to_jiffies (IL_WD_TICK )); }EXPORT_SYMBOL (il_bg_watchdog); -void -il_setup_watchdog (struct il_priv *il) -{ -unsigned int timeout = il->cfg->wd_timeout; - -if (timeout) -mod_timer (&il->watchdog, - jiffies +msecs_to_jiffies (IL_WD_TICK (timeout))); -else -timer_delete (&il->watchdog); -} -EXPORT_SYMBOL (il_setup_watchdog); -/* * extended beacon time format * time in usec will be changed into a 32-bit value in extended:internal format
drivers/net/wireless/intel/iwlegacy/common.h +4 -5
@@ -1085,9 +1085,9 @@ struct traffic_stats {#define IL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5)/* TX queue watchdog timeouts in mSecs */ -#define IL_DEF_WD_TIMEOUT (2000) -#define IL_LONG_WD_TIMEOUT (10000) -#define IL_MAX_WD_TIMEOUT (120000) +#define IL_WD_TIMEOUT 2000 +/* Discover the queue hung between timeout and 1.25*timeout */ +#define IL_WD_TICK (IL_WD_TIMEOUT / 4)struct il_force_reset {int reset_request_count;
@@ -1683,7 +1683,6 @@ struct il_cfg {u16 led_compensation;int chain_noise_num_beacons; -unsigned int wd_timeout;bool temperature_kelvin;const bool ucode_tracing;const bool sensitivity_calib_by_driver;
@@ -1764,7 +1763,7 @@ int il_tx_queue_init(struct il_priv *il, u32 txq_id);void il_tx_queue_reset (struct il_priv *il,u32 txq_id);void il_tx_queue_unmap (struct il_priv *il,int txq_id);void il_tx_queue_free (struct il_priv *il,int txq_id); -void il_setup_watchdog (struct il_priv *il); +/***************************************************** * TX power ****************************************************/
drivers/net/wireless/intel/iwlegacy/debug.c +0 -26
@@ -1265,30 +1265,6 @@ il_dbgfs_force_reset_write(struct file *file, const char __user *user_buf,return ret ? ret : count; } -static ssize_t -il_dbgfs_wd_timeout_write (struct file *file,const char __user *user_buf, -size_t count,loff_t *ppos) -{ - -struct il_priv *il = file->private_data; -char buf[8 ]; -int buf_size; -int timeout; - -memset (buf,0 ,sizeof (buf)); - buf_size =min (count,sizeof (buf) -1 ); -if (copy_from_user (buf, user_buf, buf_size)) -return -EFAULT ; -if (sscanf (buf,"%d" , &timeout) !=1 ) -return -EINVAL ; -if (timeout <0 || timeout >IL_MAX_WD_TIMEOUT ) - timeout =IL_DEF_WD_TIMEOUT ; - - il->cfg->wd_timeout = timeout; -il_setup_watchdog (il); -return count; -} -DEBUGFS_READ_FILE_OPS (rx_stats);DEBUGFS_READ_FILE_OPS (tx_stats);DEBUGFS_READ_FILE_OPS (rx_queue);
@@ -1306,7 +1282,6 @@ DEBUGFS_READ_WRITE_FILE_OPS(missed_beacon);DEBUGFS_READ_WRITE_FILE_OPS (force_reset);DEBUGFS_READ_FILE_OPS (rxon_flags);DEBUGFS_READ_FILE_OPS (rxon_filter_flags); -DEBUGFS_WRITE_FILE_OPS (wd_timeout);/* * Create the debugfs files and directories
@@ -1353,7 +1328,6 @@ il_dbgfs_register(struct il_priv *il, const char *name)DEBUGFS_ADD_FILE (chain_noise, dir_debug,0400 );DEBUGFS_ADD_FILE (rxon_flags, dir_debug,0200 );DEBUGFS_ADD_FILE (rxon_filter_flags, dir_debug,0200 ); -DEBUGFS_ADD_FILE (wd_timeout, dir_debug,0200 );if (il->cfg->sensitivity_calib_by_driver)DEBUGFS_ADD_BOOL (disable_sensitivity, dir_rf, &il->disable_sens_cal);
Signature · 1 line
2.50.1
[email protected]
maintainerPATCH v2 2/3 wifi: iwlegacy: remove channels debugfs file
In reply to [email protected]From: Stanislaw Gruszka <[email protected]>
Remove the debugfs file that lists supported channels and their properties, as the same information is provided by 'iw phy' command.
--- drivers/net/wireless/intel/iwlegacy/debug.c | 81 --------------------- 1 file changed, 81 deletions(-)
drivers/net/wireless/intel/iwlegacy/debug.c +0 -81
@@ -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 );
Signature · 1 line
2.50.1
[email protected]
maintainerPATCH v2 3/3 wifi: iwlegacy: remove disable_ht40 debugfs file
In reply to [email protected]From: Stanislaw Gruszka <[email protected]>
The disable_ht40 debugfs option was used for narrowing issues when developing the driver, it's no longer needed.
--- drivers/net/wireless/intel/iwlegacy/common.c | 5 --- drivers/net/wireless/intel/iwlegacy/common.h | 1 - drivers/net/wireless/intel/iwlegacy/debug.c | 42 -------------------- 3 files changed, 48 deletions(-)
drivers/net/wireless/intel/iwlegacy/common.c +0 -5
@@ -3583,11 +3583,6 @@ il_is_ht40_tx_allowed(struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)if (ht_cap && !ht_cap->ht_supported)return false; -#ifdef CONFIG_IWLEGACY_DEBUGFS -if (il->disable_ht40) -return false; -#endif -return il_is_channel_extension (il, il->band,le16_to_cpu (il->staging.channel), il->ht.extension_chan_offset);
drivers/net/wireless/intel/iwlegacy/common.h +0 -1
@@ -1418,7 +1418,6 @@ struct il_priv {u8 *rx_traffic;struct dentry *debugfs_dir;u32 dbgfs_sram_offset, dbgfs_sram_len; -bool disable_ht40;#endif /* CONFIG_IWLEGACY_DEBUGFS */ struct work_struct txpower_work;
drivers/net/wireless/intel/iwlegacy/debug.c +0 -42
60 lines not on this page · raw message
Signature · 1 line
2.50.1