<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/net/wireless/ath/ath5k, branch docs-6.8</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.8</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.8'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2023-10-25T17:10:23+00:00</updated>
<entry>
<title>Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git</title>
<updated>2023-10-25T17:10:23+00:00</updated>
<author>
<name>Kalle Valo</name>
<email>kvalo@kernel.org</email>
</author>
<published>2023-10-25T17:10:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b6144dcdd445d1bf8b7973b73c9a2dd5b44661cf'/>
<id>urn:sha1:b6144dcdd445d1bf8b7973b73c9a2dd5b44661cf</id>
<content type='text'>
ath.git patches for v6.7.

Major changes:

ath12k

* QCN9274: mesh support

ath11k

* firmware-2.bin support
</content>
</entry>
<entry>
<title>wifi: mac80211: rename ieee80211_tx_status() to ieee80211_tx_status_skb()</title>
<updated>2023-10-23T10:26:51+00:00</updated>
<author>
<name>Kalle Valo</name>
<email>quic_kvalo@quicinc.com</email>
</author>
<published>2023-10-12T11:42:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2703bc8513996e848b5aefa2deb1ff3baae5d79b'/>
<id>urn:sha1:2703bc8513996e848b5aefa2deb1ff3baae5d79b</id>
<content type='text'>
make htmldocs warns:

Documentation/driver-api/80211/mac80211:109: ./include/net/mac80211.h:5170: WARNING: Duplicate C declaration, also defined at mac80211:1117.
Declaration is '.. c:function:: void ieee80211_tx_status (struct ieee80211_hw *hw, struct sk_buff *skb)'.

This is because there's a function named ieee80211_tx_status() and a struct named
ieee80211_tx_status. This has been discussed previously but no solution found:

https://lore.kernel.org/all/20220521114629.6ee9fc06@coco.lan/

There's also a bug open for three years with no solution in sight:

https://github.com/sphinx-doc/sphinx/pull/8313

So I guess we have no other solution than to a workaround this in the code,
for example to rename the function to ieee80211_tx_status_skb() to avoid the
name conflict. I got the idea for the name from ieee80211_tx_status_noskb() in
which the skb is not provided as an argument, instead with
ieee80211_tx_status_skb() the skb is provided.

Compile tested only.

Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20231012114229.2931808-2-kvalo@kernel.org
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: ath5k: replace deprecated strncpy with strscpy</title>
<updated>2023-10-18T08:31:36+00:00</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-10-13T20:53:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=24709752bfe8bc0147c9379a6ec8fe8d75874066'/>
<id>urn:sha1:24709752bfe8bc0147c9379a6ec8fe8d75874066</id>
<content type='text'>
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.

We expect led-&gt;name to be NUL-terminated based on the presence of a
manual NUL-byte assignment.

This NUL-byte assignment was added in Commit daf9669bea30aa22 ("ath5k:
ensure led name is null terminated"). If strscpy() had existed and had
been used back when this code was written then potential bugs and the
need to manually NUL-terminate could have been avoided. Since we now
have the technology, let's use it :)

Considering the above, a suitable replacement is `strscpy` [2] due to
the fact that it guarantees NUL-termination on the destination buffer
without unnecessarily NUL-padding. If NUL-padding is required let's opt
for strscpy_pad().

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20231013-strncpy-drivers-net-wireless-ath-ath5k-led-c-v1-1-3acb0b5a21f2@google.com
</content>
</entry>
<entry>
<title>wifi: ath5k: remove unnecessary (void*) conversions</title>
<updated>2023-09-21T08:08:22+00:00</updated>
<author>
<name>Wu Yunchuan</name>
<email>yunchuan@nfschina.com</email>
</author>
<published>2023-09-19T04:49:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4bd0f7d0f3112e26f14cc4e045a5b3e223584fbf'/>
<id>urn:sha1:4bd0f7d0f3112e26f14cc4e045a5b3e223584fbf</id>
<content type='text'>
No need cast (void *) to (struct ath5k_hw *).

Signed-off-by: Wu Yunchuan &lt;yunchuan@nfschina.com&gt;
Reviewed-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230919044959.523576-1-yunchuan@nfschina.com
</content>
</entry>
<entry>
<title>wifi: ath5k: ath5k_hw_get_median_noise_floor(): use swap()</title>
<updated>2023-08-23T14:16:14+00:00</updated>
<author>
<name>Mahmoud Maatuq</name>
<email>mahmoudmatook.mm@gmail.com</email>
</author>
<published>2023-08-15T04:08:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e10ec6ea612ca54e3266996875b0742619dac20f'/>
<id>urn:sha1:e10ec6ea612ca54e3266996875b0742619dac20f</id>
<content type='text'>
coccinielle reported the following:
./drivers/net/wireless/ath/ath5k/phy.c:1573:25-26: WARNING opportunity for swap()

while trying to fix the above warning, it reveals that ath5k_hw_get_median_noise_floor()
had open-coded sort() functionality. Since ath5k_hw_get_median_noise_floor() only
executes once every 10 seconds, any extra overhead due to sort() calling
its "compare" and "swap" functions can be ignored, so replace the
existing logic with a call to sort().

Signed-off-by: Mahmoud Maatuq &lt;mahmoudmatook.mm@gmail.com&gt;
Suggested-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230815040819.649455-1-mahmoudmatook.mm@gmail.com
</content>
</entry>
<entry>
<title>wifi: ath: remove unused-but-set parameter</title>
<updated>2023-08-23T14:12:09+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2023-08-14T07:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3b86f86d0f163454c4043a629f0ba95641d371bc'/>
<id>urn:sha1:3b86f86d0f163454c4043a629f0ba95641d371bc</id>
<content type='text'>
This has never been used since the driver was merged, but it now causes
a W=1 warning in recent clang versions

drivers/net/wireless/ath/ath9k/main.c:1566:21: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
drivers/net/wireless/ath/ath9k/htc_drv_main.c:1258:25: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
drivers/net/wireless/ath/ath5k/mac80211-ops.c:367:62: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]

Remove the bit manipulation on the otherwise unused parameter.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Acked-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230814073255.1065242-1-arnd@kernel.org
</content>
</entry>
<entry>
<title>wifi: ath5k: Remove redundant dev_err()</title>
<updated>2023-08-22T13:32:52+00:00</updated>
<author>
<name>Ruan Jinjie</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2023-08-21T07:57:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f708ed71775d2216d829fe6e00f1b4c6b38bc03c'/>
<id>urn:sha1:f708ed71775d2216d829fe6e00f1b4c6b38bc03c</id>
<content type='text'>
There is no need to call the dev_err() function directly to print a custom
message when handling an error from platform_get_irq() function as it is
going to display an appropriate error message in case of a failure.

Signed-off-by: Ruan Jinjie &lt;ruanjinjie@huawei.com&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230726171235.2475625-1-ruanjinjie@huawei.com
</content>
</entry>
<entry>
<title>wifi: ath5k: remove phydir check from ath5k_debug_init_device()</title>
<updated>2023-07-25T14:30:03+00:00</updated>
<author>
<name>Minjie Du</name>
<email>duminjie@vivo.com</email>
</author>
<published>2023-07-24T10:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f7eb8315b22a8f58365b8916446a11326e5a719b'/>
<id>urn:sha1:f7eb8315b22a8f58365b8916446a11326e5a719b</id>
<content type='text'>
'phydir' returned from debugfs_create_dir() is checked against NULL.
As the debugfs API returns an error pointer,
the returned value can never be NULL.

Therefore, as the documentation suggests that the check is unnecessary
and other debugfs calls have no operation in error cases,
it is advisable to completely eliminate the check.

Signed-off-by: Minjie Du &lt;duminjie@vivo.com&gt;
Reviewed-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230714081619.2032-1-duminjie@vivo.com
</content>
</entry>
<entry>
<title>wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list()</title>
<updated>2023-02-22T09:56:30+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2023-02-06T13:15:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4c856ee12df85aabd437c3836ed9f68d94268358'/>
<id>urn:sha1:4c856ee12df85aabd437c3836ed9f68d94268358</id>
<content type='text'>
This loop checks that i &lt; max at the start of loop but then it does
i++ which could put it past the end of the array.  It's harmless to
check again and prevent a potential out of bounds.

Fixes: 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data")
Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Reviewed-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/Y+D9hPQrHfWBJhXz@kili
</content>
</entry>
<entry>
<title>wifi: ath5k: Use platform_get_irq() to get the interrupt</title>
<updated>2023-02-22T09:51:43+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2023-02-01T16:54:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=95c95251d0547b46d6571e4fbd51b42865c15a4a'/>
<id>urn:sha1:95c95251d0547b46d6571e4fbd51b42865c15a4a</id>
<content type='text'>
As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ
resource from DT core"), we need to use platform_get_irq() instead of
platform_get_resource() to get our IRQs because
platform_get_resource() simply won't get them anymore.

This was already fixed in several other Atheros WiFi drivers,
apparently in response to Zeal Robot reports. An example of another
fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the
interrupt"). ath5k seems to have been missed in this effort, though.

Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Lad Prabhakar &lt;prabhakar.mahadev-lad.rj@bp.renesas.com&gt;
Signed-off-by: Kalle Valo &lt;quic_kvalo@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230201084131.v2.2.Ic4f8542b0588d7eb4bc6e322d4af3d2064e84ff0@changeid
</content>
</entry>
</feed>
