<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/realtek/rtw88/mac.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>2023-05-11T14:11:08Z</updated>
<entry>
<title>wifi: rtw88: mac: Return the original error from rtw_mac_power_switch()</title>
<updated>2023-05-11T14:11:08Z</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2023-02-26T22:10:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5cf39d763424196ddc8fd9ffc8470a53b0c3633e'/>
<id>urn:sha1:5cf39d763424196ddc8fd9ffc8470a53b0c3633e</id>
<content type='text'>
[ Upstream commit 15c8e267dfa62f207ee1db666c822324e3362b84 ]

rtw_mac_power_switch() calls rtw_pwr_seq_parser() which can return
-EINVAL, -EBUSY or 0. Propagate the original error code instead of
unconditionally returning -EINVAL in case of an error.

Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.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/20230226221004.138331-3-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: rtw88: mac: Return the original error from rtw_pwr_seq_parser()</title>
<updated>2023-05-11T14:11:08Z</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2023-02-26T22:10:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c53cd8dbde98d4a6c51428bcb6f413f18d83cf4e'/>
<id>urn:sha1:c53cd8dbde98d4a6c51428bcb6f413f18d83cf4e</id>
<content type='text'>
[ Upstream commit b7ed9fa2cb76ca7a3c3cd4a6d35748fe1fbda9f6 ]

rtw_pwr_seq_parser() calls rtw_sub_pwr_seq_parser() which can either
return -EBUSY, -EINVAL or 0. Propagate the original error code instead
of unconditionally returning -EBUSY in case of an error.

Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.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/20230226221004.138331-2-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice</title>
<updated>2023-03-10T08:29:43Z</updated>
<author>
<name>Ping-Ke Shih</name>
<email>pkshih@realtek.com</email>
</author>
<published>2023-02-16T05:36:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=976fe246a57db503d2a0841c8cb813f2f66b78af'/>
<id>urn:sha1:976fe246a57db503d2a0841c8cb813f2f66b78af</id>
<content type='text'>
commit 4a267bc5ea8f159b614d0549030216d0434eccca upstream.

Use power state to decide whether we can enter or leave IPS accurately,
and then prevent to power on/off twice.

The commit 6bf3a083407b ("wifi: rtw88: add flag check before enter or leave IPS")
would like to prevent this as well, but it still can't entirely handle all
cases. The exception is that WiFi gets connected and does suspend/resume,
it will power on twice and cause it failed to power on after resuming,
like:

  rtw_8723de 0000:03:00.0: failed to poll offset=0x6 mask=0x2 value=0x2
  rtw_8723de 0000:03:00.0: mac power on failed
  rtw_8723de 0000:03:00.0: failed to power on mac
  rtw_8723de 0000:03:00.0: leave idle state failed
  rtw_8723de 0000:03:00.0: failed to leave ips state
  rtw_8723de 0000:03:00.0: failed to leave idle state
  rtw_8723de 0000:03:00.0: failed to send h2c command

To fix this, introduce new flag RTW_FLAG_POWERON to reflect power state,
and call rtw_mac_pre_system_cfg() to configure registers properly between
power-off/-on.

Reported-by: Paul Gover &lt;pmw.gover@yahoo.co.uk&gt;
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217016
Fixes: 6bf3a083407b ("wifi: rtw88: add flag check before enter or leave IPS")
Cc: &lt;Stable@vger.kernel.org&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/20230216053633.20366-1-pkshih@realtek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wifi: rtw88: Add common USB chip support</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:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a82dfd33d1237f6c0fb8a7077022189d1fc7ec98'/>
<id>urn:sha1:a82dfd33d1237f6c0fb8a7077022189d1fc7ec98</id>
<content type='text'>
Add the common bits and pieces to add USB support to the RTW88 driver.
This is based on https://github.com/ulli-kroll/rtw88-usb.git which
itself is first written by Neo Jou.

Signed-off-by: neo_jou &lt;neo_jou@realtek.com&gt;
Signed-off-by: Hans Ulli Kroll &lt;linux@ulli-kroll.de&gt;
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-8-s.hauer@pengutronix.de
</content>
</entry>
<entry>
<title>wifi: rtw88: 8821c: enable BT device recovery mechanism</title>
<updated>2022-12-01T11:03:27Z</updated>
<author>
<name>Ping-Ke Shih</name>
<email>pkshih@realtek.com</email>
</author>
<published>2022-11-28T07:56:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7c57d3dc43812653726902aae95ac9b36aa7e3ec'/>
<id>urn:sha1:7c57d3dc43812653726902aae95ac9b36aa7e3ec</id>
<content type='text'>
8821ce is a combo card, and BT is a USB device that could get card lost
during stress test, and need WiFi firmware to detect and recover it, so
driver sends a H2C to enable this mechanism.

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/20221128075653.5221-1-pkshih@realtek.com
</content>
</entry>
<entry>
<title>wifi: rtw88: access chip_info by const pointer</title>
<updated>2022-08-09T05:48:59Z</updated>
<author>
<name>Ping-Ke Shih</name>
<email>pkshih@realtek.com</email>
</author>
<published>2022-07-27T06:52:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dcbf179cbc18f66976740d28fbcfab75be514d16'/>
<id>urn:sha1:dcbf179cbc18f66976740d28fbcfab75be514d16</id>
<content type='text'>
Since chip_info has became const table, we must access them via const
pointer to avoid invalid writing.

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/20220727065232.28510-1-pkshih@realtek.com
</content>
</entry>
<entry>
<title>rtw88: use the correct bit in the REG_HCI_OPT_CTRL register</title>
<updated>2022-04-27T04:58:00Z</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@kevlo.org</email>
</author>
<published>2022-04-22T14:50:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fc6234d7e2e322e84ed3c5c6c05a54f611faa9ab'/>
<id>urn:sha1:fc6234d7e2e322e84ed3c5c6c05a54f611faa9ab</id>
<content type='text'>
Write the BIT_USB_SUS_DIS bit rather than BIT_BT_DIG_CLK_EN to the
REG_HCI_OPT_CTRL register for fixing failure to PCIe power on.

Signed-off-by: Kevin Lo &lt;kevlo@kevlo.org&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/YmLAzuyPr0P4Y6BP@ns.kevlo.org
</content>
</entry>
<entry>
<title>rtw88: 8822c: support FW crash dump when FW crash</title>
<updated>2021-03-15T08:27:13Z</updated>
<author>
<name>Zong-Zhe Yang</name>
<email>kevin_yang@realtek.com</email>
</author>
<published>2021-03-09T06:01:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=13ce240a932fe9c809ec6e79ffc5a4d4ecf534ee'/>
<id>urn:sha1:13ce240a932fe9c809ec6e79ffc5a4d4ecf534ee</id>
<content type='text'>
Although FW crash logs are already supported for dumping in driver, the
logs may not be sufficient to analyze field issues. To improve this part,
we add a support to dump FW memory.

When driver receives FW crash notifications, driver uses DDMA, which is a
HW ability, to copy specified FW memory to FW fifo. Driver can then dump
these information from FW fifo. With this support, not only FW crash log
but also specified FW memory will be dumped while FW crash. Besides,
specified registers are also dumped.

This feature is implemeted on 8822C first due to difference of FW layouts
between ICs. In addition, we add a debugfs to trigger FW crash. It can
simulate the process of crash, dump and reset. Through it, we can also
check if a reset is ongoing.

Signed-off-by: Zong-Zhe Yang &lt;kevin_yang@realtek.com&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210309060121.9099-1-pkshih@realtek.com
</content>
</entry>
<entry>
<title>rtw88: use read_poll_timeout_atomic() for poll loop</title>
<updated>2020-08-27T10:04:38Z</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2020-08-21T23:57:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=86fbf26491941352799822c8c324f5c9d8101e62'/>
<id>urn:sha1:86fbf26491941352799822c8c324f5c9d8101e62</id>
<content type='text'>
This gives the added bonus of not wasting an extra udelay() if we're
timing out -- we double-check the register state one last time before
returning.

Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200821235733.1785009-1-briannorris@chromium.org
</content>
</entry>
<entry>
<title>rtw88: extract: export symbols used in chip functionalities</title>
<updated>2020-05-18T12:16:15Z</updated>
<author>
<name>Zong-Zhe Yang</name>
<email>kevin_yang@realtek.com</email>
</author>
<published>2020-05-15T05:23:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=449be86670f50284069cb0ddc4fe98f064ac6d87'/>
<id>urn:sha1:449be86670f50284069cb0ddc4fe98f064ac6d87</id>
<content type='text'>
In the current design, various chip functions and tables
are built into rtw88 core. That causes kernel to load its
functionalities even if a chip isn't currently used. We
plan to make each chip's functionalities a separate
kernel module to reduce rtw88 core. And kernel will be
able to load the necessary.

Before extracting chip functionalities, we export symbols
inside rtw88 core which will be used in chip modules.

Signed-off-by: Zong-Zhe Yang &lt;kevin_yang@realtek.com&gt;
Signed-off-by: Yan-Hsuan Chuang &lt;yhchuang@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200515052327.31874-2-yhchuang@realtek.com
</content>
</entry>
</feed>
