summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0029-iwlwifi-remove-log_event-debugfs-file-debugging-is-d.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0029-iwlwifi-remove-log_event-debugfs-file-debugging-is-d.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0029-iwlwifi-remove-log_event-debugfs-file-debugging-is-d.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0029-iwlwifi-remove-log_event-debugfs-file-debugging-is-d.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0029-iwlwifi-remove-log_event-debugfs-file-debugging-is-d.patch
new file mode 100644
index 00000000..65fb0bea
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0029-iwlwifi-remove-log_event-debugfs-file-debugging-is-d.patch
@@ -0,0 +1,67 @@
1From 470e08b2e73b3ce64336de8d55b009e4782735b8 Mon Sep 17 00:00:00 2001
2From: Johannes Berg <johannes.berg@intel.com>
3Date: Wed, 20 Jun 2012 08:46:25 +0200
4Subject: [PATCH 29/46] iwlwifi: remove log_event debugfs file debugging is
5 disabled
6
7commit 882b7b7d11d65e8eccce738f1ce97cdfdb998f9f upstream.
8
9When debugging is disabled, the event log functions aren't
10functional in the way that the debugfs file expects. This
11leads to the debugfs access crashing. Since the event log
12functions aren't functional then, remove the debugfs file
13when CONFIG_IWLWIFI_DEBUG is not set.
14
15Reported-by: Lekensteyn <lekensteyn@gmail.com>
16Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
17Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18Signed-off-by: John W. Linville <linville@tuxdriver.com>
19[bwh: Backported to 3.2: adjust filename, context]
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 6 ++++++
23 1 file changed, 6 insertions(+)
24
25diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
26index 5815cf5..4661a64 100644
27--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
28+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
29@@ -1777,6 +1777,7 @@ static ssize_t iwl_dbgfs_rx_queue_read(struct file *file,
30 return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
31 }
32
33+#ifdef CONFIG_IWLWIFI_DEBUG
34 static ssize_t iwl_dbgfs_log_event_read(struct file *file,
35 char __user *user_buf,
36 size_t count, loff_t *ppos)
37@@ -1814,6 +1815,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
38
39 return count;
40 }
41+#endif
42
43 static ssize_t iwl_dbgfs_interrupt_read(struct file *file,
44 char __user *user_buf,
45@@ -1941,7 +1943,9 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file,
46 return ret;
47 }
48
49+#ifdef CONFIG_IWLWIFI_DEBUG
50 DEBUGFS_READ_WRITE_FILE_OPS(log_event);
51+#endif
52 DEBUGFS_READ_WRITE_FILE_OPS(interrupt);
53 DEBUGFS_READ_FILE_OPS(fh_reg);
54 DEBUGFS_READ_FILE_OPS(rx_queue);
55@@ -1957,7 +1961,9 @@ static int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans,
56 {
57 DEBUGFS_ADD_FILE(rx_queue, dir, S_IRUSR);
58 DEBUGFS_ADD_FILE(tx_queue, dir, S_IRUSR);
59+#ifdef CONFIG_IWLWIFI_DEBUG
60 DEBUGFS_ADD_FILE(log_event, dir, S_IWUSR | S_IRUSR);
61+#endif
62 DEBUGFS_ADD_FILE(interrupt, dir, S_IWUSR | S_IRUSR);
63 DEBUGFS_ADD_FILE(csr, dir, S_IWUSR);
64 DEBUGFS_ADD_FILE(fh_reg, dir, S_IRUSR);
65--
661.7.10
67