summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-07-07staging: vme_user: fix location monitor leak in tsi148 bridgeHao-Qun Huang
tsi148_probe() allocates a location monitor resource and links it into tsi148_bridge->lm_resources. The probe error path frees this list, but tsi148_remove() only frees the dma, slave and master resource lists, so the location monitor resource is leaked on device unbind or module unload. Free the lm_resources list in tsi148_remove() as well, before tsi148_bridge is freed. Fixes: d22b8ed9a3b0 ("Staging: vme: add Tundra TSI148 VME-PCI Bridge driver") Cc: stable <stable@kernel.org> Cc: Martyn Welch <martyn@welchs.me.uk> Assisted-by: Claude:claude-fable-5 Signed-off-by: Hao-Qun Huang <alvinhuang0603@gmail.com> Link: https://patch.msgid.link/20260704065817.403111-2-alvinhuang0603@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: vme_user: fix location monitor leak in fake bridgeHao-Qun Huang
fake_init() allocates a location monitor resource and links it into fake_bridge->lm_resources. The init error path frees this list, but fake_exit() only frees the slave and master resource lists. Loading and unloading the module therefore triggers a kmemleak warning: unreferenced object 0xffff8b8b82aebe40 (size 64): comm "init", pid 1, jiffies 4294894572 backtrace (crc c1e013ef): kmemleak_alloc+0x4e/0x90 __kmalloc_cache_noprof+0x338/0x430 0xffffffffc0602246 do_one_initcall+0x4f/0x320 do_init_module+0x68/0x270 load_module+0x2a3b/0x2d90 Free the lm_resources list in fake_exit() as well, before fake_bridge is freed. Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver") Cc: stable <stable@kernel.org> Cc: Martyn Welch <martyn@welchs.me.uk> Assisted-by: Claude:claude-fable-5 Signed-off-by: Hao-Qun Huang <alvinhuang0603@gmail.com> Link: https://patch.msgid.link/20260704065817.403111-1-alvinhuang0603@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: vme_user: bound slave read/write to the kern_buf sizeMichael Tautschnig
The SLAVE-path helpers buffer_to_user() and buffer_from_user() copy 'count' bytes into/out of the fixed-size kern_buf (size_buf == PCI_BUF_SIZE == 0x20000, 128 KiB) using *ppos as the offset, without bounding *ppos + count against size_buf. vme_user_write()/vme_user_read() only clamp count to the VME window size (image_size = vme_get_size(resource)), which VME_SET_SLAVE sets from the user-supplied slave.size -- validated against the VME address space (up to VME_A32_MAX = 4 GiB), not against PCI_BUF_SIZE. When the window exceeds 128 KiB, a write()/read() copies past the kern_buf allocation. Clamp count against size_buf in both helpers, with an early return when *ppos is already at/after the buffer end. *ppos is >= 0 here (the caller rejects negative offsets), so size_buf - *ppos cannot wrap. This mirrors the existing clamp in the MASTER-path helpers resource_to_user() / resource_from_user(), and matches the read()/write() convention of a short transfer at end-of-buffer. Found by static analysis (CodeQL taint tracking + CBMC bounded model checking) and confirmed dynamically under KASAN with the vme_fake bridge: BUG: KASAN: slab-out-of-bounds in _copy_from_user+0x2d/0x80 Write of size 262144 at addr ffff888004100000 by task trigger/68 _copy_from_user+0x2d/0x80 vme_user_write+0x13e/0x240 [vme_user] vfs_write+0x1b8/0x7a0 ksys_write+0xb8/0x150 Fixes: f00a86d98a1e ("Staging: vme: add VME userspace driver") Cc: stable <stable@kernel.org> Signed-off-by: Michael Tautschnig <tautschn@amazon.com> Link: https://patch.msgid.link/20260618114709.72499-1-tautschn@amazon.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: don't drop short TX frames in _rtw_pktfile_read()Christopher Mackle
Commit bc4df274dca6 ("staging: rtl8723bs: update _rtw_pktfile_read() to return error codes") changed _rtw_pktfile_read() to fail when the caller asks for more bytes than remain in the packet: if (rtw_remainder_len(pfile) < rlen) return -EINVAL; That breaks the assumption made by the data TX path. In rtw_xmitframe_coalesce() (core/rtw_xmit.c) the per-fragment copy is issued with the full fragment length, mpdu_len, which is derived from pxmitpriv->frag_len (~2300 bytes), and the code relies on the historical behaviour of copying only what is left and returning the number of bytes actually copied: mem_sz = _rtw_pktfile_read(&pktfile, pframe, mpdu_len); if (mem_sz < 0) return mem_sz; So for every outbound packet smaller than the fragmentation threshold - i.e. essentially all normal traffic, including the EAPOL frames of the WPA 4-way handshake and DHCP - rlen is larger than the bytes remaining, _rtw_pktfile_read() returns -EINVAL, rtw_xmitframe_coalesce() aborts, and the frame is dropped before it is queued to the hardware. The driver floods the log with: rtl8723bs ...: xmit_xmitframes: coalesce failed with error -22 Management frames (authentication/association) use a different path and still go out, so the interface scans and associates, but no data frame is ever transmitted. The 4-way handshake therefore never completes and wpa_supplicant misreports it as: WPA: 4-Way Handshake failed - pre-shared key may be incorrect AP mode is unaffected. The net effect is that the chip is unusable in station mode on any kernel carrying the offending commit. This was confirmed with a wpa_supplicant -dd trace on an RTL8723BS SDIO adapter (Bay Trail): message 1/4 is received and the PTK is derived, but each "Sending EAPOL-Key 2/4" coincides 1:1 with a "coalesce failed with error -22", so message 2/4 never reaches the AP, which keeps retrying message 1/4 until the handshake times out. Restore the original semantics: clamp the requested length to the bytes remaining in the packet and return that length. The skb_copy_bits() error path is kept, so genuine copy failures are still propagated. Fixes: bc4df274dca6 ("staging: rtl8723bs: update _rtw_pktfile_read() to return error codes") Cc: stable <stable@kernel.org> Tested-by: Christopher Mackle <christophermackle01@gmail.com> Signed-off-by: Christopher Mackle <christophermackle01@gmail.com> Link: https://patch.msgid.link/20260620013916.7148-1-christophermackle01@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: use rS0S1_PathSwitch define instead of 0x948 magic numberPanagiotis Petrakopoulos
Using magic numbers is error prone. The address 0x948 already has a define, rS0S1_PathSwitch, in Hal8192CPhyReg.h. Replace the occurrences of the magic number 0x948 with the rS0S1_PathSwitch define for more clarity and readability. No functional change intended. Signed-off-by: Panagiotis Petrakopoulos <npetrakopoulos2003@gmail.com> Link: https://patch.msgid.link/20260705153243.32484-1-npetrakopoulos2003@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-07staging: rtl8723bs: Add braces to if statement in rtl8723bs_cmd.cAlonso Garrigues
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-07staging: rtl8723bs: remove unnecessary parentheses in rtl8723b_cmd.cAlonso Garrigues
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-07staging: rtl8723bs: remove dead code in rtl8723b_cmd.cAlonso Garrigues
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-07staging: rtl8723bs: fix lines ending in '(' in rtl8723b_cmd.cAlonso Garrigues
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-07staging: rtl8723bs: correct binary operator style in rtl8723bs_cmd.cAlonso Garrigues
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-07staging: rtl8723bs: remove dead code block in rtl8723bs_cmd.cAlonso Garrigues
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-07staging: rtl8723bs: rename shadowed variableAditya Tipre
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-07staging: rtl8723bs: put logical continuation on previous lineSerhat Kumral
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-07staging: rtl8723bs: remove multiple blank linesSerhat Kumral
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-07staging: rtl8723bs: simplify rtw_spt_band_allocSerhat Kumral
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-07staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in os_intfs.cMoksh Panicker
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-07staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in xmit_linux.cMoksh Panicker
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-07staging: rtl8723bs: Replace bare 'uint' with 'unsigned int' in ioctl_cfg80211.cMoksh Panicker
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-07staging: rtl8723bs: remove local variable 'eRFPath'Nikolay Kulikov
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-07staging: rtl8723bs: remove 'NumTotalRFPath' from 'struct hal_com_data'Nikolay Kulikov
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-07staging: rtl8723bs: fix Alignment should match open parenthesis in rtw_mlme.cDalvin-Ehinoma Noah Aiguobas
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-07staging: rtl8723bs: rename ScanType to scan_typeSerhat Kumral
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-07staging: rtl8723bs: rename ChannelNum to channel_numSerhat Kumral
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-07staging: rtl8723bs: remove unnecessary braces in hal_intf.cAlonso Garrigues
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-07staging: rtl8723bs: fix missing unregister_netdev on sdio_alloc_irq failureDevansh Soni
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-07staging: rtl8723bs: remove unnecessary braces in rtw_set_oper_chAlonso Garrigues
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-07staging: rtl8723bs: remove redundant rsp_allocated_bufDevansh Soni
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-07staging: rtl8723bs: Fix comment style issues in header filesSubhrojyoti Bala
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-07staging: rtl8723bs: Fix indentation in enum in rtw_mlme.hSubhrojyoti Bala
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-07staging: rtl8723bs: Fix missing spaces around operatorsMoksh Panicker
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-07staging: rtl8723bs: remove references to nonexistent CONFIG_IOCTL_CFG80211 ↵Ethan Nelson-Moore
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-07staging: rtl8723bs: remove reference to nonexistent CONFIG_SDIO_HCI optionEthan Nelson-Moore
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-07staging: rtl8723bs: hal: fix space-before-tab warnings in rtl8723bs_recv.cQuentin Strydom
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-07staging: rtl8723bs: hal: fix space-before-tab warnings in rtl8723b_hal_init.cQuentin Strydom
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-07staging: rtl8723bs: hal: fix space-before-tab warnings in HalPhyRf_8723B.cQuentin Strydom
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-07staging: rtl8723bs: hal: fix space-before-tab warnings in hal_com.cQuentin Strydom
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-07staging: rtl8723bs: hal: fix space-before-tab warnings in hal_btcoex.cQuentin Strydom
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-07staging: rtl8723bs: hal: fix space-before-tab warnings in HalBtc8723b2Ant.cQuentin Strydom
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-07staging: rtl8723bs: remove unused channel format/arg macrosChen-Yu Yeh
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-07staging: rtl8723bs: remove unused netdev format/arg macrosChen-Yu Yeh
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-07staging: rtl8723bs: remove references to nonexistent CONFIG_IEEE80211W optionEthan Nelson-Moore
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-07staging: rtl8723bs: core: avoid NULL pointer dereference in c2h_wk_callbackNikoloz Bakuradze
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-07staging: rtl8723bs: Drop unused parameter from rtw_sdio_if1_init()Uwe Kleine-König
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-07staging: rtl8723: remove multiple blank lines in rtw_security.cAndrea Frasson
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-07staging: rtl8723bs: add braces to resolve checkpatchDalvin-Ehinoma Noah Aiguobas
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-07staging: rtl8723bs: remove unnecessary parenthesesEugene Mavick
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-07staging: rtl8723bs: remove unused network_type_in_use fieldCong Nguyen
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-07net: usb: lan78xx: disable VLAN filter in promiscuous modeEnrico Pozzobon
The hardware VLAN filter (RFE_CTL_VLAN_FILTER_) drops VLAN-tagged frames whose VID has not been registered via lan78xx_vlan_rx_add_vid(). It is left enabled in promiscuous mode, so packet capture (e.g. tcpdump or Wireshark) does not see tagged frames for unregistered VIDs. Clear the filter while the interface is promiscuous and restore it from NETIF_F_HW_VLAN_CTAG_FILTER otherwise. Enforce the same condition in lan78xx_set_features() so netdev_update_features() cannot re-enable the filter while promiscuous. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Enrico Pozzobon <enrico.pozzobon@dissecto.com> Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://patch.msgid.link/20260701-lan78xx-vlan-promisc-v3-1-232266d32743@dissecto.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07staging: rtl8723bs: remove unused 'oui' parameter from update_beacon()Nikolay Kulikov
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-07staging: rtl8723bs: remove unused case from update_beacon()Nikolay Kulikov
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>