From: Stanislaw Gruszka The disable_ht40 debugfs option was used for narrowing issues when developing the driver, it's no longer needed. Signed-off-by: Stanislaw Gruszka --- 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(-) diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c index c6a593e9cea0..ab9dbc53e01c 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.c +++ b/drivers/net/wireless/intel/iwlegacy/common.c @@ -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); diff --git a/drivers/net/wireless/intel/iwlegacy/common.h b/drivers/net/wireless/intel/iwlegacy/common.h index 260e6b971d00..542519bce242 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.h +++ b/drivers/net/wireless/intel/iwlegacy/common.h @@ -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; diff --git a/drivers/net/wireless/intel/iwlegacy/debug.c b/drivers/net/wireless/intel/iwlegacy/debug.c index a8cc01ce293b..5c8378740cee 100644 --- a/drivers/net/wireless/intel/iwlegacy/debug.c +++ b/drivers/net/wireless/intel/iwlegacy/debug.c @@ -679,46 +679,6 @@ il_dbgfs_qos_read(struct file *file, char __user *user_buf, size_t count, return simple_read_from_buffer(user_buf, count, ppos, buf, pos); } -static ssize_t -il_dbgfs_disable_ht40_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 ht40; - - 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", &ht40) != 1) - return -EFAULT; - if (!il_is_any_associated(il)) - il->disable_ht40 = ht40 ? true : false; - else { - IL_ERR("Sta associated with AP - " - "Change to 40MHz channel support is not allowed\n"); - return -EINVAL; - } - - return count; -} - -static ssize_t -il_dbgfs_disable_ht40_read(struct file *file, char __user *user_buf, - size_t count, loff_t *ppos) -{ - struct il_priv *il = file->private_data; - char buf[100]; - int pos = 0; - const size_t bufsz = sizeof(buf); - - pos += - scnprintf(buf + pos, bufsz - pos, "11n 40MHz Mode: %s\n", - il->disable_ht40 ? "Disabled" : "Enabled"); - return simple_read_from_buffer(user_buf, count, ppos, buf, pos); -} DEBUGFS_READ_WRITE_FILE_OPS(sram); DEBUGFS_READ_FILE_OPS(nvm); @@ -726,7 +686,6 @@ DEBUGFS_READ_FILE_OPS(stations); DEBUGFS_READ_FILE_OPS(status); DEBUGFS_READ_WRITE_FILE_OPS(interrupt); DEBUGFS_READ_FILE_OPS(qos); -DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40); static ssize_t il_dbgfs_tx_queue_read(struct file *file, char __user *user_buf, size_t count, @@ -1226,7 +1185,6 @@ il_dbgfs_register(struct il_priv *il, const char *name) DEBUGFS_ADD_FILE(status, dir_data, 0400); DEBUGFS_ADD_FILE(interrupt, dir_data, 0600); DEBUGFS_ADD_FILE(qos, dir_data, 0400); - DEBUGFS_ADD_FILE(disable_ht40, dir_data, 0600); DEBUGFS_ADD_FILE(rx_stats, dir_debug, 0400); DEBUGFS_ADD_FILE(tx_stats, dir_debug, 0400); DEBUGFS_ADD_FILE(rx_queue, dir_debug, 0400); -- 2.50.1