Fix possible NULL (sc->dfs_detector) pointer dereference.
Detected by Smatch:
drivers/net/wireless/ath/ath9k/dfs_debug.c:67 read_file_dfs()
error: we previously assumed 'sc->dfs_detector' could be null (see line 47)
Signed-off-by: Janusz Dziedzic <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Move the DFS pattern detector code to the ath module so
the other Atheros drivers can make us of it. This makes
no functional changes.
Signed-off-by: Janusz Dziedzic <[email protected]>
Reviewed-by: Luis R. Rodriguez <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Move ath_dfs_pool_stats to dfs_pattern_detector
code to be not specyfic only for ath9k.
Signed-off-by: Janusz Dziedzic <[email protected]>
Reviewed-by: Luis R. Rodriguez <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Whenever the return value of snprintf() is used to calculate
remaining buffer-space, we wanted to use sncprintf() instead.
Indentation is adapted where possible. Some lines exceed the
line width limit, either they did it already before, or
since they can not be broken reasonably well.
Signed-off-by: Zefir Kurtisi <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This helps testing DFS without radar generating
equipment and is required for certification.
Signed-off-by: Simon Wunderlich <[email protected]>
Signed-off-by: Zefir Kurtisi <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Extend debugfs entry for dfs_stats with DFS detection events
and shared pool statistics.
Signed-off-by: Zefir Kurtisi <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op. This leads to a
proliferation of the default_open() implementation across the entire
tree.
Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().
This replacement was done with the following semantic patch:
<smpl>
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i->i_private)
-f->private_data = i->i_private;
|
-f->private_data = i->i_private;
)
-return 0;
-}
@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
</smpl>
[[email protected]: checkpatch fixes]
Signed-off-by: Stephen Boyd <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Julia Lawall <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This initial DFS module provides basic functionality to deal
with radar pulses reported by the Atheros DFS HW pulse detector.
The reported data is evaluated and basic plausibility checks
are performed to filter false pulses. Passing radar pulses are
forwarded to pattern detectors which are not yet implemented.
(Some modifications to actually use ATH9K_DFS_DEBUGFS based on comments
from Julian Calaby <[email protected]>. -- JWL)
Signed-off-by: Zefir Kurtisi <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
Signed-off-by: John W. Linville <[email protected]>