@@ -34,6 +34,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = iwl_dbgfs_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
#define DEBUGFS_WRITE_FILE_OPS(name) \
@@ -41,6 +42,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.write = iwl_dbgfs_##name##_write, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
@@ -50,6 +52,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = iwl_dbgfs_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
static ssize_t iwl_dbgfs_sram_read(struct file *file,
@@ -3172,6 +3172,7 @@ static const struct file_operations rs_sta_dbgfs_scale_table_ops = {
.read = rs_sta_dbgfs_scale_table_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t rs_sta_dbgfs_stats_table_read(struct file *file,
char __user *user_buf, size_t count, loff_t *ppos)
@@ -3215,6 +3216,7 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = {
.read = rs_sta_dbgfs_stats_table_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t rs_sta_dbgfs_rate_scale_data_read(struct file *file,
@@ -3241,6 +3243,7 @@ static const struct file_operations rs_sta_dbgfs_rate_scale_data_ops = {
.read = rs_sta_dbgfs_rate_scale_data_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static void rs_add_debugfs(void *priv, void *priv_sta,
@@ -122,6 +122,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.open = _iwl_dbgfs_##name##_open, \
.llseek = generic_file_llseek, \
.release = _iwl_dbgfs_release, \
+ .owner = THIS_MODULE, \
}
#define FWRT_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
@@ -150,6 +151,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.open = _iwl_dbgfs_##name##_open, \
.llseek = generic_file_llseek, \
.release = _iwl_dbgfs_release, \
+ .owner = THIS_MODULE, \
}
#define _FWRT_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \
@@ -160,6 +162,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.open = _iwl_dbgfs_##name##_open, \
.llseek = generic_file_llseek, \
.release = _iwl_dbgfs_release, \
+ .owner = THIS_MODULE, \
}
#define FWRT_DEBUGFS_READ_FILE_OPS(name, bufsz) \
@@ -1981,6 +1981,7 @@ static const struct file_operations iwl_dbgfs_mem_ops = {
.write = iwl_dbgfs_mem_write,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
void iwl_mvm_sta_add_debugfs(struct ieee80211_hw *hw,
@@ -63,6 +63,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = iwl_dbgfs_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
}
#define MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
@@ -87,6 +88,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = iwl_dbgfs_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
#define _MVM_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \
@@ -95,4 +97,5 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.write = _iwl_dbgfs_##name##_write, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
@@ -3909,6 +3909,7 @@ static const struct file_operations rs_sta_dbgfs_scale_table_ops = {
.read = rs_sta_dbgfs_scale_table_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t rs_sta_dbgfs_stats_table_read(struct file *file,
char __user *user_buf, size_t count, loff_t *ppos)
@@ -3956,6 +3957,7 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = {
.read = rs_sta_dbgfs_stats_table_read,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t rs_sta_dbgfs_drv_tx_stats_read(struct file *file,
@@ -4046,6 +4048,7 @@ static const struct file_operations rs_sta_dbgfs_drv_tx_stats_ops = {
.write = rs_sta_dbgfs_drv_tx_stats_write,
.open = simple_open,
.llseek = default_llseek,
+ .owner = THIS_MODULE,
};
static ssize_t iwl_dbgfs_ss_force_read(struct file *file,
@@ -2476,6 +2476,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = iwl_dbgfs_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
#define DEBUGFS_WRITE_FILE_OPS(name) \
@@ -2483,6 +2484,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.write = iwl_dbgfs_##name##_write, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
#define DEBUGFS_READ_WRITE_FILE_OPS(name) \
@@ -2491,6 +2493,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = iwl_dbgfs_##name##_read, \
.open = simple_open, \
.llseek = generic_file_llseek, \
+ .owner = THIS_MODULE, \
};
struct iwl_dbgfs_tx_queue_priv {
If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 5ae212c9273d ("[PATCH] iwlwifi: add read rate scale table debugfs function") Fixes: 0209dc11c769 ("[PATCH] iwlwifi: add debugfs rate scale stats") Fixes: 712b6cf57a53 ("iwlwifi: Add debugfs to iwl core") Fixes: 189a2b5942d6 ("iwlwifi: trigger event log from debugfs") Fixes: 8ca151b568b6 ("iwlwifi: add the MVM driver") Fixes: 757cf23b4b4b ("iwlwifi: mvm: add per rate tx stats") Fixes: 2b55f43f8e47 ("iwlwifi: mvm: Add mem debugfs entry") Fixes: 93b167c13a3a ("iwlwifi: runtime: sync FW and host clocks for logs") Fixes: 38167459da50 ("iwlagn: show current rate scale data in debugfs") Fixes: 87e5666c0722 ("iwlagn: transport handler can register debugfs entries") Fixes: 16db88ba51d6 ("iwlagn: move dump_csr and dump_fh to transport layer") Signed-off-by: Taehee Yoo <ap420073@gmail.com> --- v1 -> v2: - Change headline - Squash patches into per-driver/subsystem drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | 3 +++ drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 3 +++ drivers/net/wireless/intel/iwlwifi/fw/debugfs.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/debugfs.h | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 3 +++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 +++ 7 files changed, 19 insertions(+)