summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/dvm/debugfs.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-07-10 00:35:18 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-10 00:35:18 +0400
commitfd2841c5b59c276796f730b77ef37408c0909f9c (patch)
tree34329300850e4addad576325840b6715e6894a9a /drivers/net/wireless/iwlwifi/dvm/debugfs.c
parent0af5491c2f6069bb6cff4260619749a90a208c98 (diff)
parent0ff1bd35f5aece42879b04cbfe6b4040cf50a697 (diff)
downloadlinux-fd2841c5b59c276796f730b77ef37408c0909f9c.tar.xz
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/debugfs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/debugfs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
index b0eff1c340c7..46782f1102ac 100644
--- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
@@ -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))