<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/wireless/realtek/rtlwifi/rtl8192ee, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>wifi: rtlwifi: Use min()/max() to improve code</title>
<updated>2025-07-18T06:41:06+00:00</updated>
<author>
<name>Qianfeng Rong</name>
<email>rongqianfeng@vivo.com</email>
</author>
<published>2025-07-15T12:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94cd0ba1842ece06acc15bba5f2bff6b6043eb1d'/>
<id>94cd0ba1842ece06acc15bba5f2bff6b6043eb1d</id>
<content type='text'>
Use min()/max() to reduce the code and improve its readability.

Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Qianfeng Rong &lt;rongqianfeng@vivo.com&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250715121721.266713-8-rongqianfeng@vivo.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use min()/max() to reduce the code and improve its readability.

Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Qianfeng Rong &lt;rongqianfeng@vivo.com&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250715121721.266713-8-rongqianfeng@vivo.com
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: avoid stack size warning for _read_eeprom_info</title>
<updated>2025-06-16T03:45:49+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2025-06-10T09:22:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2baacfe833460fee2f54b2c7270d632c98052cdc'/>
<id>2baacfe833460fee2f54b2c7270d632c98052cdc</id>
<content type='text'>
txpower_info_{2g,5g} are too big to fit on the stack, but in most of the
rtlwifi variants this stays below the warning limit for stack frames.
In rtl8192ee and a few others, I see a case where clang decides to fully
inline this into rtl92ee_read_eeprom_info, triggering this warning:

drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c:2178:6: error: stack frame size (1312) exceeds limit (1280) in 'rtl92ee_read_eeprom_info' [-Werror,-Wframe-larger-than]

Mark _rtl92ee_read_txpower_info_from_hwpg() as noinline_for_stack to
and mark _rtl92ee_get_chnl_group() as __always_inline to make clang
behave the same way as gcc. Inlining _rtl92ee_get_chnl_group helps
let the compiler see that the index is always in range. The same
change appears to be necessary in all rtlwifi variants.

A more thorough approach would be to avoid the use of the two structures
on the stack entirely and combine them with the struct rtl_efuse
data that is dynamically allocated and holds the same information.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250610092240.2639751-1-arnd@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
txpower_info_{2g,5g} are too big to fit on the stack, but in most of the
rtlwifi variants this stays below the warning limit for stack frames.
In rtl8192ee and a few others, I see a case where clang decides to fully
inline this into rtl92ee_read_eeprom_info, triggering this warning:

drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c:2178:6: error: stack frame size (1312) exceeds limit (1280) in 'rtl92ee_read_eeprom_info' [-Werror,-Wframe-larger-than]

Mark _rtl92ee_read_txpower_info_from_hwpg() as noinline_for_stack to
and mark _rtl92ee_get_chnl_group() as __always_inline to make clang
behave the same way as gcc. Inlining _rtl92ee_get_chnl_group helps
let the compiler see that the index is always in range. The same
change appears to be necessary in all rtlwifi variants.

A more thorough approach would be to avoid the use of the two structures
on the stack entirely and combine them with the struct rtl_efuse
data that is dynamically allocated and holds the same information.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250610092240.2639751-1-arnd@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: Constify struct rtl_hal_ops and rtl_hal_cfg</title>
<updated>2025-06-10T01:12:16+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2025-05-17T16:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4c95423b6f01a50505308d2eaec2da2a2bcd3139'/>
<id>4c95423b6f01a50505308d2eaec2da2a2bcd3139</id>
<content type='text'>
'struct rtl_hal_ops' and 'struct rtl_hal_cfg' are not modified in these
drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.

Constification of rtl_hal_cfg is only needed in rtl8192cu/sw.c

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  10167	   5512	    128	  15807	   3dbf	drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  10743	   4936	    128	  15807	   3dbf	drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/2c3f3d8d8b2f7dcb8cc64cebe89e55720d1d733d.1747500351.git.christophe.jaillet@wanadoo.fr
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'struct rtl_hal_ops' and 'struct rtl_hal_cfg' are not modified in these
drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.

Constification of rtl_hal_cfg is only needed in rtl8192cu/sw.c

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  10167	   5512	    128	  15807	   3dbf	drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  10743	   4936	    128	  15807	   3dbf	drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/2c3f3d8d8b2f7dcb8cc64cebe89e55720d1d733d.1747500351.git.christophe.jaillet@wanadoo.fr
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: Remove uncalled stub rtl*_phy_ap_calibrate</title>
<updated>2025-05-05T01:20:00+00:00</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2025-04-25T23:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d867b18eb934f691bec0e2ea0139c30ee0696ce'/>
<id>2d867b18eb934f691bec0e2ea0139c30ee0696ce</id>
<content type='text'>
  rtl92d_phy_ap_calibrate(),
  rtl92du_phy_ap_calibrate(),
  rtl92ee_phy_ap_calibrate(), and
  rtl8821ae_phy_ap_calibrate()

are all empty function stubs that are never called anywhere.

Remove them.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250425235340.288340-3-linux@treblig.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  rtl92d_phy_ap_calibrate(),
  rtl92du_phy_ap_calibrate(),
  rtl92ee_phy_ap_calibrate(), and
  rtl8821ae_phy_ap_calibrate()

are all empty function stubs that are never called anywhere.

Remove them.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250425235340.288340-3-linux@treblig.org
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: fix default typo</title>
<updated>2024-07-05T01:59:46+00:00</updated>
<author>
<name>Fredrik Lönnegren</name>
<email>fredrik@frelon.se</email>
</author>
<published>2024-07-03T07:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a1e7eafd12c415a6ac2a65d8ddf32569acd1ecf0'/>
<id>a1e7eafd12c415a6ac2a65d8ddf32569acd1ecf0</id>
<content type='text'>
Change 'defult' to 'default' in comments in several rtlwifi drivers.

Signed-off-by: Fredrik Lönnegren &lt;fredrik@frelon.se&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20240703070627.135328-1-fredrik@frelon.se
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change 'defult' to 'default' in comments in several rtlwifi drivers.

Signed-off-by: Fredrik Lönnegren &lt;fredrik@frelon.se&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20240703070627.135328-1-fredrik@frelon.se
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: rtl8192ee: using calculate_bit_shift()</title>
<updated>2023-12-21T14:40:17+00:00</updated>
<author>
<name>Su Hui</name>
<email>suhui@nfschina.com</email>
</author>
<published>2023-12-19T06:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=63526897fc0d086069bcab67c3a112caaec751cb'/>
<id>63526897fc0d086069bcab67c3a112caaec751cb</id>
<content type='text'>
Using calculate_bit_shift() to replace _rtl92ee_phy_calculate_bit_shift().
And fix the undefined bitwise shift behavior problem.

Fixes: b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree")
Signed-off-by: Su Hui &lt;suhui@nfschina.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20231219065739.1895666-9-suhui@nfschina.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using calculate_bit_shift() to replace _rtl92ee_phy_calculate_bit_shift().
And fix the undefined bitwise shift behavior problem.

Fixes: b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree")
Signed-off-by: Su Hui &lt;suhui@nfschina.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20231219065739.1895666-9-suhui@nfschina.com
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: drop unused const_amdpci_aspm</title>
<updated>2023-11-22T15:50:36+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2023-11-16T18:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f60df12aaaddc865a38480a48e8dba756dffb2b2'/>
<id>f60df12aaaddc865a38480a48e8dba756dffb2b2</id>
<content type='text'>
Remove the unused "const_amdpci_aspm" member of struct rtl_pci and
struct rtl_ps_ctl.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20231116180529.52752-1-helgaas@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the unused "const_amdpci_aspm" member of struct rtl_pci and
struct rtl_ps_ctl.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20231116180529.52752-1-helgaas@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: rtl92ee_dm_dynamic_primary_cca_check(): fix typo in function name</title>
<updated>2023-10-30T17:21:22+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2023-10-23T09:17:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7419d8ab35087ba2164e92e8c9f1e418bc303a06'/>
<id>7419d8ab35087ba2164e92e8c9f1e418bc303a06</id>
<content type='text'>
For rtl8192ee, change 'rtl92ee_dm_dynamic_primary_cca_ckeck()'
to 'rtl92ee_dm_dynamic_primary_cca_check()' and so adjust
'rtl92ee_dm_watchdog()' as well. 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://lore.kernel.org/r/20231023091722.52509-3-dmantipov@yandex.ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For rtl8192ee, change 'rtl92ee_dm_dynamic_primary_cca_ckeck()'
to 'rtl92ee_dm_dynamic_primary_cca_check()' and so adjust
'rtl92ee_dm_watchdog()' as well. 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://lore.kernel.org/r/20231023091722.52509-3-dmantipov@yandex.ru
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: cleanup struct rtl_hal</title>
<updated>2023-10-30T17:21:22+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2023-10-23T09:17:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d1e6b020c32d2c02c427ab2494a7f04da45fe614'/>
<id>d1e6b020c32d2c02c427ab2494a7f04da45fe614</id>
<content type='text'>
Remove unused and set but otherwise unused 'bbrf_ready', 'external_pa',
'pa_mode', 'rx_tag', 'rts_en', 'wow_enable' and 'wow_enabled' fields
of 'struct rtl_hal', adjust related code. 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://lore.kernel.org/r/20231023091722.52509-1-dmantipov@yandex.ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unused and set but otherwise unused 'bbrf_ready', 'external_pa',
'pa_mode', 'rx_tag', 'rts_en', 'wow_enable' and 'wow_enabled' fields
of 'struct rtl_hal', adjust related code. 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://lore.kernel.org/r/20231023091722.52509-1-dmantipov@yandex.ru
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: drop pre_fill_tx_bd_desc() from HAL interface</title>
<updated>2023-10-19T07:29:44+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2023-10-16T13:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc83ee9d587ffe8e7edd00c32d443c7b5ebbf1c5'/>
<id>fc83ee9d587ffe8e7edd00c32d443c7b5ebbf1c5</id>
<content type='text'>
Since 'pre_fill_tx_bd_desc()' is actually used for rtl8192ee only,
there is no need to maintain function pointer in 'struct rtl_hal_ops',
and 'rtl92ee_pre_fill_tx_bd_desc()' may be converted to static.
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://lore.kernel.org/r/20231016135925.129223-1-dmantipov@yandex.ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since 'pre_fill_tx_bd_desc()' is actually used for rtl8192ee only,
there is no need to maintain function pointer in 'struct rtl_hal_ops',
and 'rtl92ee_pre_fill_tx_bd_desc()' may be converted to static.
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://lore.kernel.org/r/20231016135925.129223-1-dmantipov@yandex.ru
</pre>
</div>
</content>
</entry>
</feed>
