]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/net/wireless/iwlwifi/dvm/debugfs.c
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
[mirror_ubuntu-jammy-kernel.git] / drivers / net / wireless / iwlwifi / dvm / debugfs.c
index b0eff1c340c74c5fa123f31eba726284abcaa96a..46782f1102ac7c8e159c3ef764a54205326923fd 100644 (file)
@@ -83,7 +83,7 @@ static ssize_t iwl_dbgfs_##name##_write(struct file *file,              \
 #define DEBUGFS_READ_FILE_OPS(name)                                     \
        DEBUGFS_READ_FUNC(name);                                        \
 static const struct file_operations iwl_dbgfs_##name##_ops = {          \
-       .read = iwl_dbgfs_##name##_read,                                \
+       .read = iwl_dbgfs_##name##_read,                                \
        .open = simple_open,                                            \
        .llseek = generic_file_llseek,                                  \
 };
@@ -2255,6 +2255,10 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
        char buf[8];
        int buf_size;
 
+       /* check that the interface is up */
+       if (!iwl_is_ready(priv))
+               return -EAGAIN;
+
        memset(buf, 0, sizeof(buf));
        buf_size = min(count, sizeof(buf) -  1);
        if (copy_from_user(buf, user_buf, buf_size))