<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/realtek/rtw88/debug.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-01-18T09:32:47Z</updated>
<entry>
<title>wifi: rtw88: use kstrtoX_from_user() in debugfs handlers</title>
<updated>2024-01-18T09:32:47Z</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2024-01-10T13:29:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=23b8330156e55aa80027d2e962146ada78a693ce'/>
<id>urn:sha1:23b8330156e55aa80027d2e962146ada78a693ce</id>
<content type='text'>
When 'sscanf()' is not needed to scan an input, prefer common
'kstrtoX_from_user()' over 'rtw_debugfs_copy_from_user()' with
following 'kstrtoX()'. Minor adjustments, compile tested only.

Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20240110132930.438828-1-dmantipov@yandex.ru
</content>
</entry>
<entry>
<title>wifi: rtw88: debug: remove wrapper of rtw_dbg()</title>
<updated>2023-11-30T19:20:12Z</updated>
<author>
<name>Ping-Ke Shih</name>
<email>pkshih@realtek.com</email>
</author>
<published>2023-11-22T06:14:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1da42060128469e0ff13ff2ff69d8db916b16c6a'/>
<id>urn:sha1:1da42060128469e0ff13ff2ff69d8db916b16c6a</id>
<content type='text'>
Remove unnecessary wrapper of rtw_dbg(), and just call it directly.

Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20231122061429.34487-1-pkshih@realtek.com
</content>
</entry>
<entry>
<title>wifi: rtw88: debug: Fix the NULL vs IS_ERR() bug for debugfs_create_file()</title>
<updated>2023-09-20T11:15:39Z</updated>
<author>
<name>Jinjie Ruan</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2023-09-19T05:06:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74f7957c9b1b95553faaf146a2553e023a9d1720'/>
<id>urn:sha1:74f7957c9b1b95553faaf146a2553e023a9d1720</id>
<content type='text'>
Since debugfs_create_file() return ERR_PTR and never return NULL, so use
IS_ERR() to check it instead of checking NULL.

Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230919050651.962694-1-ruanjinjie@huawei.com
</content>
</entry>
<entry>
<title>wifi: rtw88: fix incorrect error codes in rtw_debugfs_set_*</title>
<updated>2023-05-05T07:38:08Z</updated>
<author>
<name>Zhang Shurong</name>
<email>zhang_shurong@foxmail.com</email>
</author>
<published>2023-04-26T17:02:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=77005533777267736fca64fa376b8a835cb8806b'/>
<id>urn:sha1:77005533777267736fca64fa376b8a835cb8806b</id>
<content type='text'>
If there is a failure during copy_from_user or user-provided data
buffer is invalid, rtw_debugfs_set_* should return negative
error code instead of a positive value count.

Fix this bug by returning correct error code.

Signed-off-by: Zhang Shurong &lt;zhang_shurong@foxmail.com&gt;
Reviewed-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/tencent_53140CC2A3468101955F02EB66AA96780B05@qq.com
</content>
</entry>
<entry>
<title>wifi: rtw88: fix incorrect error codes in rtw_debugfs_copy_from_user</title>
<updated>2023-05-05T07:38:08Z</updated>
<author>
<name>Zhang Shurong</name>
<email>zhang_shurong@foxmail.com</email>
</author>
<published>2023-04-26T17:02:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=225622256b1b7156624e281e1c0251c292ea24cd'/>
<id>urn:sha1:225622256b1b7156624e281e1c0251c292ea24cd</id>
<content type='text'>
If there is a failure during copy_from_user or user-provided data
buffer is invalid, rtw_debugfs_copy_from_user should return negative
error code instead of a positive value count.

Fix this bug by returning correct error code. Moreover, the check
of buffer against null is removed since it will be handled by
copy_from_user.

Signed-off-by: Zhang Shurong &lt;zhang_shurong@foxmail.com&gt;
Reviewed-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/tencent_D2EB102CC7435C0110154E62ECA6A7D67505@qq.com
</content>
</entry>
<entry>
<title>wifi: rtw88: Drop coex mutex</title>
<updated>2022-12-08T14:48:41Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2022-12-02T08:12:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8647f7f0b9080bc2d2f6e02524782f2f02f159bc'/>
<id>urn:sha1:8647f7f0b9080bc2d2f6e02524782f2f02f159bc</id>
<content type='text'>
coex-&gt;mutex is used in rtw_coex_info_request() only. Most callers of this
function hold rtwdev-&gt;mutex already, except for one callsite in the
debugfs code. The debugfs code alone doesn't justify the extra lock, so
acquire rtwdev-&gt;mutex there as well and drop the now unnecessary
spinlock.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20221202081224.2779981-6-s.hauer@pengutronix.de
</content>
</entry>
<entry>
<title>wifi: rtw88: Drop h2c.lock</title>
<updated>2022-12-08T14:48:41Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2022-12-02T08:12:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1e2701f4079a7906ff3fb43a315925d303e289d8'/>
<id>urn:sha1:1e2701f4079a7906ff3fb43a315925d303e289d8</id>
<content type='text'>
The h2c.lock spinlock is used in rtw_fw_send_h2c_command() and
rtw_fw_send_h2c_packet().  Most callers call this with rtwdev-&gt;mutex
held, except from one callsite in the debugfs code. The debugfs code
alone doesn't justify the extra lock, so acquire rtwdev-&gt;mutex in
debugfs and drop the now unnecessary spinlock.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20221202081224.2779981-5-s.hauer@pengutronix.de
</content>
</entry>
<entry>
<title>wifi: rtw88: Drop rf_lock</title>
<updated>2022-12-08T14:48:40Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2022-12-02T08:12:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d57ca103e54e2b3eea7e2603548c58bcc4155541'/>
<id>urn:sha1:d57ca103e54e2b3eea7e2603548c58bcc4155541</id>
<content type='text'>
The rtwdev-&gt;rf_lock spinlock protects the rf register accesses in
rtw_read_rf() and rtw_write_rf(). Most callers of these functions hold
rtwdev-&gt;mutex already with the exception of the callsites in the debugfs
code. The debugfs code doesn't justify an extra lock, so acquire the mutex
there as well before calling rf register accessors and drop the now
unnecessary spinlock.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20221202081224.2779981-4-s.hauer@pengutronix.de
</content>
</entry>
<entry>
<title>wifi: rtw88: add mutex when set regulatory and get Tx power table</title>
<updated>2022-08-10T05:48:46Z</updated>
<author>
<name>Chih-Kang Chang</name>
<email>gary.chang@realtek.com</email>
</author>
<published>2022-08-09T08:41:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=685b474b7d8aadf601f4627ccad00d59fabd4757'/>
<id>urn:sha1:685b474b7d8aadf601f4627ccad00d59fabd4757</id>
<content type='text'>
Applying regulatory and getting Tx power table will access hal
data, it should hold rtwdev::mutex to avoid hal data changed during
setting flow.

Signed-off-by: Chih-Kang Chang &lt;gary.chang@realtek.com&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220809084107.38137-3-pkshih@realtek.com
</content>
</entry>
<entry>
<title>wifi: rtw88: use %*ph to print small buffer</title>
<updated>2022-06-08T08:07:47Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-06-03T12:56:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d38c9df53ad6cd374a047126cd6aa5c5dffb455f'/>
<id>urn:sha1:d38c9df53ad6cd374a047126cd6aa5c5dffb455f</id>
<content type='text'>
Use %*ph format to print small buffer as hex string.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220603125648.46873-1-andriy.shevchenko@linux.intel.com
</content>
</entry>
</feed>
