diff options
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.patch | 67 |
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 @@ | |||
1 | From 470e08b2e73b3ce64336de8d55b009e4782735b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Johannes Berg <johannes.berg@intel.com> | ||
3 | Date: Wed, 20 Jun 2012 08:46:25 +0200 | ||
4 | Subject: [PATCH 29/46] iwlwifi: remove log_event debugfs file debugging is | ||
5 | disabled | ||
6 | |||
7 | commit 882b7b7d11d65e8eccce738f1ce97cdfdb998f9f upstream. | ||
8 | |||
9 | When debugging is disabled, the event log functions aren't | ||
10 | functional in the way that the debugfs file expects. This | ||
11 | leads to the debugfs access crashing. Since the event log | ||
12 | functions aren't functional then, remove the debugfs file | ||
13 | when CONFIG_IWLWIFI_DEBUG is not set. | ||
14 | |||
15 | Reported-by: Lekensteyn <lekensteyn@gmail.com> | ||
16 | Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> | ||
17 | Signed-off-by: Johannes Berg <johannes.berg@intel.com> | ||
18 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
19 | [bwh: Backported to 3.2: adjust filename, context] | ||
20 | Signed-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 | |||
25 | diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | ||
26 | index 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 | -- | ||
66 | 1.7.10 | ||
67 | |||