<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/ath/dfs_pattern_detector.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-01-17T12:41:51Z</updated>
<entry>
<title>ath: dfs_pattern_detector: Avoid open coded arithmetic in memory allocation</title>
<updated>2022-01-17T12:41:51Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-12-27T16:58:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a063b650ce5d72585d780d653a123f9f273b7877'/>
<id>urn:sha1:a063b650ce5d72585d780d653a123f9f273b7877</id>
<content type='text'>
kmalloc_array()/kcalloc() should be used to avoid potential overflow when
a multiplication is needed to compute the size of the requested memory.

kmalloc_array() can be used here instead of kcalloc() because the array is
fully initialized in the next 'for' loop.

Finally, 'cd-&gt;detectors' is defined as 'struct pri_detector **detectors;'.
So 'cd-&gt;detectors' and '*cd-&gt;detectors' are both some pointer.
So use a more logical 'sizeof(*cd-&gt;detectors)'.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/0fbcd32a0384ac1f87c5a3549e505e4becc60226.1640624216.git.christophe.jaillet@wanadoo.fr
</content>
</entry>
<entry>
<title>ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create()</title>
<updated>2021-10-11T06:26:10Z</updated>
<author>
<name>Tuo Li</name>
<email>islituo@gmail.com</email>
</author>
<published>2021-08-05T15:38:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4b6012a7830b813799a7faf40daa02a837e0fd5b'/>
<id>urn:sha1:4b6012a7830b813799a7faf40daa02a837e0fd5b</id>
<content type='text'>
kzalloc() is used to allocate memory for cd-&gt;detectors, and if it fails,
channel_detector_exit() behind the label fail will be called:
  channel_detector_exit(dpd, cd);

In channel_detector_exit(), cd-&gt;detectors is dereferenced through:
  struct pri_detector *de = cd-&gt;detectors[i];

To fix this possible null-pointer dereference, check cd-&gt;detectors before
the for loop to dereference cd-&gt;detectors.

Reported-by: TOTE Robot &lt;oslab@tsinghua.edu.cn&gt;
Signed-off-by: Tuo Li &lt;islituo@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210805153854.154066-1-islituo@gmail.com
</content>
</entry>
<entry>
<title>ath: dfs_pattern_detector: Fix some function kernel-doc headers</title>
<updated>2020-11-07T08:06:46Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-11-02T11:23:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=206cd5800d8c7893b69bde0e607321e934815a54'/>
<id>urn:sha1:206cd5800d8c7893b69bde0e607321e934815a54</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/dfs_pattern_detector.c:34: warning: Function parameter or member 'region' not described in 'radar_types'
 drivers/net/wireless/ath/dfs_pattern_detector.c:141: warning: Function parameter or member 'region' not described in 'get_dfs_domain_radar_types'
 drivers/net/wireless/ath/dfs_pattern_detector.c:239: warning: Function parameter or member 'dpd' not described in 'channel_detector_get'
 drivers/net/wireless/ath/dfs_pattern_detector.c:239: warning: Function parameter or member 'freq' not described in 'channel_detector_get'

Cc: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Jakub Kicinski &lt;kuba@kernel.org&gt;
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20201102112410.1049272-22-lee.jones@linaro.org
</content>
</entry>
<entry>
<title>ath: drop unnecessary list_empty</title>
<updated>2020-08-14T15:05:06Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@inria.fr</email>
</author>
<published>2020-07-26T10:58:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=18c25b4019caa94deee67e839aea6b7b626e70d5'/>
<id>urn:sha1:18c25b4019caa94deee67e839aea6b7b626e70d5</id>
<content type='text'>
list_for_each_entry{_safe} is able to handle an empty list.
The only effect of avoiding the loop is not initializing the
index variable.
Drop list_empty tests in cases where these variables are not
used.

Note that list_for_each_entry{_safe} is defined in terms of
list_first_entry, which indicates that it should not be used on an
empty list.  But in list_for_each_entry{_safe}, the element obtained
by list_first_entry is not really accessed, only the address of its
list_head field is compared to the address of the list head, so the
list_first_entry is safe.

The semantic patch that makes this change for the list_for_each_entry
case is as follows: (http://coccinelle.lip6.fr/)

&lt;smpl&gt;
@@
expression x,e;
statement S;
identifier i;
@@

-if (!(list_empty(x)))
   list_for_each_entry(i,x,...) S
 ... when != i
? i = e
&lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1595761112-11003-8-git-send-email-Julia.Lawall@inria.fr
</content>
</entry>
<entry>
<title>ath: DFS JP domain W56 fixed pulse type 3 RADAR detection</title>
<updated>2019-04-29T14:58:51Z</updated>
<author>
<name>Anilkumar Kolli</name>
<email>akolli@codeaurora.org</email>
</author>
<published>2019-03-06T17:36:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d8792393a783158cbb2c39939cb897dc5e5299b6'/>
<id>urn:sha1:d8792393a783158cbb2c39939cb897dc5e5299b6</id>
<content type='text'>
Increase pulse width range from 1-2usec to 0-4usec.
During data traffic HW occasionally fails detecting radar pulses,
so that SW cannot get enough radar reports to achieve the success rate.

Tested ath10k hw and fw:
	* QCA9888(10.4-3.5.1-00052)
	* QCA4019(10.4-3.2.1.1-00017)
	* QCA9984(10.4-3.6-00104)
	* QCA988X(10.2.4-1.0-00041)

Tested ath9k hw: AR9300

Tested-by: Tamizh chelvam &lt;tamizhr@codeaurora.org&gt;
Signed-off-by: Tamizh chelvam &lt;tamizhr@codeaurora.org&gt;
Signed-off-by: Anilkumar Kolli &lt;akolli@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>ath: add support to get the detected radar specifications</title>
<updated>2018-05-25T10:15:21Z</updated>
<author>
<name>Sriram R</name>
<email>srirrama@codeaurora.org</email>
</author>
<published>2018-05-15T09:09:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f40105e6747892e8edab94020567c158c9bec0df'/>
<id>urn:sha1:f40105e6747892e8edab94020567c158c9bec0df</id>
<content type='text'>
This enables ath10k/ath9k drivers to collect the specifications of the
radar type once it is detected by the dfs pattern detector unit.
Usage of the collected info is specific to driver implementation.
For example, collected radar info could be used by the host driver
to send to co-processors for additional processing/validation.

Note: 'radar_detector_specs' data containing the specifications of
different radar types which was private within dfs_pattern_detector/
dfs_pri_detector is now shared with drivers as well for making use
of this information.

Signed-off-by: Sriram R &lt;srirrama@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>ath: fix false radar detection in JP region</title>
<updated>2018-03-26T15:09:57Z</updated>
<author>
<name>Sriram R</name>
<email>srirrama@codeaurora.org</email>
</author>
<published>2018-03-14T10:14:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ba21ac6cdaef2d0dd51bccbd86547b7f34f7bdc1'/>
<id>urn:sha1:ba21ac6cdaef2d0dd51bccbd86547b7f34f7bdc1</id>
<content type='text'>
This fixes false radar detection (of radar type 7)
in Japan region by correcting the radar pulse type
to Chirp as per specification.

Signed-off-by: Sriram R &lt;srirrama@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>ath: constify local structures</title>
<updated>2016-09-14T17:01:39Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-09-11T13:05:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8136fd58ad60e25cf8b99d08bf92c09d02b416ef'/>
<id>urn:sha1:8136fd58ad60e25cf8b99d08bf92c09d02b416ef</id>
<content type='text'>
For structure types defined in the same file or local header files, find
top-level static structure declarations that have the following
properties:
1. Never reassigned.
2. Address never taken
3. Not passed to a top-level macro call
4. No pointer or array-typed field passed to a function or stored in a
variable.
Declare structures having all of these properties as const.

Done using Coccinelle.
Based on a suggestion by Joe Perches &lt;joe@perches.com&gt;.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>tree-wide: replace config_enabled() with IS_ENABLED()</title>
<updated>2016-08-04T12:50:07Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2016-08-03T20:45:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=97f2645f358b411ba2afb22e5966753f0ad92916'/>
<id>urn:sha1:97f2645f358b411ba2afb22e5966753f0ad92916</id>
<content type='text'>
The use of config_enabled() against config options is ambiguous.  In
practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
author might have used it for the meaning of IS_ENABLED().  Using
IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc.  makes the intention
clearer.

This commit replaces config_enabled() with IS_ENABLED() where possible.
This commit is only touching bool config options.

I noticed two cases where config_enabled() is used against a tristate
option:

 - config_enabled(CONFIG_HWMON)
  [ drivers/net/wireless/ath/ath10k/thermal.c ]

 - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
  [ drivers/gpu/drm/gma500/opregion.c ]

I did not touch them because they should be converted to IS_BUILTIN()
in order to keep the logic, but I was not sure it was the authors'
intention.

Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Stas Sergeev &lt;stsp@list.ru&gt;
Cc: Matt Redfearn &lt;matt.redfearn@imgtec.com&gt;
Cc: Joshua Kinard &lt;kumba@gentoo.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: "Dmitry V. Levin" &lt;ldv@altlinux.org&gt;
Cc: yu-cheng yu &lt;yu-cheng.yu@intel.com&gt;
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Will Drewry &lt;wad@chromium.org&gt;
Cc: Nikolay Martynov &lt;mar.kolya@gmail.com&gt;
Cc: Huacai Chen &lt;chenhc@lemote.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: Leonid Yegoshin &lt;Leonid.Yegoshin@imgtec.com&gt;
Cc: Rafal Milecki &lt;zajec5@gmail.com&gt;
Cc: James Cowgill &lt;James.Cowgill@imgtec.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Alex Smith &lt;alex.smith@imgtec.com&gt;
Cc: Adam Buchbinder &lt;adam.buchbinder@gmail.com&gt;
Cc: Qais Yousef &lt;qais.yousef@imgtec.com&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Mikko Rapeli &lt;mikko.rapeli@iki.fi&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Cc: "Luis R. Rodriguez" &lt;mcgrof@do-not-panic.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Roland McGrath &lt;roland@hack.frob.com&gt;
Cc: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Cc: Tony Wu &lt;tung7970@gmail.com&gt;
Cc: Huaitong Han &lt;huaitong.han@intel.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Andrea Gelmini &lt;andrea.gelmini@gelma.net&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Rabin Vincent &lt;rabin@rab.in&gt;
Cc: "Maciej W. Rozycki" &lt;macro@imgtec.com&gt;
Cc: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ath: fix DFS timestamp wraparound reset condition</title>
<updated>2015-10-09T08:47:31Z</updated>
<author>
<name>Zefir Kurtisi</name>
<email>zefir.kurtisi@neratec.com</email>
</author>
<published>2015-09-29T10:29:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=706452b06866f950febb91e582c1d06c03ca85ee'/>
<id>urn:sha1:706452b06866f950febb91e582c1d06c03ca85ee</id>
<content type='text'>
The DFS pattern detector ought to reset the
detector lines when a pulse is added with
lower time stamp than the previous (which
indicates a TSF restart).

This did not work so far and is fixed with
this patch.

The modification does not change detection
performance within the driver, since it
only ensures early reset (which is later
performed by the PRI detectors anyway).
It is relevant for synthetic tests and
statistical evaluations, where millions
of pulse patterns are processed and an
early reset helps reducing load.

Signed-off-by: Zefir Kurtisi &lt;zefir.kurtisi@neratec.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
</content>
</entry>
</feed>
