aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-10-13staging: gpib: Fix device reference leak in fmh_gpib driverMa Ke1-0/+5
The fmh_gpib driver contains a device reference count leak in fmh_gpib_attach_impl() where driver_find_device() increases the reference count of the device by get_device() when matching but this reference is not properly decreased. Add put_device() in fmh_gpib_detach(), which ensures that the reference count of the device is correctly managed. Found by code review. Cc: stable <stable@kernel.org> Fixes: 8e4841a0888c ("staging: gpib: Add Frank Mori Hess FPGA PCI GPIB driver") Signed-off-by: Ma Ke <make24@iscas.ac.cn> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-13staging: gpib: Return -EINTR on device clearDave Penkler1-2/+6
When the ATN (Attention) line is asserted during a read we get a NIUSB_ATN_STATE_ERROR during a read. For the controller to send a device clear it asserts ATN. Normally this is an error but in the case of a device clear it should be regarded as an interrupt. Return -EINTR when the Device Clear Active State (DCAS) is entered else signal an error with dev_dbg with status instead of just dev_err. Signed-off-by: Dave Penkler <dpenkler@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-13staging: gpib: Fix sending clear and trigger eventsDave Penkler1-1/+4
This driver was not sending device clear or trigger events when the board entered the DCAS or DTAS state respectively in device mode. DCAS is the Device Clear Active State which is entered on receiving a selective device clear message (SDC) or universal device clear message (DCL) from the controller in charge. DTAS is the Device Trigger Active State which is entered on receiving a group execute trigger (GET) message from the controller. In order for an application, implementing a particular device, to detect when one of these states is entered the driver needs to send the appropriate event. Send the appropriate gpib_event when DCAS or DTAS is set in the reported status word. This sets the DCAS or DTAS bits in the board's status word which can be monitored by the application. Fixes: 4e127de14fa7 ("staging: gpib: Add National Instruments USB GPIB driver") Cc: stable <stable@kernel.org> Tested-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-13staging: gpib: Fix no EOI on 1 and 2 byte writesDave Penkler1-5/+7
EOI (End Or Identify) is a hardware line on the GPIB bus that can be asserted with the last byte of a message to indicate the end of the transfer to the receiving device. In this driver, a write with send_eoi true is done in 3 parts: Send first byte directly Send remaining but 1 bytes using the fifo Send the last byte directly with EOI asserted The first byte in a write is always sent by writing to the tms9914 chip directly to setup for the subsequent fifo transfer. We were not checking for a 1 byte write with send_eoi true resulting in EOI not being asserted. Since the fifo transfer was not executed (fifotransfersize == 0) the retval in the test after the fifo transfer code was still 1 from the preceding direct write. This caused it to return without executing the final direct write which would have sent an unsollicited extra byte. For a 2 byte message the first byte was sent directly. But since the fifo transfer was not executed (fifotransfersize == 1) and the retval in the test after the fifo transfer code was still 1 from the preceding first byte write it returned before the final direct byte write with send_eoi true. The second byte was then sent as a separate 1 byte write to complete the 2 byte write count again without EOI being asserted as above. Only send the first byte directly if more than 1 byte is to be transferred with send_eoi true. Also check for retval < 0 for the error return in case the fifo code is not used (1 or 2 byte message with send_eoi true). Fixes: 09a4655ee1eb ("staging: gpib: Add HP/Agilent/Keysight 8235xx PCI GPIB driver") Cc: stable <stable@kernel.org> Tested-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-07Merge tag 'staging-6.18-rc1-2' of ↵Linus Torvalds1-37/+31
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are some staging driver fixes that missed 6.17-final due to my travel schedule. They fix a number of reported issues in the axis-fifo driver, one of which was just independently discovered by someone else today so someone is looking at this code. All of these fixes have been in linux-next for many weeks with no reported issues" * tag 'staging-6.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: axis-fifo: flush RX FIFO on read errors staging: axis-fifo: fix TX handling on copy_from_user() failure staging: axis-fifo: fix maximum TX packet length check
2025-10-04Merge tag 'char-misc-6.18-rc1' of ↵Linus Torvalds1-2/+0
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull Char/Misc/IIO/Binder updates from Greg KH: "Here is the big set of char/misc/iio and other driver subsystem changes for 6.18-rc1. Loads of different stuff in here, it was a busy development cycle in lots of different subsystems, with over 27k new lines added to the tree. Included in here are: - IIO updates including new drivers, reworking of existing apis, and other goodness in the sensor subsystems - MEI driver updates and additions - NVMEM driver updates - slimbus removal for an unused driver and some other minor updates - coresight driver updates and additions - MHI driver updates - comedi driver updates and fixes - extcon driver updates - interconnect driver additions - eeprom driver updates and fixes - minor UIO driver updates - tiny W1 driver updates But the majority of new code is in the rust bindings and additions, which includes: - misc driver rust binding updates for read/write support, we can now write "normal" misc drivers in rust fully, and the sample driver shows how this can be done. - Initial framework for USB driver rust bindings, which are disabled for now in the build, due to limited support, but coming in through this tree due to dependencies on other rust binding changes that were in here. I'll be enabling these back on in the build in the usb.git tree after -rc1 is out so that developers can continue to work on these in linux-next over the next development cycle. - Android Binder driver implemented in Rust. This is the big one, and was driving a huge majority of the rust binding work over the past years. Right now there are two binder drivers in the kernel, selected only at build time as to which one to use as binder wants to be included in the system at boot time. The binder C maintainers all agreed on this, as eventually, they want the C code to be removed from the tree, but it will take a few releases to get there while both are maintained to ensure that the rust implementation is fully stable and compliant with the existing userspace apis. All of these have been in linux-next for a while" * tag 'char-misc-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (320 commits) rust: usb: keep usb::Device private for now rust: usb: don't retain device context for the interface parent USB: disable rust bindings from the build for now samples: rust: add a USB driver sample rust: usb: add basic USB abstractions coresight: Add label sysfs node support dt-bindings: arm: Add label in the coresight components coresight: tnoc: add new AMBA ID to support Trace Noc V2 coresight: Fix incorrect handling for return value of devm_kzalloc coresight: tpda: fix the logic to setup the element size coresight: trbe: Return NULL pointer for allocation failures coresight: Refactor runtime PM coresight: Make clock sequence consistent coresight: Refactor driver data allocation coresight: Consolidate clock enabling coresight: Avoid enable programming clock duplicately coresight: Appropriately disable trace bus clocks coresight: Appropriately disable programming clocks coresight: etm4x: Support atclk coresight: catu: Support atclk ...
2025-10-04Merge tag 'staging-6.18-rc1' of ↵Linus Torvalds67-1685/+857
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the 'big' set of staging driver changes for 6.18-rc1. Nothing really exciting in here they pretty much consist of: - minor coding style changes and cleanups - some api layer removals where not needed Overall a quiet development cycle. All have been in linux-next for a while with no reported issues" * tag 'staging-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (63 commits) staging: rtl8723bs: xmit: rephrase comment and drop extra space staging: sm750fb: rename camel case variable staging: rtl8723bs: hal: put return type and function name on one line staging: rtl8723bs: fix typo in comment staging: sm750fb: rename snake case variables staging: sm750fb: remove unnecessary volatile qualifiers staging: rtl8723bs: rtw_efuse.h: simplify copyright banner staging: rtl8723bs: remove unused tables staging: rtl8723bs: Hal_EfuseParseAntennaDiversity_8723B is empty staging: rtl8723bs: remove REG_EFUSE_ACCESS_8723 and EFUSE_ACCESS_ON_8723 staging: rtl8723bs: remove bWrite from Hal_EfusePowerSwitch staging: rtl8723bs: remove wrapper Efuse_PowerSwitch staging: octeon: Clean up dead code in ethernet-tx.c staging: rtl8723bs: fix fortify warnings by using struct_group staging: gpib: use int type to store negative error codes staging: rtl8723bs: remove include/recv_osdep.h staging: rtl8723bs: remove os_dep/recv_linux.c staging: rtl8723bs: rename rtw_os_recv_indicate_pkt staging: rtl8723bs: move rtw_os_recv_indicate_pkt to rtw_recv.c staging: rtl8723bs: rename rtw_os_alloc_msdu_pkt ...
2025-10-02Merge tag 'net-next-6.18' of ↵Linus Torvalds2-10/+1
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "Core & protocols: - Improve drop account scalability on NUMA hosts for RAW and UDP sockets and the backlog, almost doubling the Pps capacity under DoS - Optimize the UDP RX performance under stress, reducing contention, revisiting the binary layout of the involved data structs and implementing NUMA-aware locking. This improves UDP RX performance by an additional 50%, even more under extreme conditions - Add support for PSP encryption of TCP connections; this mechanism has some similarities with IPsec and TLS, but offers superior HW offloads capabilities - Ongoing work to support Accurate ECN for TCP. AccECN allows more than one congestion notification signal per RTT and is a building block for Low Latency, Low Loss, and Scalable Throughput (L4S) - Reorganize the TCP socket binary layout for data locality, reducing the number of touched cachelines in the fastpath - Refactor skb deferral free to better scale on large multi-NUMA hosts, this improves TCP and UDP RX performances significantly on such HW - Increase the default socket memory buffer limits from 256K to 4M to better fit modern link speeds - Improve handling of setups with a large number of nexthop, making dump operating scaling linearly and avoiding unneeded synchronize_rcu() on delete - Improve bridge handling of VLAN FDB, storing a single entry per bridge instead of one entry per port; this makes the dump order of magnitude faster on large switches - Restore IP ID correctly for encapsulated packets at GSO segmentation time, allowing GRO to merge packets in more scenarios - Improve netfilter matching performance on large sets - Improve MPTCP receive path performance by leveraging recently introduced core infrastructure (skb deferral free) and adopting recent TCP autotuning changes - Allow bridges to redirect to a backup port when the bridge port is administratively down - Introduce MPTCP 'laminar' endpoint that con be used only once per connection and simplify common MPTCP setups - Add RCU safety to dst->dev, closing a lot of possible races - A significant crypto library API for SCTP, MPTCP and IPv6 SR, reducing code duplication - Supports pulling data from an skb frag into the linear area of an XDP buffer Things we sprinkled into general kernel code: - Generate netlink documentation from YAML using an integrated YAML parser Driver API: - Support using IPv6 Flow Label in Rx hash computation and RSS queue selection - Introduce API for fetching the DMA device for a given queue, allowing TCP zerocopy RX on more H/W setups - Make XDP helpers compatible with unreadable memory, allowing more easily building DevMem-enabled drivers with a unified XDP/skbs datapath - Add a new dedicated ethtool callback enabling drivers to provide the number of RX rings directly, improving efficiency and clarity in RX ring queries and RSS configuration - Introduce a burst period for the health reporter, allowing better handling of multiple errors due to the same root cause - Support for DPLL phase offset exponential moving average, controlling the average smoothing factor Device drivers: - Add a new Huawei driver for 3rd gen NIC (hinic3) - Add a new SpacemiT driver for K1 ethernet MAC - Add a generic abstraction for shared memory communication devices (dibps) - Ethernet high-speed NICs: - nVidia/Mellanox: - Use multiple per-queue doorbell, to avoid MMIO contention issues - support adjacent functions, allowing them to delegate their SR-IOV VFs to sibling PFs - support RSS for IPSec offload - support exposing raw cycle counters in PTP and mlx5 - support for disabling host PFs. - Intel (100G, ice, idpf): - ice: support for SRIOV VFs over an Active-Active link aggregate - ice: support for firmware logging via debugfs - ice: support for Earliest TxTime First (ETF) hardware offload - idpf: support basic XDP functionalities and XSk - Broadcom (bnxt): - support Hyper-V VF ID - dynamic SRIOV resource allocations for RoCE - Meta (fbnic): - support queue API, zero-copy Rx and Tx - support basic XDP functionalities - devlink health support for FW crashes and OTP mem corruptions - expand hardware stats coverage to FEC, PHY, and Pause - Wangxun: - support ethtool coalesce options - support for multiple RSS contexts - Ethernet virtual: - Macsec: - replace custom netlink attribute checks with policy-level checks - Bonding: - support aggregator selection based on port priority - Microsoft vNIC: - use page pool fragments for RX buffers instead of full pages to improve memory efficiency - Ethernet NICs consumer, and embedded: - Qualcomm: support Ethernet function for IPQ9574 SoC - Airoha: implement wlan offloading via NPU - Freescale - enetc: add NETC timer PTP driver and add PTP support - fec: enable the Jumbo frame support for i.MX8QM - Renesas (R-Car S4): - support HW offloading for layer 2 switching - support for RZ/{T2H, N2H} SoCs - Cadence (macb): support TAPRIO traffic scheduling - TI: - support for Gigabit ICSS ethernet SoC (icssm-prueth) - Synopsys (stmmac): a lot of cleanups - Ethernet PHYs: - Support 10g-qxgmi phy-mode for AQR412C, Felix DSA and Lynx PCS driver - Support bcm63268 GPHY power control - Support for Micrel lan8842 PHY and PTP - Support for Aquantia AQR412 and AQR115 - CAN: - a large CAN-XL preparation work - reorganize raw_sock and uniqframe struct to minimize memory usage - rcar_canfd: update the CAN-FD handling - WiFi: - extended Neighbor Awareness Networking (NAN) support - S1G channel representation cleanup - improve S1G support - WiFi drivers: - Intel (iwlwifi): - major refactor and cleanup - Broadcom (brcm80211): - support for AP isolation - RealTek (rtw88/89) rtw88/89: - preparation work for RTL8922DE support - MediaTek (mt76): - HW restart improvements - MLO support - Qualcomm/Atheros (ath10k): - GTK rekey fixes - Bluetooth drivers: - btusb: support for several new IDs for MT7925 - btintel: support for BlazarIW core - btintel_pcie: support for _suspend() / _resume() - btintel_pcie: support for Scorpious, Panther Lake-H484 IDs" * tag 'net-next-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1536 commits) net: stmmac: Add support for Allwinner A523 GMAC200 dt-bindings: net: sun8i-emac: Add A523 GMAC200 compatible Revert "Documentation: net: add flow control guide and document ethtool API" octeontx2-pf: fix bitmap leak octeontx2-vf: fix bitmap leak net/mlx5e: Use extack in set rxfh callback net/mlx5e: Introduce mlx5e_rss_params for RSS configuration net/mlx5e: Introduce mlx5e_rss_init_params net/mlx5e: Remove unused mdev param from RSS indir init net/mlx5: Improve QoS error messages with actual depth values net/mlx5e: Prevent entering switchdev mode with inconsistent netns net/mlx5: HWS, Generalize complex matchers net/mlx5: Improve write-combining test reliability for ARM64 Grace CPUs selftests/net: add tcp_port_share to .gitignore Revert "net/mlx5e: Update and set Xon/Xoff upon MTU set" net: add NUMA awareness to skb_attempt_defer_free() net: use llist for sd->defer_list net: make softnet_data.defer_count an atomic selftests: drv-net: psp: add tests for destroying devices selftests: drv-net: psp: add test for auto-adjusting TCP MSS ...
2025-09-17staging: rtl8723bs: xmit: rephrase comment and drop extra spaceAkiyoshi Kurita1-1/+1
Rephrase the comment to avoid the "number of" construction and remove an extra leading space. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Link: https://lore.kernel.org/r/20250917063729.1450525-1-weibu@redadmin.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-14staging: sm750fb: rename camel case variableAhmet Sezgin Duran1-2/+2
Rename regValue to reg_value to follow kernel coding style. Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net> Link: https://lore.kernel.org/r/20250912162627.95010-1-ahmet@sezginduran.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-14staging: rtl8723bs: hal: put return type and function name on one lineAkiyoshi Kurita1-4/+1
Make the function definition of phy_StoreTxPowerByRateBase() follow the kernel coding style by placing the return type and function name on a single line. No functional change. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Link: https://lore.kernel.org/r/20250912162613.776769-1-weibu@redadmin.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-12staging: axis-fifo: flush RX FIFO on read errorsOvidiu Panait1-7/+11
Flush stale data from the RX FIFO in case of errors, to avoid reading old data when new packets arrive. Commit c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") removed full FIFO resets from the read error paths, which fixed potential TX data losses, but introduced this RX issue. Fixes: c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") Cc: stable@vger.kernel.org Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250912101322.1282507-2-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-12staging: axis-fifo: fix TX handling on copy_from_user() failureOvidiu Panait1-26/+10
If copy_from_user() fails, write() currently returns -EFAULT, but any partially written data leaves the TX FIFO in an inconsistent state. Subsequent write() calls then fail with "transmit length mismatch" errors. Once partial data is written to the hardware FIFO, it cannot be removed without a TX reset. Commit c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") removed a full FIFO reset for this case, which fixed a potential RX data loss, but introduced this TX issue. Fix this by introducing a bounce buffer: copy the full packet from userspace first, and write to the hardware FIFO only if the copy was successful. Fixes: c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") Cc: stable@vger.kernel.org Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250912101322.1282507-1-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-12staging: rtl8723bs: fix typo in commentAkiyoshi Kurita1-1/+1
Fix a misspelling in a header comment: "configurtions" -> "configurations". Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20250912064406.707039-1-weibu@redadmin.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-12staging: sm750fb: rename snake case variablesYiming Qian3-7/+7
Replaces CamelCase variable names with snake_case: - dprBase -> dpr_base - dpPortBase -> dp_port_base Signed-off-by: Yiming Qian <qianym1996@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20250909060130.12919-3-qianym1996@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-12staging: sm750fb: remove unnecessary volatile qualifiersYiming Qian1-3/+3
The use of 'volatile' for memory-mapped I/O pointers is discouraged in the Linux kernel as per Documentation/process/volatile-considered-harmful.rst. This patch removes the unnecessary 'volatile' qualifiers from the lynx_accel struct members, improving code quality and maintainability. Signed-off-by: Yiming Qian <qianym1996@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20250909060130.12919-2-qianym1996@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-12staging: rtl8723bs: rtw_efuse.h: simplify copyright bannerAkiyoshi Kurita1-5/+2
Replace the banner-style copyright comment with a single-line comment. No functional changes. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Link: https://lore.kernel.org/r/20250909053327.140763-1-weibu@redadmin.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-12staging: rtl8723bs: remove unused tablesMichael Straube2-158/+0
Remove some unused tabels to get rid of dead code and thereby reduce the object file size by more than 1400 bytes. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250908061243.62692-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-10media: staging/ipu7: fix isys device runtime PM usage in firmware closingBingbu Cao1-0/+1
The PM usage counter of isys was bumped up when start camera stream (opening firmware) but it was not dropped after stream stop(closing firmware), it forbids system fail to suspend due to the wrong PM state of ISYS. This patch drop the PM usage counter in firmware close to fix it. Cc: Stable@vger.kernel.org Fixes: a516d36bdc3d ("media: staging/ipu7: add IPU7 input system device driver") Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-09-09media: staging: ipu7: Don't include linux/version.hSakari Ailus1-1/+0
linux/version.h isn't needed by the driver, don't include it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-09-06staging: rtl8723bs: Hal_EfuseParseAntennaDiversity_8723B is emptyMichael Straube3-11/+0
The function Hal_EfuseParseAntennaDiversity_8723B is empty, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Trendbook Next 14 Link: https://lore.kernel.org/r/20250824095830.79233-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove REG_EFUSE_ACCESS_8723 and EFUSE_ACCESS_ON_8723Michael Straube1-8/+1
The macros REG_EFUSE_ACCESS_8723 and EFUSE_ACCESS_ON_8723 are redundant, both are already defined in header files without the _8723 suffix. Remove them and use the marcos from the header files. rtl8723b_hal.h:138: #define EFUSE_ACCESS_ON 0x69 /* For RTL8723 only. */ hal_com_reg.h:35: #define REG_EFUSE_ACCESS 0x00CF /* Efuse access protection for RTL8723 */ Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Trendbook Next 14 Link: https://lore.kernel.org/r/20250824095830.79233-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove bWrite from Hal_EfusePowerSwitchMichael Straube3-25/+6
The function Hal_EfusePowerSwitch is always called with bWrite set to false. Remove the pWrite parameter and reomve resulting dead code to reduce code complexity. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Trendbook Next 14 Link: https://lore.kernel.org/r/20250824095830.79233-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove wrapper Efuse_PowerSwitchMichael Straube3-33/+4
The function Efuse_PowerSwitch is just a wrapper around Hal_EfusePowerSwitch. Remove the wrapper and use Hal_EfusePowerSwitch directly. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Trendbook Next 14 Link: https://lore.kernel.org/r/20250824095830.79233-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: octeon: Clean up dead code in ethernet-tx.cMohammed GUERMOUD1-40/+0
Remove multiple blocks of non-functional code disabled via '#if 0'. The removed code was a placeholder for incomplete hardware offload features, as indicated by `FIXME` comments. Remove this dead code to simplify the driver. Signed-off-by: Mohammed GUERMOUD <mohammed.guermoud@gmail.com> Link: https://lore.kernel.org/r/20250829170253.16737-1-mohammed.guermoud@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: fix fortify warnings by using struct_groupyingche2-2/+2
Fix fortify_memcpy_chk warnings in rtw_BIP_verify() and rtw_mgmt_xmitframe_coalesce() functions by using struct_group to access consecutive address fields. Changed memcpy calls to use &hdr->addrs instead of hdr->addr1 when copying 18 bytes (addr1 + addr2 + addr3). This resolves 'detected read beyond size of field' warnings by using the proper struct_group mechanism as suggested by the compiler. Signed-off-by: yingche <zxcv2569763104@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20250829040906.895221-1-zxcv2569763104@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: gpib: use int type to store negative error codesQianfeng Rong1-1/+1
The "ret" variable is used to store the return from bb_write() returns either zero on success or negative error codes on failure. Storing the error codes in size_t which is an unsigned long, doesn't cause an issue at runtime but it's ugly as pants. Change "ret" from size_t to int type. No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20250826123208.300145-1-rongqianfeng@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove include/recv_osdep.hMichael Straube3-22/+4
Move still needed function prototypes defined in the recv_osdep.h header to rtw_recv.h and remove the now obsolete recv_osdep.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-14-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove os_dep/recv_linux.cMichael Straube2-13/+0
After previous patches the file os_dep/recv_linux.c is empty now and we can remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-13-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: rename rtw_os_recv_indicate_pktMichael Straube1-3/+3
Rename rtw_os_recv_indicate_pkt to rtw_recv_indicate_pkt as the _os_ indicates operating system dependent code which is unnecessary for in-tree linux kernel code. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-12-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: move rtw_os_recv_indicate_pkt to rtw_recv.cMichael Straube3-47/+47
Move the function rtw_os_recv_indicate_pkt from os_dep/recv_linux.c to core/rtw_recv.c to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-11-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: rename rtw_os_alloc_msdu_pktMichael Straube1-2/+2
Rename rtw_os_alloc_msdu_pkt to rtw_alloc_msdu_pkt as the _os_ indicates operating system dependent code which is unnecessary for in-tree linux kernel code. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-10-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: move rtw_os_alloc_msdu_pkt to rtw_recv.cMichael Straube3-41/+40
Move the function rtw_os_alloc_msdu_pkt from os_dep/recv_linux.c to core/rtw_recv.c to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: merge rtw_os_recvbuf_resource_free into rtl8723bs_recv.cMichael Straube3-11/+4
Merge rtw_os_recvbuf_resource_free into rtl8723bs_init_recv_priv and into rtl8723bs_free_recv_priv to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: merge rtw_os_recv_resource_free into rtw_recv.cMichael Straube3-22/+12
Merge the functionality of rtw_os_recv_resource_free in os_dep/recv_linux.c into _rtw_free_recv_priv in core/rtw_recv.c to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: merge rtw_os_recv_resource_alloc into rtw_recv.cMichael Straube3-8/+2
Merge the functionality of rtw_os_recv_resource_alloc into _rtw_init_recv_priv to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: merge rtw_os_free_recvframe into rtw_recv.cMichael Straube3-15/+4
Merge the functionality of rtw_os_free_recvframe in os_dep/recv_linux.c into rtw_free_recvframe in core/rtw_recv.c to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: move rtw_handle_tkip_mic_err to rtw_recv.cMichael Straube3-46/+44
Move the function rtw_handle_tkip_mic_err from os_dep/recv_linux.c to core/rtw_recv.c to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: move rtw_recv_indicatepkt to rtw_recv.cMichael Straube3-38/+37
Move the function rtw_recv_indicatepkt from os_dep/recv_linux.c to core/rtw_recv.c to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove wrapper rtw_init_recv_timerMichael Straube3-11/+3
The function rtw_init_recv_timer in os_dep/recv_linux.c is jsut a wrapper around timer_setup. Use timer_setup directly and remove the wrapper to reduce code in the os_dep directory. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove efuse_OneByteWriteMichael Straube2-49/+0
The function efuse_OneByteWrite is not used. Remove it and remove related dead code, namely the function Efuse_Write1ByteToFakeContent. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-15-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove bPseudoTest from efuse_OneByteReadMichael Straube3-27/+11
The function efuse_OneByteRead is always called with bPseudoTest set to false. Remove the pPseudoTest parameter and reomve resulting dead code to reduce code complexity. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-14-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: clean up variable initializationsMichael Straube1-4/+2
After previous cleanup patches the variable initializations in hal_EfuseSwitchToBank are messed up a little, but were left as-is to make reviewing easier. For example bRet is initialized to false and immediately set to true. This patch cleans up the variable initializations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-13-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove bPseudoTest from hal_EfuseSwitchToBankMichael Straube1-38/+24
The function hal_EfuseSwitchToBank is always called with bPseudoTest set to false. Remove the pPseudoTest parameter and reomve resulting dead code to reduce code complexity. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-12-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove Hal_EfuseGetCurrentSizeMichael Straube2-185/+0
The function Hal_EfuseGetCurrentSize is not used in the driver code, remove it to get rid of dead code. As Hal_EfuseGetCurrentSize is the only caller of hal_EfuseGetCurrentSize_WiFi and hal_EfuseGetCurrentSize_BT we can remove these two functions as well. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-11-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove bPseudoTest from Hal_GetEfuseDefinitionMichael Straube3-11/+10
The bPseudoTEst parameter is not used in Hal_GetEfuseDefinition. Remove the unused parameter and adjust the function calls. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-10-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove wrapper EFUSE_GetEfuseDefinitionMichael Straube3-21/+8
The function EFUSE_GetEfuseDefinition is just a wrapper around Hal_GetEfuseDefinition. Remove the wrapper and use Hal_GetEfuseDefinition directly. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove bPseudoTest from hal_ReadEFuse_BTMichael Straube1-25/+13
The function hal_ReadEFuse_BT is always called with bPseudoTest set to false. Remove the pPseudoTest parameter, replace its usage in the function with false, and reomve resulting dead code to reduce code complexity. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove bPseudoTest from hal_ReadEFuse_WiFiMichael Straube1-23/+11
The function hal_ReadEFuse_WiFi is always called with bPseudoTest set to false. Remove the pPseudoTest parameter, replace its usage in the function with false, and reomve resulting dead code to reduce code complexity. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06staging: rtl8723bs: remove bPseudoTest from Hal_ReadEFuseMichael Straube3-6/+5
The function Hal_ReadEFuse is always called with bPseudoTest set to false. Remove the pPseudoTest parameter and replace its usage in the function with false to reduce code complexity. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250823124321.485910-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>