Commit graph

1,462,253 commits

Author SHA1 Message Date
Alonso Garrigues
8e1ecbb25a staging: rtl8723bs: Add braces to if statement in rtl8723bs_cmd.c
Add braces so all blocks in an if else statement are consistent as per
kernel coding style.

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260630163316.1128319-7-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:32:22 +02:00
Alonso Garrigues
59a3adf8e1 staging: rtl8723bs: remove unnecessary parentheses in rtl8723b_cmd.c
Remove unnecessary parentheses around address-of structure members.

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260630163316.1128319-6-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:32:21 +02:00
Alonso Garrigues
ae75b7b210 staging: rtl8723bs: remove dead code in rtl8723b_cmd.c
Remove commented-out old code to help readability.

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260630163316.1128319-5-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:31:54 +02:00
Alonso Garrigues
44fa5f75d1 staging: rtl8723bs: fix lines ending in '(' in rtl8723b_cmd.c
Align parameters in function calls and definitions with the
opening parentheses to conform to the coding style.

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260630163316.1128319-4-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:31:54 +02:00
Alonso Garrigues
f8597b72ad staging: rtl8723bs: correct binary operator style in rtl8723bs_cmd.c
Add spaces around binary operators to improve readability.

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260630163316.1128319-3-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:31:54 +02:00
Alonso Garrigues
1dab32f0a0 staging: rtl8723bs: remove dead code block in rtl8723bs_cmd.c
Remove commented-out dead code block for readability.

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260630163316.1128319-2-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:31:54 +02:00
Aditya Tipre
b816d48cc0 staging: rtl8723bs: rename shadowed variable
The inner variable ie in update_bcn_erpinfo_ie() shadows an outer local
variable of the same name. This triggers a -Wshadow warning.

Rename the inner variable to erp_ie to remove the warning
and make the code less ambiguous.

No functional change.

Signed-off-by: Aditya Tipre <tipreaditya@gmail.com>
Link: https://patch.msgid.link/20260625151606.96229-1-tipreaditya@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:30:00 +02:00
Serhat Kumral
8547b31145 staging: rtl8723bs: put logical continuation on previous line
Move the logical operator '&&' to the previous line in os_intfs.c
to conform to the Linux kernel coding style guidelines.
This fixes the checkpatch.pl warning:
CHECK: Logical continuations should be on the previous line

Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260623100535.5752-2-serhatkumral1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:28:51 +02:00
Serhat Kumral
61a9eb1cd1 staging: rtl8723bs: remove multiple blank lines
Remove multiple blank lines in os_intfs.c to conform to the
Linux kernel coding style guidelines.
This fixes the checkpatch.pl warnings:
CHECK: Please don't use multiple blank lines

Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
Link: https://patch.msgid.link/20260623100535.5752-1-serhatkumral1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:28:51 +02:00
Serhat Kumral
f35a327e90 staging: rtl8723bs: simplify rtw_spt_band_alloc
The function only supports NL80211_BAND_2GHZ and falls through to
exit for any other band. Replace the n_channels and n_bitrates local
variables with the compile-time constants RTW_2G_CHANNELS_NUM and
RTW_G_RATES_NUM directly.

Use simple addition in kzalloc() instead of chained size_add() calls,
since the sizes are derived from compile-time constants and cannot
overflow. Replace the intermediate alloc_sz variable accordingly.

Remove the redundant second band check before the init calls, as
the early exit at the top of the function guarantees that only the
2GHz case can reach that point.

No functional change intended.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>

Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260622160947.7970-1-serhatkumral1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:26:27 +02:00
Moksh Panicker
f1bd1bc61d staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in os_intfs.c
Replace bare use of 'uint' with 'unsigned int' for the status variable
in rtw_drv_init(). The module_param() uses of 'uint' are intentional
and left unchanged. This fixes the following checkpatch.pl warning:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
Link: https://patch.msgid.link/20260622064129.10261-4-mokshpanicker.7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:25:40 +02:00
Moksh Panicker
8981e9395b staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in xmit_linux.c
Replace bare use of 'uint' with 'unsigned int' in rtw_remainder_len()
function definition and its declaration in xmit_osdep.h. This fixes
the following checkpatch.pl warning:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
Link: https://patch.msgid.link/20260622064129.10261-3-mokshpanicker.7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:25:40 +02:00
Moksh Panicker
984cb19c8e staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in ioctl_cfg80211.c
Replace bare use of 'uint' with 'unsigned int' in function parameters
and local variables in ioctl_cfg80211.c and its corresponding header
ioctl_cfg80211.h. This fixes the following checkpatch.pl warning:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
Link: https://patch.msgid.link/20260622064129.10261-2-mokshpanicker.7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:25:39 +02:00
Nikolay Kulikov
b4756c7ba3 staging: rtl8723bs: remove local variable 'eRFPath'
After removing the loop from the phy_RF6052_Config_ParaFile() function,
the value of this variable can no longer be changed, allowing all
switch-case statements to be known in advance, since it stores the value
0 (which is 'RF_PATH_A', defined in enum rf_path).

Therefore, remove it and the associated dead code and access 'RF_PATH_A'
directly.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260621161611.111461-3-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:25:19 +02:00
Nikolay Kulikov
7958aaa91b staging: rtl8723bs: remove 'NumTotalRFPath' from 'struct hal_com_data'
This variable is assigned the value 1, after which it is used as a loop
delimiter. Since it always stores 1, only one loop iteration is
performed. We can remove the 'NumTotalRFPath' field and remove the loop
by calling its body directly to simplify the code.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260621161611.111461-2-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:25:19 +02:00
Dalvin-Ehinoma Noah Aiguobas
d9ada4b946 staging: rtl8723bs: fix Alignment should match open parenthesis in rtw_mlme.c
Align continuation lines which weren't properly aligned.

Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com>
Link: https://patch.msgid.link/ajbQ4m5HAaL2yflQ@koolguy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:24:06 +02:00
Serhat Kumral
cab8a73970 staging: rtl8723bs: rename ScanType to scan_type
Rename the CamelCase field ScanType of struct rt_channel_info, as
well as the relevant local variables, to scan_type to conform to
the Linux kernel coding style guidelines.
This also fixes several checkpatch.pl warnings:
CHECK: Avoid CamelCase: <ScanType>

Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
Link: https://patch.msgid.link/20260616000117.126504-2-serhatkumral1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:21:42 +02:00
Serhat Kumral
0c7e130c4f staging: rtl8723bs: rename ChannelNum to channel_num
Rename the CamelCase field ChannelNum of struct rt_channel_info to
channel_num to conform to the Linux kernel coding style guidelines.
This also fixes several checkpatch.pl warnings:
CHECK: Avoid CamelCase: <ChannelNum>

Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
Link: https://patch.msgid.link/20260616000117.126504-1-serhatkumral1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:21:42 +02:00
Alonso Garrigues
4037678b48 staging: rtl8723bs: remove unnecessary braces in hal_intf.c
Single statement blocks do not need braces
if and else blocks should have consistent bracing

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260619191021.2205395-1-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:21:36 +02:00
Devansh Soni
51b554f1a7 staging: rtl8723bs: fix missing unregister_netdev on sdio_alloc_irq failure
In rtw_drv_init(), if rtw_drv_register_netdev() succeeds but
sdio_alloc_irq() fails, the error path jumps to free_if1 and calls
rtw_sdio_if1_deinit(). However, rtw_sdio_if1_deinit() calls
rtw_free_netdev() without a preceding unregister_netdev(), freeing a
still-registered netdev but leaving stale sysfs entries behind.

Signed-off-by: Devansh Soni <devanshsoni874@gmail.com>
Link: https://patch.msgid.link/20260619125724.12458-1-devanshsoni874@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:21:30 +02:00
Alonso Garrigues
36a380409d staging: rtl8723bs: remove unnecessary braces in rtw_set_oper_ch
Single statement if block does not need braces.

Signed-off-by: Alonso Garrigues <agarrigues@riseup.net>
Link: https://patch.msgid.link/20260619105327.1877129-1-agarrigues@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:21:17 +02:00
Devansh Soni
a9a79ae0b2 staging: rtl8723bs: remove redundant rsp_allocated_buf
The original code allocated extra memory and manually aligned the
rsp_buf pointer to a 4-byte boundary, however kzalloc() guarantees a
minimum of 8-byte alignment so this was unnecessary.

Also, because the pointer was shifted, the original pointer had to be
stored in rsp_allocated_buf just so it could be passed to kfree() later.

Remove the redundant alignment math, remove the extra 4 bytes of padding
from kzalloc() call, and assign memory directly to rsp_buf.

This allows us to remove the rsp_allocated_buf variable from cmd_priv
struct.

Suggested-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Devansh Soni <devanshsoni874@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260617123853.63022-1-devanshsoni874@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:20:49 +02:00
Subhrojyoti Bala
b1dfea3cf9 staging: rtl8723bs: Fix comment style issues in header files
Fix various comment style issues in wlan_bssdef.h and rtw_mlme.h
to comply with kernel coding style:

- Use proper multi-line comment format with trailing */ on its
  own line
- Remove extra spaces after /* in single-line comments

No functional change.

Signed-off-by: Subhrojyoti Bala <subhrojyoti0609@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260617064150.16078-3-subhrojyoti0609@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:20:37 +02:00
Subhrojyoti Bala
fd28063547 staging: rtl8723bs: Fix indentation in enum in rtw_mlme.h
Enum members were missing tab indentation. Add proper tab
indent to align with kernel coding style.

No functional change.

Signed-off-by: Subhrojyoti Bala <subhrojyoti0609@gmail.com>
Link: https://patch.msgid.link/20260617064150.16078-2-subhrojyoti0609@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:20:37 +02:00
Moksh Panicker
f37bdc4b80 staging: rtl8723bs: Fix missing spaces around operators
Add missing spaces around arithmetic and bitwise operators ('+', '-',
'&') in the rtl8723bs staging driver across multiple files. These were
flagged by checkpatch.pl with:

CHECK: spaces preferred around that 'X' (ctx:VxV)

Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260615082538.12007-1-mokshpanicker.7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:20:27 +02:00
Ethan Nelson-Moore
026f0a26cc staging: rtl8723bs: remove references to nonexistent CONFIG_IOCTL_CFG80211 option
Comments in the rtl8723bs driver contain references to
CONFIG_IOCTL_CFG80211, which does not exist in the kernel. Remove these
references.

Discovered while searching for CONFIG_* symbols referenced in code but
not defined in any Kconfig file.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260613231514.145336-1-enelsonmoore@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:20:00 +02:00
Ethan Nelson-Moore
e4ec2bf1a1 staging: rtl8723bs: remove reference to nonexistent CONFIG_SDIO_HCI option
A comment in the rtl8723bs driver contains a reference to
CONFIG_SDIO_HCI, which does not exist in the kernel. Remove it.

Discovered while searching for CONFIG_* symbols referenced in code but
not defined in any Kconfig file.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260613183055.10425-1-enelsonmoore@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:19:56 +02:00
Quentin Strydom
b13bca07cb staging: rtl8723bs: hal: fix space-before-tab warnings in rtl8723bs_recv.c
Remove spaces before tabs in comments to match kernel coding style.

Signed-off-by: Quentin Strydom <qstrydom0@gmail.com>
Link: https://patch.msgid.link/20260612102834.39935-7-qstrydom0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:19:25 +02:00
Quentin Strydom
19748ce948 staging: rtl8723bs: hal: fix space-before-tab warnings in rtl8723b_hal_init.c
Remove spaces before tabs in comments to match kernel coding style.

Signed-off-by: Quentin Strydom <qstrydom0@gmail.com>
Link: https://patch.msgid.link/20260612102834.39935-6-qstrydom0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:19:25 +02:00
Quentin Strydom
ccce4835a7 staging: rtl8723bs: hal: fix space-before-tab warnings in HalPhyRf_8723B.c
Remove spaces before tabs in comments to match kernel coding style.

Signed-off-by: Quentin Strydom <qstrydom0@gmail.com>
Link: https://patch.msgid.link/20260612102834.39935-4-qstrydom0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:19:19 +02:00
Quentin Strydom
e00320ea0f staging: rtl8723bs: hal: fix space-before-tab warnings in hal_com.c
Remove spaces before tabs in comments to match kernel coding style.

Signed-off-by: Quentin Strydom <qstrydom0@gmail.com>
Link: https://patch.msgid.link/20260612102834.39935-3-qstrydom0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:19:19 +02:00
Quentin Strydom
0b99d5d4b9 staging: rtl8723bs: hal: fix space-before-tab warnings in hal_btcoex.c
Remove spaces before tabs in comments to match kernel coding style.

Signed-off-by: Quentin Strydom <qstrydom0@gmail.com>
Link: https://patch.msgid.link/20260612102834.39935-2-qstrydom0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:19:19 +02:00
Quentin Strydom
f55f09373d staging: rtl8723bs: hal: fix space-before-tab warnings in HalBtc8723b2Ant.c
Remove spaces before tabs in comments to match kernel coding style.

Signed-off-by: Quentin Strydom <qstrydom0@gmail.com>
Link: https://patch.msgid.link/20260612102834.39935-1-qstrydom0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:19:19 +02:00
Chen-Yu Yeh
19e7c3b8ea staging: rtl8723bs: remove unused channel format/arg macros
CHAN_FMT and CHAN_ARG are defined but never used anywhere in
the driver. Most of their content is commented-out dead code.
Remove them.

This also fixes a checkpatch error:
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com>
Link: https://patch.msgid.link/20260611081644.1553264-1-chenyou910331@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:18:46 +02:00
Chen-Yu Yeh
5b45c750b0 staging: rtl8723bs: remove unused netdev format/arg macros
NDEV_ARG, FUNC_NDEV_FMT and FUNC_NDEV_ARG are defined but never
used anywhere in the driver. Remove them.

This also fixes a checkpatch error:
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com>
Link: https://patch.msgid.link/20260611074613.1550984-1-chenyou910331@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:18:43 +02:00
Ethan Nelson-Moore
2b75f87dee staging: rtl8723bs: remove references to nonexistent CONFIG_IEEE80211W option
Comments in the rtl8723bs driver contain many references to
CONFIG_IEEE80211W, which does not exist in the kernel (though it does
exist in wpa_supplicant, where this code was likely also used). Remove
them.

Discovered while searching for CONFIG_* symbols referenced in code but
not defined in any Kconfig file.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260611014430.437534-1-enelsonmoore@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:18:25 +02:00
Nikoloz Bakuradze
14d9dad253 staging: rtl8723bs: core: avoid NULL pointer dereference in c2h_wk_callback
kmalloc(16, GFP_ATOMIC) in c2h_wk_callback() could in theory return2
NULL, which would then be dereferenced in rtw_hal_c2h_valid().

A 16-byte allocation effectively cannot fail in practice, but add an
else continue; to the guard so the failure path exits the iteration
cleanly to make the code more robust.

Signed-off-by: Nikoloz Bakuradze <nbakuradze28@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20260610164755.49626-1-nbakuradze28@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:17:35 +02:00
Uwe Kleine-König
d83a1151eb staging: rtl8723bs: Drop unused parameter from rtw_sdio_if1_init()
The function doesn't use the pdid parameter, so drop that and adapt the
only caller accordingly.

Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Link: https://patch.msgid.link/23949de4c5f10e78a4bd85e333d7acd47b2f66b7.1781109707.git.ukleinek@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:17:24 +02:00
Andrea Frasson
1c9e892a3a staging: rtl8723: remove multiple blank lines in rtw_security.c
Remove unnecessary multiple blank lines.

Fix 5 checkpatch.pl checks in rtw_security.c of the type:
- CHECK: Please don't use multiple blank lines

Signed-off-by: Andrea Frasson <andreafrasson1995@gmail.com>
Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>
Link: https://patch.msgid.link/aiRL4dekV140SPGw@frassi
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:17:16 +02:00
Dalvin-Ehinoma Noah Aiguobas
b2a8923dc2 staging: rtl8723bs: add braces to resolve checkpatch
Resolved checkpatch finding by adding braces as shown in styleguide.

Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com>
Link: https://patch.msgid.link/aiG4aDh2czwJ2-bf@koolguy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:17:07 +02:00
Eugene Mavick
6e68c64a71 staging: rtl8723bs: remove unnecessary parentheses
Remove unnecessary parantheses around &(foo->bar) type statements to
improve code readability

Signed-off-by: Eugene Mavick <m@mavick.dev>
Link: https://patch.msgid.link/20260604095617.852425-1-m@mavick.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:16:58 +02:00
Cong Nguyen
df8ec79e1e staging: rtl8723bs: remove unused network_type_in_use field
The network_type_in_use member of struct wlan_bssid_ex is write-only:
nothing in the driver ever reads it. It is assigned in three places,
none of which feed anything:

  - collect_bss_info() hard-codes it to Ndis802_11OFDM24 for every
    parsed beacon/probe response, regardless of the network's actual
    band or rates (it is even wrong for 5 GHz APs, which the same
    function explicitly handles).
  - rtw_check_beacon_data() and rtw_update_registrypriv_dev_network()
    derive it from the wireless mode via a switch, but the result is
    likewise never consumed.

The live PHY classification the driver actually acts on is kept in
wlan_network.network_type (the WIRELESS_11x value), so this NDIS-era
field is redundant.

struct wlan_bssid_ex is an internal structure passed by pointer through
the driver command queue; it is never serialized to firmware or onto
the air (the wire data lives in ies[]), so dropping a member is
layout-safe as long as the module is rebuilt as a whole.

enum ndis_802_11_network_type existed only to type this field, so
remove it as well. No functional change.

Signed-off-by: Cong Nguyen <congnt264@gmail.com>
Link: https://patch.msgid.link/20260603122806.1330145-1-congnt264@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:16:50 +02:00
Nikolay Kulikov
deec171bb5 staging: rtl8723bs: remove unused 'oui' parameter from update_beacon()
After deleting one of the switch-case branches, this parameter became
unused, so remove it.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260601150253.69930-3-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:01:07 +02:00
Nikolay Kulikov
d56596dda0 staging: rtl8723bs: remove unused case from update_beacon()
The update_beacon() function is never called with 'ie_id' equal to
'WLAN_EID_VENDOR_SPECIFIC', meaning this case branch will never be
called, so remove it and several related functions.

Removing this case branch also fixes a possible null pointer
dereference in update_bcn_vendor_spec() if 'oui' is NULL, since
its value is not checked in any way.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260601150253.69930-2-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:01:06 +02:00
Eugene Mavick
c764096115 staging: rtl8723bs: fix alignment
Fix alignment to improve code readability and clear checkpatch warning:
CHECK: Alignment should match open parenthesis

Signed-off-by: Eugene Mavick <mavick4022@gmail.com>
Link: https://patch.msgid.link/20260601093757.612130-3-mavick4022@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 13:00:38 +02:00
Cong Nguyen
5c632ffb06 staging: rtl8723bs: use nl80211_iftype instead of custom NDIS enum
The driver defined its own enum ndis_802_11_network_infrastructure to
represent the operating mode (STA/AP/IBSS) and translated nl80211 iftypes
into it in cfg80211_rtw_change_iface(). The kernel already provides
enum nl80211_iftype for this purpose, so use it directly and drop the
redundant translation layer.

Map the removed values as follows:
  Ndis802_11IBSS           -> NL80211_IFTYPE_ADHOC
  Ndis802_11Infrastructure -> NL80211_IFTYPE_STATION
  Ndis802_11APMode         -> NL80211_IFTYPE_AP
  Ndis802_11AutoUnknown    -> NL80211_IFTYPE_UNSPECIFIED

Compile-tested only.

Signed-off-by: Cong Nguyen <congnt264@gmail.com>
Link: https://patch.msgid.link/20260707104836.3176765-1-congnt264@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:56:18 +02:00
Dalvin-Ehinoma Noah Aiguobas
72fdea5bb7 staging: rtl8723bs: Rename camelcase variable dot11AuthAlgrthm
Rename variable dot11AuthAlgrthm to dot11_auth_algrthm in
struct security_priv to resolve checkpatch.pl CamelCase finding.

Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com>
Link: https://patch.msgid.link/ahwHbMecWpijQBv9@koolguy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:10 +02:00
Nikolay Kulikov
8235e82830 staging: rtl8723bs: remove unused field 'bAPKThermalMeterIgnore'
This field is set to 'true' once and is never used again. Remove it to
eliminate dead code.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260531080015.74870-1-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:06 +02:00
Praveen Jayaprakash Pattar
8b6650e7df staging: rtl8723bs: hal: Fix space before tab in rtl8723b_dm.c
Remove tab characters that appeared after '/*' in two comment lines,
which caused 'please, no space before tabs' warnings. Replace the
space+tab combination with a single space after the comment opener.

Detected by checkpatch.pl with --strict flag.

Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
Link: https://patch.msgid.link/20260531045511.5774-1-praveen.pattar2022@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:03 +02:00
Praveen Jayaprakash Pattar
2166524364 staging: rtl8723bs: hal: Fix indentation in odm_EdcaTurboCheck.c
Fix incorrect indentation of an if statement inside an else block.
The statement had a space before it instead of proper tab alignment,
causing checkpatch.pl to report 'suspect code indent' and 'statements
should start on a tabstop' warnings.

Detected by checkpatch.pl with --strict flag.

Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
Link: https://patch.msgid.link/20260531040420.5426-1-praveen.pattar2022@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07 12:24:01 +02:00