Commit Graph

66935 Commits

Author SHA1 Message Date
Linus Torvalds
fbd2e22716 Merge tag 'staging-6.18-rc1-2' of 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-07 11:41:06 -07:00
Linus Torvalds
6093a688a0 Merge tag 'char-misc-6.18-rc1' of 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-04 16:26:32 -07:00
Linus Torvalds
59697e061f Merge tag 'staging-6.18-rc1' of 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-04 16:17:14 -07:00
Linus Torvalds
07fdad3a93 Merge tag 'net-next-6.18' of 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-10-02 15:17:01 -07:00
Akiyoshi Kurita
b76029bdd7 staging: rtl8723bs: xmit: rephrase comment and drop extra space
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-17 12:15:33 +02:00
Ahmet Sezgin Duran
e4cb566521 staging: sm750fb: rename camel case variable
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-14 17:08:39 +02:00
Akiyoshi Kurita
357704a3cf staging: rtl8723bs: hal: put return type and function name on one line
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-14 17:08:38 +02:00
Ovidiu Panait
82a051e255 staging: axis-fifo: flush RX FIFO on read errors
Flush stale data from the RX FIFO in case of errors, to avoid reading
old data when new packets arrive.

Commit c6e8d85faf ("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: c6e8d85faf ("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-12 16:21:46 +02:00
Ovidiu Panait
6d07bee10e staging: axis-fifo: fix TX handling on copy_from_user() failure
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 c6e8d85faf ("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: c6e8d85faf ("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-12 16:21:46 +02:00
Akiyoshi Kurita
0daed4c3b6 staging: rtl8723bs: fix typo in comment
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-12 15:54:19 +02:00
Yiming Qian
5865a858db staging: sm750fb: rename snake case variables
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-12 15:54:01 +02:00
Yiming Qian
02accdf0ca staging: sm750fb: remove unnecessary volatile qualifiers
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-12 15:54:01 +02:00
Akiyoshi Kurita
6f19c1ef7f staging: rtl8723bs: rtw_efuse.h: simplify copyright banner
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-12 15:53:16 +02:00
Michael Straube
013c09b7ac staging: rtl8723bs: remove unused tables
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-12 15:51:55 +02:00
Bingbu Cao
895d3b4b58 media: staging/ipu7: fix isys device runtime PM usage in firmware closing
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: a516d36bdc ("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-10 10:40:53 +02:00
Sakari Ailus
4010eef01d media: staging: ipu7: Don't include linux/version.h
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-09 15:59:16 +02:00
Michael Straube
7cce3d7bce staging: rtl8723bs: Hal_EfuseParseAntennaDiversity_8723B is empty
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-06 15:55:48 +02:00
Michael Straube
5cea88cab6 staging: rtl8723bs: remove REG_EFUSE_ACCESS_8723 and EFUSE_ACCESS_ON_8723
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-06 15:55:48 +02:00
Michael Straube
236faa3b92 staging: rtl8723bs: remove bWrite from Hal_EfusePowerSwitch
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-06 15:55:48 +02:00
Michael Straube
009798ff04 staging: rtl8723bs: remove wrapper Efuse_PowerSwitch
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-06 15:55:48 +02:00
Mohammed GUERMOUD
5ff310ce43 staging: octeon: Clean up dead code in ethernet-tx.c
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-06 15:55:43 +02:00
yingche
0bbf8fb9e3 staging: rtl8723bs: fix fortify warnings by using struct_group
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-06 15:55:38 +02:00
Qianfeng Rong
9d78ee44a9 staging: gpib: use int type to store negative error codes
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-06 15:55:35 +02:00
Michael Straube
533656d39f staging: rtl8723bs: remove include/recv_osdep.h
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-06 15:55:13 +02:00
Michael Straube
6009d6fd82 staging: rtl8723bs: remove os_dep/recv_linux.c
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-06 15:55:13 +02:00
Michael Straube
1d7e13c8b7 staging: rtl8723bs: rename rtw_os_recv_indicate_pkt
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-06 15:55:12 +02:00
Michael Straube
cc18433094 staging: rtl8723bs: move rtw_os_recv_indicate_pkt to rtw_recv.c
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-06 15:55:12 +02:00
Michael Straube
b870844cd0 staging: rtl8723bs: rename rtw_os_alloc_msdu_pkt
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-06 15:55:12 +02:00
Michael Straube
f44d85d5a2 staging: rtl8723bs: move rtw_os_alloc_msdu_pkt to rtw_recv.c
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-06 15:55:12 +02:00
Michael Straube
10bcaf9ccc staging: rtl8723bs: merge rtw_os_recvbuf_resource_free into rtl8723bs_recv.c
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-06 15:55:12 +02:00
Michael Straube
0ae5ca4fb6 staging: rtl8723bs: merge rtw_os_recv_resource_free into rtw_recv.c
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-06 15:55:12 +02:00
Michael Straube
aec747851b staging: rtl8723bs: merge rtw_os_recv_resource_alloc into rtw_recv.c
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-06 15:55:12 +02:00
Michael Straube
d91ccaaf09 staging: rtl8723bs: merge rtw_os_free_recvframe into rtw_recv.c
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-06 15:55:12 +02:00
Michael Straube
9766096c1e staging: rtl8723bs: move rtw_handle_tkip_mic_err to rtw_recv.c
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-06 15:55:12 +02:00
Michael Straube
f97151eb17 staging: rtl8723bs: move rtw_recv_indicatepkt to rtw_recv.c
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-06 15:55:12 +02:00
Michael Straube
0149f27d1a staging: rtl8723bs: remove wrapper rtw_init_recv_timer
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-06 15:55:11 +02:00
Michael Straube
9f1dcadbc9 staging: rtl8723bs: remove efuse_OneByteWrite
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-06 15:54:58 +02:00
Michael Straube
ca6e514b8a staging: rtl8723bs: remove bPseudoTest from efuse_OneByteRead
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-06 15:54:58 +02:00
Michael Straube
4558ec57bf staging: rtl8723bs: clean up variable initializations
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-06 15:54:58 +02:00
Michael Straube
4d170e2c0d staging: rtl8723bs: remove bPseudoTest from hal_EfuseSwitchToBank
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-06 15:54:58 +02:00
Michael Straube
127fae1d91 staging: rtl8723bs: remove Hal_EfuseGetCurrentSize
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-06 15:54:57 +02:00
Michael Straube
254c268bf1 staging: rtl8723bs: remove bPseudoTest from Hal_GetEfuseDefinition
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-06 15:54:57 +02:00
Michael Straube
b907ae0baf staging: rtl8723bs: remove wrapper EFUSE_GetEfuseDefinition
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-06 15:54:57 +02:00
Michael Straube
3d589e3b27 staging: rtl8723bs: remove bPseudoTest from hal_ReadEFuse_BT
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-06 15:54:57 +02:00
Michael Straube
0de319271c staging: rtl8723bs: remove bPseudoTest from hal_ReadEFuse_WiFi
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-06 15:54:57 +02:00
Michael Straube
0124378e9e staging: rtl8723bs: remove bPseudoTest from Hal_ReadEFuse
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>
2025-09-06 15:54:57 +02:00
Michael Straube
14fd394847 staging: rtl8723bs: remove wrapper efuse_ReadEFuse
The function efuse_ReadEFuse is just a wrapper around Hal_ReadEFuse.
Remove the wrapper and use Hal_ReadEFuse directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20250823124321.485910-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06 15:54:56 +02:00
Michael Straube
e8605159ae staging: rtl8723bs: remove bPseudoTest from Efuse_ReadAllMap
The function Efuse_ReadAllMap 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-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06 15:54:56 +02:00
Michael Straube
fc7ae37d81 staging: rtl8723bs: make Efuse_ReadAllMap static
Make the function Efuse_ReadAllMap static and remove its unnecessary
forawrd declaration.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20250823124321.485910-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06 15:54:56 +02:00
Michael Straube
994626b97e staging: rtl8723bs: remove bPseudoTest from EFUSE_ShadowMapUpdate
The function EFUSE_ShadowMapUpdate 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-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-06 15:54:56 +02:00