]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
4 weeks agorust: pin-init: implement ZeroableOption for NonZero* integer types
Hamdan-Khan [Thu, 19 Mar 2026 09:35:27 +0000 (10:35 +0100)] 
rust: pin-init: implement ZeroableOption for NonZero* integer types

Add a macro for implementing `ZeroableOption` for `NonZero*` types.

`Option<NonZero*>` now automatically implements `Zeroable` trait  by
implementing `ZeroableOption` for `NonZero*` types, which serves as a
blanket impl.

Closes: https://github.com/Rust-for-Linux/pin-init/issues/95
Signed-off-by: Hamdan-Khan <hamdankhan212@gmail.com>
Link: https://github.com/Rust-for-Linux/pin-init/commit/74f772641cd9670848fa360f4ebfd20fdb40bf78
[ Fixed a typo in the commit message. - Benno ]
Link: https://patch.msgid.link/20260319093542.3756606-5-lossin@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
4 weeks agorust: pin-init: doc: de-clutter documentation with fake-variadics
Gary Guo [Thu, 19 Mar 2026 09:35:26 +0000 (10:35 +0100)] 
rust: pin-init: doc: de-clutter documentation with fake-variadics

Currently the doc for `Zeroable` and `ZeroableOption` are filled with the
generated impl of tuples and fn pointers. Use the internal
"fake_variadics" feature to improve the rendered quality.

This makes use of an internal feature, however this is of minimal risk as
it's for documentation only, not activated during normal build, gated
behind `USE_RUSTC_FEATURES`, and can be removed at any time. This feature
is already used by serde and bevy to improve documentation quality.

For compilers that cannot use this feature, we still hide most generated
impls, and the existence of them are hinted by doc comments on the single
non-hidden impl.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://github.com/Rust-for-Linux/pin-init/commit/530c4eb79a449599e219821f9397f03250cc2aa4
[ Reordered `#[doc]` attributes and safety comments to avoid errors in
  older versions of clippy. - Benno ]
Link: https://patch.msgid.link/20260319093542.3756606-4-lossin@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
4 weeks agorust: pin-init: properly document let binding workaround
Benno Lossin [Thu, 19 Mar 2026 09:35:25 +0000 (10:35 +0100)] 
rust: pin-init: properly document let binding workaround

The three let bindings (in the bodies of `cast_init`, `cast_pin_init`
and the `init!` macro) are used to avoid the following compiler error in
Rust 1.78.0, 1.79.0, 1.80.0, 1.80.1, and 1.81.0 (just showing the one
for `cast_init`, the others are similar):

    error[E0391]: cycle detected when computing type of opaque `cast_init::{opaque#0}`
        --> src/lib.rs:1160:66
         |
    1160 | pub const unsafe fn cast_init<T, U, E>(init: impl Init<T, E>) -> impl Init<U, E> {
         |                                                                  ^^^^^^^^^^^^^^^
         |
    note: ...which requires borrow-checking `cast_init`...
        --> src/lib.rs:1160:1
         |
    1160 | pub const unsafe fn cast_init<T, U, E>(init: impl Init<T, E>) -> impl Init<U, E> {
         | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    note: ...which requires const checking `cast_init`...
        --> src/lib.rs:1160:1
         |
    1160 | pub const unsafe fn cast_init<T, U, E>(init: impl Init<T, E>) -> impl Init<U, E> {
         | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         = note: ...which requires computing whether `cast_init::{opaque#0}` is freeze...
         = note: ...which requires evaluating trait selection obligation `cast_init::{opaque#0}: core::marker::Freeze`...
         = note: ...which again requires computing type of opaque `cast_init::{opaque#0}`, completing the cycle
    note: cycle used when computing type of `cast_init::{opaque#0}`
        --> src/lib.rs:1160:66
         |
    1160 | pub const unsafe fn cast_init<T, U, E>(init: impl Init<T, E>) -> impl Init<U, E> {
         |                                                                  ^^^^^^^^^^^^^^^
         = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

Once we raise the nightly-MSRV above 1.81, we can remove this
workaround.

Link: https://github.com/Rust-for-Linux/pin-init/commit/bb3e96f3e9a4f5fca80a22af883c7e5aa90f0893
[ Moved this commit after the previous one to avoid a build failure due
  to unstable features. Changed the cfg to use `USE_RUSTC_FEAUTURES`.
  - Benno ]
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260319093542.3756606-3-lossin@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
4 weeks agorust: pin-init: build: simplify use of nightly features
Gary Guo [Thu, 19 Mar 2026 09:35:24 +0000 (10:35 +0100)] 
rust: pin-init: build: simplify use of nightly features

We use some features that are already stable in later versions of Rust,
but only available as unstable features in older Rust versions that the
kernel needs to support.

Instead of checking if a feature is already stable, simply enable them
and allow the warning if the feature is already stable. This avoids the
need of hardcoding whether a feature has been stabilized at a given
version.

`#[feature(...)]` is used when cfg `USE_RUSTC_FEATURES` is enabled. The
build script automatically does this when a nightly compiler is detected
or `RUSTC_BOOTSTRAP` is set.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://github.com/Rust-for-Linux/pin-init/commit/885c5d83d7eb778a796d4a17380a0898b0d0a571
[ Added kernel build system changes to always enable USE_RUSTC_FEATURES.
  Moved this commit earlier (swapped with the next one) to avoid a build
  error. - Benno ]
Link: https://patch.msgid.link/20260319093542.3756606-2-lossin@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
4 weeks agoarm64: tegra: defconfig: Drop redundant ARCH_TEGRA_foo_SOC
Krzysztof Kozlowski [Tue, 17 Feb 2026 09:16:38 +0000 (10:16 +0100)] 
arm64: tegra: defconfig: Drop redundant ARCH_TEGRA_foo_SOC

All CONFIG_ARCH_TEGRA_132_SOC-like symbols are now default for
ARCH_TEGRA, so drop redundant lines from defconfig.  Tested with
comparing include/generated/autoconf.h.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
4 weeks agoMerge branch 'for-7.1/soc' into for-7.1/arm64/defconfig
Thierry Reding [Wed, 25 Mar 2026 09:49:24 +0000 (10:49 +0100)] 
Merge branch 'for-7.1/soc' into for-7.1/arm64/defconfig

4 weeks agoARM: tegra: defconfig: Drop redundant ARCH_TEGRA_foo_SOC
Krzysztof Kozlowski [Tue, 17 Feb 2026 09:16:37 +0000 (10:16 +0100)] 
ARM: tegra: defconfig: Drop redundant ARCH_TEGRA_foo_SOC

All CONFIG_ARCH_TEGRA_2x_SOC-like symbols are now default for
ARCH_TEGRA, so drop redundant lines from defconfigs.  Tested with
comparing include/generated/autoconf.h.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
4 weeks agoMerge branch 'for-7.1/soc' into for-7.1/arm/defconfig
Thierry Reding [Wed, 25 Mar 2026 09:48:38 +0000 (10:48 +0100)] 
Merge branch 'for-7.1/soc' into for-7.1/arm/defconfig

4 weeks agosoc/tegra: Add Tegra238 Kconfig symbol
Thierry Reding [Thu, 26 Feb 2026 15:09:32 +0000 (16:09 +0100)] 
soc/tegra: Add Tegra238 Kconfig symbol

The NVIDIA Tegra238 SoC is an upcoming new chip. Add a Kconfig symbol to
allow fine-grained selection of support code for this chip.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
4 weeks agosoc/tegra: Make ARCH_TEGRA_SOC_FOO defaults for NVIDIA Tegra
Krzysztof Kozlowski [Tue, 17 Feb 2026 09:16:36 +0000 (10:16 +0100)] 
soc/tegra: Make ARCH_TEGRA_SOC_FOO defaults for NVIDIA Tegra

By convention, only one globally selectable ARCH_PLATFORM is expected
for given SoC platform, defined in arch/arm64/Kconfig.platforms or
arch/arm/mach-*/Kconfig, because we target a single multi-platform
kernel image.

Platforms wanting different granularity, e.g. due to size constraints on
their devices, should be sure that globally only one ARCH_PLATFORM is
selected in defconfig.  Change Tegra per-SoC Kconfig entries to default
to ARCH_TEGRA allowing removal of these per-SoC parts from defconfigs.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
[treding@nvidia.com: Fix ARCH_PLATFORM typo, correct spelling]
Signed-off-by: Thierry Reding <treding@nvidia.com>
4 weeks agowifi: iwlwifi: mld: set RX_FLAG_RADIOTAP_TLV_AT_END generically
Johannes Berg [Sat, 21 Mar 2026 17:29:22 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: set RX_FLAG_RADIOTAP_TLV_AT_END generically

Instead of setting this flag in the iwl_mld_radiotap_put_tlv()
users, and not even all of them, set it inside the function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.31eff369ccf2.If5cee8f7c767b937891abb6cccf2692068ba7758@changeid
4 weeks agowifi: iwlwifi: reduce the number of prints upon firmware crash
Emmanuel Grumbach [Sat, 21 Mar 2026 17:29:21 +0000 (19:29 +0200)] 
wifi: iwlwifi: reduce the number of prints upon firmware crash

When the firmware crashes, we print data to be able to know what
happened. The problem is that those prints became excessive as during
the course of the years, we added more data without ever removing the
prints that were no longer useful.
Instead of spamming the log with data that will not help anyone, limit
the prints to what is really needed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Eilon Rinat <eilon.rinat@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.3bb8b142ff48.Ieacb12bf3bc930a4c28824e31d8e06eda177ba78@changeid
4 weeks agowifi: iwlwifi: fix the description of SESSION_PROTECTION_CMD
Emmanuel Grumbach [Sat, 21 Mar 2026 17:29:20 +0000 (19:29 +0200)] 
wifi: iwlwifi: fix the description of SESSION_PROTECTION_CMD

The struct has been renamed to iwl_session_prot_cmd.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.56545b097d13.If468c6a666dcf3a52601604bfc8a1c4faa9d320c@changeid
4 weeks agowifi: iwlwifi: mld: introduce iwl_mld_vif_fw_id_valid
Miri Korenblit [Sat, 21 Mar 2026 17:29:19 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: introduce iwl_mld_vif_fw_id_valid

Introduce a helper function that checks if a vif fw id is valid, and warns
if it isn't.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.b68d43db2ddc.I11b2b98e115da9eec8f603c5a01a0a9bcd040884@changeid
4 weeks agowifi: iwlwifi: mld: block EMLSR during TDLS connections
Avinash Bhatt [Sat, 21 Mar 2026 17:29:18 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: block EMLSR during TDLS connections

TDLS (Tunneled Direct Link Setup) requires single-link operation
for direct peer-to-peer communication, which is incompatible with
EMLSR (Enhanced Multi-Link Single Radio) mode where the radio
switches between multiple links.

Block EMLSR when the first TDLS peer is added and unblock when
the last TDLS peer is removed. The block/unblock APIs handle
exiting EMLSR and triggering link selection automatically.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.c1376b0259dd.I016587eb1570f7a7a64c0c95e0636e955a640350@changeid
4 weeks agowifi: iwlwifi: TLC_MNG_CONFIG_CMD can use several structures
Emmanuel Grumbach [Sat, 21 Mar 2026 17:29:17 +0000 (19:29 +0200)] 
wifi: iwlwifi: TLC_MNG_CONFIG_CMD can use several structures

Depending on the firmware API version, we can use different version of
the command. Mention them all in the description.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.2c0b1adb8655.Id0cc6cb6996df53a224d29fa541d19b9ee2aa479@changeid
4 weeks agowifi: iwlwifi: mld: update the TLC when we deactivate a link
Emmanuel Grumbach [Sat, 21 Mar 2026 17:29:16 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: update the TLC when we deactivate a link

We hit a problem in the channel switch flow.
We had link 0 using PHY 0, so the TLC object in the firmware is using
PHY 0.
Then we switched channel, so mac80211 / iwlmld:
* deactivated link 0
* removed PHY 0
* added PHY 1
* modified link 0 to use PHY 1
* activated link 0.

The TLC object was not updated and the firmware was unhappy that the TLC
was still trying to use PHY 0.

Fix that by letting the TLC know about the PHY context before the link
activation.
When we are de-activating a link, let the TLC know so that it'll send a
TLC configuration command with an invalid PHY context to remove the
relationship between the TLC object and the PHY that is going to be
removed.

That last part is not implemented yet in the firmware, so leave this as
a TODO for now.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.317c66b11a31.I591118fa376ed967c0d1a47058c13834bc94605e@changeid
4 weeks agowifi: iwlwifi: add a macro for max FW links
Miri Korenblit [Sat, 21 Mar 2026 17:29:15 +0000 (19:29 +0200)] 
wifi: iwlwifi: add a macro for max FW links

Currently we use IWL_FW_MAX_LINK_ID + 1 to indicate the maximum number
of link that the fw supports. This is a bit confusing.
Add a macro that indicates the number if maximum links that the FW
supports and use it instead.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.8da9f991526f.I72709f1db90036265c98c5d45682bcf5f36be7ba@changeid
4 weeks agowifi: iwlwifi: mld: always assign a fw id to a vif
Miri Korenblit [Sat, 21 Mar 2026 17:29:14 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: always assign a fw id to a vif

We used to have a fw id assignment in iwl_mld_init_vif since all interface
types that were added to the driver was immediately added to the FW as
well.
Since NAN was introduced, this is no longer the case - the NAN interface
is not added to the fw until a local schedule is configured.

For this vif we don't assign a fw id so it is 0 by default.
But later, when the vif is removed from the driver, we think that it has
a valid fw id (0) and we point fw_id_to_vif[0] to NULL.
fw_id_to_vif[0] might actually point to another vif with a valid fw id
0. In this case, we end up messing fw_id_to_vif.

Fix this by initializing a vif with a special invalid fw id, and by
exiting iwl_mld_rm_vif early for NAN interfaces.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.f3b5cc59098f.I3d1dbe66bd224cbb786c2b0ab3d1c9f7ec9003e4@changeid
4 weeks agowifi: iwlwifi: mld: use the dedicated helper to extract a link
Miri Korenblit [Sat, 21 Mar 2026 17:29:13 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: use the dedicated helper to extract a link

There is a helper, iwl_mld_fw_id_to_link_conf, that converts a fw link
id into the bss_conf structure. Use it in two more places instead of
retrieving the bss_conf directly from the fw-id-to-bss_conf mapping array.

This required changing the loop bound in iwl_mld_process_per_link_stats()
to ucode_capa.num_links, to avoid hitting a IWL_FW_CHECK for link ids
> ucode_capa.num_links and < ARRAY_SIZE(fw_id_to_bss_conf), but this
change makes sense anyway (there is no reason to iterate links that
cannot be valid).

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.f8da2cd2a873.I7fbd3b4a86a5695206bb5083fdac49de9acc9dca@changeid
4 weeks agowifi: iwlwifi: add MAC context command version 4
Johannes Berg [Sat, 21 Mar 2026 17:29:12 +0000 (19:29 +0200)] 
wifi: iwlwifi: add MAC context command version 4

Due to NAN additions, this command needs to grow. In iwlmvm
we just need to use the old _v3 (or v2) version, but iwlmld
needs to handle the difference and send both.  Do that as a
first step towards adding NAN support.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.5ab609ca1966.I860737f952865bd0b997f1c190c3891864c7c6ba@changeid
4 weeks agowifi: iwlwifi: handle NULL/ERR returns from ptp_clock_register()
Avinash Bhatt [Sat, 21 Mar 2026 17:29:11 +0000 (19:29 +0200)] 
wifi: iwlwifi: handle NULL/ERR returns from ptp_clock_register()

ptp_clock_register() returns NULL when PTP support is disabled and may
return an ERR_PTR() on other failures. Reduce Log severity for NULL
return cases to avoid misleading errors when PTP is unavailable.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.adea594600e8.I0e3d3f7ce897c54fff8ace6dd0faf55b4f39832b@changeid
4 weeks agowifi: iwlwifi: mld: add double-include guards to nan.h
Johannes Berg [Sat, 21 Mar 2026 17:29:10 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: add double-include guards to nan.h

This is missing, but needed when we want to add data structures
to this file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.4e09d461db6a.If5c14c495b14a20ce7abadc72be57a40d3462bfb@changeid
4 weeks agowifi: iwlwifi: mld: make alloc functions not forced static
Johannes Berg [Sat, 21 Mar 2026 17:29:09 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: make alloc functions not forced static

In preparation for NAN needing the link ID allocation, have
the macro not automatically make the ID allocation functions
static so we can remove that later from the link allocation
function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.cbfd202c255f.I4dd4d4416d30bed35bc7b7caa3de50071906830a@changeid
4 weeks agowifi: iwlwifi: mld: rename iwl_mld_phy_from_mac80211() argument
Johannes Berg [Sat, 21 Mar 2026 17:29:08 +0000 (19:29 +0200)] 
wifi: iwlwifi: mld: rename iwl_mld_phy_from_mac80211() argument

Calling the channel context just "channel" is confusing since it's
a different struct, rename it to the more appropriate "chanctx".

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.b2cf8cfd5902.I9e0006481454445058b96ec3e7ae338e917e2c50@changeid
4 weeks agowifi: iwlwifi: mld: remove type argument from iwl_mld_add_sta()
Johannes Berg [Fri, 20 Mar 2026 08:09:18 +0000 (10:09 +0200)] 
wifi: iwlwifi: mld: remove type argument from iwl_mld_add_sta()

This is used only in a single place, and the caller always sets
the type to STATION_TYPE_PEER right now. We need to change some
of this for NAN in the future, removing the type argument will
simplify that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.71841a054f16.I1851148e582eb710261740459a46d22720788926@changeid
4 weeks agowifi: iwlwifi: mld: make iwl_mld_mac80211_iftype_to_fw() static
Johannes Berg [Fri, 20 Mar 2026 08:09:17 +0000 (10:09 +0200)] 
wifi: iwlwifi: mld: make iwl_mld_mac80211_iftype_to_fw() static

This function is only used within the file, so make it static.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.45867b060b3d.Iee64056fab7881ea5146433bacef8c2e936c45b1@changeid
4 weeks agowifi: iwlwifi: pcie: don't dump on reset handshake in dump
Johannes Berg [Fri, 20 Mar 2026 08:09:16 +0000 (10:09 +0200)] 
wifi: iwlwifi: pcie: don't dump on reset handshake in dump

When a FW dump happens, possibly even because of a reset handshake
timeout, there's no point in attempting to dump again. Since all the
callers of the function outside the transport itself are from the FW
dump infrastructure, just split the internal function and make the
external one not dump on timeout.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.f36ba3893899.I063ccc3a037ae6dabcde61941acb162c4b33f127@changeid
4 weeks agowifi: iwlwifi: use IWL_FW_CHECK for sync timeout
Johannes Berg [Fri, 20 Mar 2026 08:09:15 +0000 (10:09 +0200)] 
wifi: iwlwifi: use IWL_FW_CHECK for sync timeout

This could be a firmware issue, it didn't send all the responses
quickly enough. There are other potential issues (interrupts not
being delivered, etc.) but the FW debug data will at least give
some better information, and it's not a WARN condition anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.2188e2efbead.I7dc5bd6f581a31ac51d8a854f3b3af4cb980223a@changeid
4 weeks agowifi: iwlwifi: mld: add BIOS revision compatibility check for PPAG command
Pagadala Yesu Anjaneyulu [Fri, 20 Mar 2026 08:09:14 +0000 (10:09 +0200)] 
wifi: iwlwifi: mld: add BIOS revision compatibility check for PPAG command

Prevent potential issues when newer BIOS revisions
are used with firmware that doesn't support them for
PER_PLATFORM_ANT_GAIN_CMD.

Without this check, the driver may attempt to use
BIOS configurations that are incompatible with the
current firmware version, leading to dropping of
command in firmware without any failure notification
to driver.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.79bf2bf398d0.I8161dbe1a04af3738e00ab0fc13fe3dbfa9094ec@changeid
4 weeks agowifi: iwlwifi: validate the channels received in iwl_mcc_update_resp_v*
Miri Korenblit [Fri, 20 Mar 2026 08:09:13 +0000 (10:09 +0200)] 
wifi: iwlwifi: validate the channels received in iwl_mcc_update_resp_v*

Check with IWL_FW_CHECK that the FW doesn't send a channel that we don't
support. Otherwise, the center frequency will be 0, leading to a
warning since is_valid_reg_rule will return false, of course.
Although the warning is verbose enough, the IWL_FW_CHECK will spare some
of the debug.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.0e83cdd88cea.Ic86852e622ed3ec06110f9e6525f72679236cf1e@changeid
4 weeks agowifi: iwlwifi: add CQM event support for per-link RSSI changes
Avinash Bhatt [Fri, 20 Mar 2026 08:09:12 +0000 (10:09 +0200)] 
wifi: iwlwifi: add CQM event support for per-link RSSI changes

Implement CQM RSSI threshold handling by tracking the last reported RSSI
and issuing CQM low/high events when the RSSI crosses the configured
threshold with the required hysteresis. This provides proper CQM support
and enables userspace to receive per-link RSSI notifications.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.08697e34bf66.Ic1a68537ef0d37be62c73c138efe9c5cf09bd24c@changeid
4 weeks agowifi: iwlwifi: mld: eliminate duplicate WIDE_ID in PPAG command handling
Pagadala Yesu Anjaneyulu [Fri, 20 Mar 2026 08:09:11 +0000 (10:09 +0200)] 
wifi: iwlwifi: mld: eliminate duplicate WIDE_ID in PPAG command handling

Extract the PER_PLATFORM_ANT_GAIN_CMD command ID into a local variable
to avoid duplicating WIDE_ID(PHY_OPS_GROUP, PER_PLATFORM_ANT_GAIN_CMD).

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.7b7e6315e2cc.Icffcc47ac1e876708b6219a89fd546a018797d44@changeid
4 weeks agowifi: iwlwifi: fw: Add TLV support for BIOS revision of command
Pagadala Yesu Anjaneyulu [Fri, 20 Mar 2026 08:09:10 +0000 (10:09 +0200)] 
wifi: iwlwifi: fw: Add TLV support for BIOS revision of command

Add support for newer firmware API versions that support
multiple BIOS revisions. Use the new TLV provided by
firmware to determine which BIOS revision it supports.

Future patches will use this information to either
drop commands when the BIOS revision is higher than
supported or convert commands based on the command
specific implementation.

Since we are including now nvm-reg.h in img.h, this causes a
re-definition error of IWL_NUM_CHANNELS which is also defined in
eeprom.c, so rename IWL_NUM_CHANNELS to IWL_NUM_CHANNELS_V2

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.76c8a9589ea0.I7f9157115de702e07511f2c3ed5fcb9ae4c667aa@changeid
4 weeks agowifi: iwlwifi: bump core version for BZ/SC/DR
Miri Korenblit [Fri, 20 Mar 2026 08:09:09 +0000 (10:09 +0200)] 
wifi: iwlwifi: bump core version for BZ/SC/DR

Start supporting Core 102 FW on these devices.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.3b6540a99c1c.Ie2d3bdb3dc1865ad7c865cdcbeefa41d21ea4482@changeid
4 weeks agowifi: iwlwifi: mld: support changing iftype at runtime
Johannes Berg [Fri, 20 Mar 2026 08:09:07 +0000 (10:09 +0200)] 
wifi: iwlwifi: mld: support changing iftype at runtime

While the interface isn't really operating, which is already
required by mac80211, we can simply remove the MAC and add
it again to change the type. Implement this simple handling.

We could almost consider moving this to mac80211 itself, as
this kind of flow should be supportable by any device, but
for now keep it here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.2fb530f9d825.I7cc68fa36e40c9f3bef3be9c2982061cb9ea2300@changeid
4 weeks agowifi: iwlwifi: mld: set UHR MCS in RX status
Johannes Berg [Fri, 20 Mar 2026 08:09:05 +0000 (10:09 +0200)] 
wifi: iwlwifi: mld: set UHR MCS in RX status

Handle UHR MCSes in the RX status when receiving UHR frames.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.7d235ea6a4f2.Ibc8c7e1af45cae2756e4ddcdf6dc5424b3992f7b@changeid
4 weeks agowifi: iwlwifi: mld: enable UHR in TLC
Johannes Berg [Fri, 20 Mar 2026 08:09:04 +0000 (10:09 +0200)] 
wifi: iwlwifi: mld: enable UHR in TLC

Tell the firmware if UHR is supported, including ELR (enhanced
long range) MCS support.

Note that the spec currently doesn't differentiate between 1.5
and 3 Mbps ELR MCSes, unlike the firmware.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260320100746.7117009d7c39.If4e8cdc63fdf4c5f14d923a5c59fb7b43df72a67@changeid
4 weeks agowifi: iwlwifi: mld: remove SCAN_TIMEOUT_MSEC
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:55 +0000 (20:48 +0200)] 
wifi: iwlwifi: mld: remove SCAN_TIMEOUT_MSEC

It has no users

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.ea8d4a381474.I82c1d17faa6de6f16f08573ebb180de8db837bee@changeid
4 weeks agowifi: iwlwifi: remove IWL_MAX_WD_TIMEOUT
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:54 +0000 (20:48 +0200)] 
wifi: iwlwifi: remove IWL_MAX_WD_TIMEOUT

This define is not used, remove it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.15341c4081ed.I639a1d65799ce5502e5c83e8889bcc5eda5ec4dc@changeid
4 weeks agowifi: iwlwifi: uefi: mode the comments valid kerneldoc comments
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:53 +0000 (20:48 +0200)] 
wifi: iwlwifi: uefi: mode the comments valid kerneldoc comments

This will allow to get warnings if we make mistakes while documenting
the uefi structures

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.e9ad48c2cf4a.I867e3eb9581ac2a87772fd2534502c008543bafb@changeid
4 weeks agowifi: iwlwifi: support PER_CHAIN_LIMIT_OFFSET_CMD v6
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:52 +0000 (20:48 +0200)] 
wifi: iwlwifi: support PER_CHAIN_LIMIT_OFFSET_CMD v6

This includes support for UNII-9.
Store the source of the WGDS table in the firmware runtime object to be
able to pass the information to the firmware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.eaff31760dd7.Ic7f56fbbe310833723094f965e7ba3f8624d0ef9@changeid
4 weeks agowifi: iwlwifi: acpi: add support for WGDS revision 4
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:51 +0000 (20:48 +0200)] 
wifi: iwlwifi: acpi: add support for WGDS revision 4

This adds support for UNII-9.
WGDS tables will now have 4 subbands.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.721e9fbabfc9.Ie8bd641cf84aa659d93893438c172c172b67214b@changeid
4 weeks agowifi: iwlwifi: acpi: validate the WGDS table
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:50 +0000 (20:48 +0200)] 
wifi: iwlwifi: acpi: validate the WGDS table

Prefer to use ARRAY_SIZE when we check array-length.
Make sure num_profile isn't bigger than the number of profiles we can
actually store in the firmware runtime object.
Same of the number of bands.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.a398511514ed.Ie4e62e2008f7e117ae7e305967ffadf1a30fc2b1@changeid
4 weeks agowifi: iwlwifi: uefi: add support for WGDS rev4
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:49 +0000 (20:48 +0200)] 
wifi: iwlwifi: uefi: add support for WGDS rev4

This new revision includes support for UNII-9. It adds a subband.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.ad8e49c3a9e1.I51170ba78a706f976e93918d6473185d41e4306d@changeid
4 weeks agowifi: iwlwifi: uefi: open code the parsing of the WGDS table
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:48 +0000 (20:48 +0200)] 
wifi: iwlwifi: uefi: open code the parsing of the WGDS table

We will soon add support for UNII-9 band in the WGDS table. We need to
decouple the UEFI code from the firmware runtime code.
The firmware runtime is just a software object which will need to grow
and UEFI objects need a new revision to grow. Existing systems will keep
the same UEFI objects.

Just like PPAG and SAR, stop using structures to parse the UEFI tables
since the layout depends on the revision.
The support for the new revision will be added in the next patch, for
now, just do the ground work.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.140706e6e91f.I83ca04932bc21aa358119890001e876ced1e1bda@changeid
4 weeks agowifi: iwlwifi: mld: support version 11 of REDUCE_TX_POWER_CMD
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:47 +0000 (20:48 +0200)] 
wifi: iwlwifi: mld: support version 11 of REDUCE_TX_POWER_CMD

This introduces support for UNII-9.
After we increased the size of the arrays of the subbands in SAR
structure, we now support the new firmware command.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.9cea60b78a1b.Ia91c59829af0dc4d6c351c5b09ce33800c1f9e44@changeid
4 weeks agowifi: iwlwifi: acpi: add support for EWRD rev 3 table
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:46 +0000 (20:48 +0200)] 
wifi: iwlwifi: acpi: add support for EWRD rev 3 table

This table includes another sub-band for UNII-9.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.9182284f007e.Ibbe7c1f8442933d29695b9bf56b8e775394c71f8@changeid
4 weeks agowifi: iwlwifi: acpi: add support for WRDS rev 3 table
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:45 +0000 (20:48 +0200)] 
wifi: iwlwifi: acpi: add support for WRDS rev 3 table

This table includes another sub-band for UNII-9.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.06543ec65e00.I73135c7d61bff9b46ad9862d93f4faf923983fd4@changeid
4 weeks agowifi: iwlwifi: uefi: support the new WRDS and EWRD tables
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:44 +0000 (20:48 +0200)] 
wifi: iwlwifi: uefi: support the new WRDS and EWRD tables

Those tables now have support for UNII-9 subband.
Refactor iwl_uefi_set_sar_profile to get an array of values that makes
it easier to use when the number of subbands can vary.
Revamp a bit the code that fetches the tables to ask for the smaller
table, then we can check the size of the object that we got and compare
to the expected sizes to determine what revision to expect.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.6948f69e6ae4.Icf990e13de6905c35a8de69f1445f8eb4aa43ee4@changeid
4 weeks agowifi: iwlwifi: mvm: zero iwl_geo_tx_power_profiles_cmd before sending
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:43 +0000 (20:48 +0200)] 
wifi: iwlwifi: mvm: zero iwl_geo_tx_power_profiles_cmd before sending

Otherwise we may send garbage.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.2d494b0f4692.I9afd0fa6b2ea5a27118144ac4e3bbbedc2089c10@changeid
4 weeks agowifi: iwlwifi: restrict TOP reset to some devices
Johannes Berg [Thu, 19 Mar 2026 18:48:42 +0000 (20:48 +0200)] 
wifi: iwlwifi: restrict TOP reset to some devices

Due to the Bluetooth implementation needing to match, not all
devices can actually do TOP reset. Restrict it to Sc2/Sc2f or
later, with Wh RF or later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.6c4479f4e49d.I5023d70cb33f1e18f7cb15981fc3acfbb00862b7@changeid
4 weeks agowifi: iwlwifi: uefi: add support for PPAG table rev5
Emmanuel Grumbach [Thu, 19 Mar 2026 18:48:41 +0000 (20:48 +0200)] 
wifi: iwlwifi: uefi: add support for PPAG table rev5

This table has another subband for UNII-9.
Add defines for the sizes of rev4 and rev5 to easily know how much data
to ask from iwl_uefi_get_verified_variable.
In case rev5 doesn't exist, fallback to rev4.
Check that the revision advertised by the fetched table matches the size
that we got.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319204647.b9ebcff37599.I1e8bb9cee5a028ed416b6094c0fdbf9f859c6dd8@changeid
4 weeks agowifi: iwlwifi: acpi: add support for PPAG rev5
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:27 +0000 (11:09 +0200)] 
wifi: iwlwifi: acpi: add support for PPAG rev5

This adds support for UNII9 which requires to add a subband.
Just increase the number of subbands that we need to read.

Replace the usage of the IWL_NUM_SUB_BANDS_VX macros in acpi.h since
those macros are defined in the firmware API and ACPI declarations have
nothing to do the firmware API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.a5e7f805d0f2.I0e3ee3258b77b339234692ceccf0d25d1e6dd67e@changeid
4 weeks agowifi: iwlwifi: acpi: check the size of the ACPI PPAG tables
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:26 +0000 (11:09 +0200)] 
wifi: iwlwifi: acpi: check the size of the ACPI PPAG tables

We need to make sure we don't have a buffer overflow while reading the
PPAG tables from ACPI into the firmware runtime object.
Add an ACPI specific define for the number of chains in order to
decouple the ACPI layout from the other objects.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.451808698662.I91234c8a662608674679ce490b51be792332cd43@changeid
4 weeks agowifi: iwlwifi: regulatory: support a new command for PPAG
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:25 +0000 (11:09 +0200)] 
wifi: iwlwifi: regulatory: support a new command for PPAG

Per Platform Antenna Gain is getting support for UNII-9.
Add a new version of PER_PLATFORM_ANT_GAIN_CMD.
This requires to increase the number of subbands in the firmware runtime
object.
Pass the number of subbands to iwl_bios_print_ppag to avoid printing
invalid values.

Introduce BIOS_PPAG_MAX_SUB_BANDS_NUM to avoid impacting
BIOS_SAR_MAX_SUB_BANDS_NUM which was used until now for PPAG as well.
SAR will get support for the new subband in future patches.

While at it, print the PPAG table as it was read from BIOS.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.2e577236d3c9.I042697a73893d79ef761796354b5d1dd8522f734@changeid
4 weeks agowifi: iwlwifi: mld: add support for sta command version 3
Miri Korenblit [Thu, 19 Mar 2026 09:09:23 +0000 (11:09 +0200)] 
wifi: iwlwifi: mld: add support for sta command version 3

In this version, the link_id becomes a link_mask to support multiple
links that are used to communicate with the station in question.
This is needed for NAN, in which we can communicate on multiple channels
with the same station.
Also add a new STA type - NAN peer.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.382a30bd1b70.Id6271e7eba233a11dc214ed2e07c2b186b167c66@changeid
4 weeks agowifi: iwlwifi: bring iwl_fill_ppag_table to the iwlmvm
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:22 +0000 (11:09 +0200)] 
wifi: iwlwifi: bring iwl_fill_ppag_table to the iwlmvm

iwl_fill_ppag_table fills a command that is sent to the firmware. This
command has several versions and handling those different versions is
the responsibility of the op_mode.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.1f9b38ff7d22.I5c7482c074d63cd18533ac83289cc0b26c1be3d2@changeid
4 weeks agowifi: iwlwifi: uefi: open code the PPAG table store operation
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:21 +0000 (11:09 +0200)] 
wifi: iwlwifi: uefi: open code the PPAG table store operation

The structure in firmware runtime will need to grow because we're adding
a subband for UNII-9.
This means that we will soon no longer be able to just memcpy the data
from the UEFI table. The layout of the array will change.
Tediously copy the data byte-byte to make sure things get to the right
place even when we'll increase the number of subbands.
Make it easier for the uefi_cnv_var_ppag structure to grow by
simpiflying the layout it becomes an array of s8.
The layout of the structure becomes less obvious from the structure's
declaration, but then the code is more flexible.

Don't use UEFI_SAR_MAX_SUB_BANDS_NUM for the number of bands for PPAG.
Of course, SAR related structures will grow in future patches, but
decouple SAR and PPAG to make the work easier.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.61e729ea2bde.I9d9cda29f576290bf966f780bf7ad5af34970e6f@changeid
4 weeks agowifi: iwlwifi: mld: Introduce scan command version 18
Ilan Peer [Thu, 19 Mar 2026 09:09:20 +0000 (11:09 +0200)] 
wifi: iwlwifi: mld: Introduce scan command version 18

The FW scan logic was extended to support new channels in the
7 GHz band, as such, the scan command was modified to support
scanning more PSC channels.

Introduce scan command version 18 handling, which is different
from scan command version 17 only in the number of supported
channel configurations.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.c995b4e8bbc5.Ie401d9cf02daaa5e6adf2b3c309643589e3ead71@changeid
4 weeks agowifi: iwlwifi: mld: Refactor scan command handling
Ilan Peer [Thu, 19 Mar 2026 09:09:19 +0000 (11:09 +0200)] 
wifi: iwlwifi: mld: Refactor scan command handling

As a preparation for a new scan command version, refactor
the scan command building such that it would allow introducing
new scan command structures in a simpler way.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.a3e9589769f0.If458023e234ed79db7474107d98f0b6e28e565e5@changeid
4 weeks agowifi: iwlwifi: mld: remove unused scan expire time constants
Pagadala Yesu Anjaneyulu [Thu, 19 Mar 2026 09:09:18 +0000 (11:09 +0200)] 
wifi: iwlwifi: mld: remove unused scan expire time constants

Remove the unused IWL_MLD_SCAN_EXPIRE_TIME_SEC constant from
constants.h and its corresponding IWL_MLD_SCAN_EXPIRE_TIME
macro definition from mlo.c. These definitions are no longer
referenced.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.4be7221113cf.I13e32d575bb854709af374519332b998bc1fed4a@changeid
4 weeks agowifi: iwlwifi: mvm: cleanup some more MLO code
Nidhish A N [Thu, 19 Mar 2026 09:09:17 +0000 (11:09 +0200)] 
wifi: iwlwifi: mvm: cleanup some more MLO code

iwlmld is now the op mode that is used  for EHT devices,
so iwlmvm code can never run in MLO.
Clean up some more MLO code.

Signed-off-by: Nidhish A N <nidhish.a.n@intel.com>
Reviewed-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.8efcec472e91.Icaf4f4d6b9008e12310f408cfef7f35643f27ca5@changeid
4 weeks agowifi: iwlwifi: acpi: better use ARRAY_SIZE than a define
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:16 +0000 (11:09 +0200)] 
wifi: iwlwifi: acpi: better use ARRAY_SIZE than a define

Since we'll have to change things in this area, use the safer option to
define the size of an array.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.1acfc3b6f2b8.I2185e7850146e15628f8ec2c579d93f536c83d83@changeid
4 weeks agowifi: iwlwifi: uefi: decouple UEFI and firmware APIs
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:15 +0000 (11:09 +0200)] 
wifi: iwlwifi: uefi: decouple UEFI and firmware APIs

The APIs in uefi.h are not firmware API files nor are they pure software
objects. They really reflect a specific layout we expect to see in the
UEFI tables.
Since the UEFI objects are encoded into the BIOS, we can't use the same
values for the declaration of the UEFI objects and for the pure software
object like iwl_sar_profile in the firmware runtime object.

Decouple the two types.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.db39a64073db.I21486dedb7357570151437cb0211b697e0efb61d@changeid
4 weeks agowifi: iwlwifi: ensure we don't read SAR values past the limit
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:14 +0000 (11:09 +0200)] 
wifi: iwlwifi: ensure we don't read SAR values past the limit

When we fill the SAR values, we read values from the BIOS store in the
firmware runtime object and write them into the command that we send to
the firmware.
We assumed that the size of the firmware command is not longer than the
BIOS tables. This has been true until now, but this is not really safe.
We will soon have an firmware API change that will increase the size of
the table in the command and we want to make sure that we don't have a
buffer overrun when we read the firmware runtime object.
Add this safety measure.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.99aaf2df072a.I5942590b81324b17e2a369f0c354cafee0f70ef5@changeid
4 weeks agowifi: iwlwifi: mld: add support for iwl_mcc_allowed_ap_type_cmd v2
Emmanuel Grumbach [Thu, 19 Mar 2026 09:09:13 +0000 (11:09 +0200)] 
wifi: iwlwifi: mld: add support for iwl_mcc_allowed_ap_type_cmd v2

There is a new version of this command to indicate which AP type in
UNII-9 is supported per country.

This adds support for a new UEFI table that will include that data to be
filled in the new AP type table.
Rename the uats_table field in firmware_runtime structure since it
includes now the UATS and the new UNEB table coming from UEFI.
For the same reason, rename iwl_mld_init_uats.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.b839655712c5.I3dfca54bd19d6bd5f7ca385ea63be086ece9c1d0@changeid
4 weeks agowifi: iwlwifi: mvm: replace use of system_wq with system_percpu_wq
Marco Crivellari [Tue, 10 Feb 2026 14:33:32 +0000 (15:33 +0100)] 
wifi: iwlwifi: mvm: replace use of system_wq with system_percpu_wq

This patch continues the effort to refactor workqueue APIs, which has begun
with the changes introducing new workqueues and a new alloc_workqueue flag:

   commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
   commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

The point of the refactoring is to eventually alter the default behavior of
workqueues to become unbound by default so that their workload placement is
optimized by the scheduler.

Before that to happen after a careful review and conversion of each individual
case, workqueue users must be converted to the better named new workqueues with
no intended behaviour changes:

   system_wq -> system_percpu_wq
   system_unbound_wq -> system_dfl_wq

This way the old obsolete workqueues (system_wq, system_unbound_wq) can be
removed in the future.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20260210143332.206146-4-marco.crivellari@suse.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
4 weeks agowifi: iwlwifi: fw: replace use of system_unbound_wq with system_dfl_wq
Marco Crivellari [Thu, 20 Nov 2025 10:08:49 +0000 (11:08 +0100)] 
wifi: iwlwifi: fw: replace use of system_unbound_wq with system_dfl_wq

This patch continues the effort to refactor workqueue APIs, which has begun
with the changes introducing new workqueues and a new alloc_workqueue flag:

   commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
   commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

The point of the refactoring is to eventually alter the default behavior of
workqueues to become unbound by default so that their workload placement is
optimized by the scheduler.

Before that to happen after a careful review and conversion of each individual
case, workqueue users must be converted to the better named new workqueues with
no intended behaviour changes:

   system_wq -> system_percpu_wq
   system_unbound_wq -> system_dfl_wq

This way the old obsolete workqueues (system_wq, system_unbound_wq) can be
removed in the future.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20251120100850.66192-3-marco.crivellari@suse.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
4 weeks agowifi: iwlwifi: replace use of system_unbound_wq with system_dfl_wq
Marco Crivellari [Thu, 20 Nov 2025 10:08:48 +0000 (11:08 +0100)] 
wifi: iwlwifi: replace use of system_unbound_wq with system_dfl_wq

This patch continues the effort to refactor workqueue APIs, which has begun
with the changes introducing new workqueues and a new alloc_workqueue flag:

   commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
   commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

The point of the refactoring is to eventually alter the default behavior of
workqueues to become unbound by default so that their workload placement is
optimized by the scheduler.

Before that to happen after a careful review and conversion of each individual
case, workqueue users must be converted to the better named new workqueues with
no intended behaviour changes:

   system_wq -> system_percpu_wq
   system_unbound_wq -> system_dfl_wq

This way the old obsolete workqueues (system_wq, system_unbound_wq) can be
removed in the future.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20251120100850.66192-2-marco.crivellari@suse.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
4 weeks agomedia: renesas: vsp1: Initialize format on all pads
Laurent Pinchart [Wed, 18 Mar 2026 23:59:07 +0000 (01:59 +0200)] 
media: renesas: vsp1: Initialize format on all pads

The state initialization function vsp1_entity_init_state() incorrectly
leaves the last entity pad out when initializing formats due to an off
by one error. Fix it.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-14-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: Implement control events
Laurent Pinchart [Wed, 18 Mar 2026 23:59:06 +0000 (01:59 +0200)] 
media: renesas: vsp1: Implement control events

The V4L2 API requires drivers that expose controls to implement control
notification events. This is enforced by v4l2-compliance. Add event
handling to the VSP1 entities that create controls to fix the compliance
failures.

Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-13-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: histo: Fix format setting
Laurent Pinchart [Wed, 18 Mar 2026 23:59:05 +0000 (01:59 +0200)] 
media: renesas: vsp1: histo: Fix format setting

The histogram .set_fmt() handler suffers from two problems:

- When operating on the source pad, it returns correct information to
  userspace, but does not store the format in the subdev state.
  Subsequent calls to .get_fmt(), handled by the
  vsp1_subdev_get_pad_format() helper, will not return the correct
  information.

- When operating on the sink pad, it uses the
  vsp1_subdev_set_pad_format(), which propagates the sink format to the
  source, incorrectly overwriting the fixed source format.

The first issue could be fixed by implementing the set format operation
with vsp1_subdev_get_pad_format() on the source pad, if it wasn't that
.set_fmt() is also used to initialize the subdev state in
vsp1_entity_init_state(). The histogram would need a custom
.init_state() handler.

As the second issue would anyway overwrite the format, and therefore
requires a custom .set_fmt() implementation, fix both issues without
using the helpers.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-12-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: histo: Fix size enumeration
Laurent Pinchart [Wed, 18 Mar 2026 23:59:04 +0000 (01:59 +0200)] 
media: renesas: vsp1: histo: Fix size enumeration

The histogram supports size enumeration on the sink pad only, as the
source pad outputs a metadata format. The correct error code when
enumeration is not supported is -ENOTTY, not -EINVAL. Fix it.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-11-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: histo: Fix code enumeration
Laurent Pinchart [Wed, 18 Mar 2026 23:59:03 +0000 (01:59 +0200)] 
media: renesas: vsp1: histo: Fix code enumeration

The histogram media bus code enumeration does not check the index when
operating on the source pad, resulting in an infinite loop if userspace
keeps enumerating code without any loop boundary. Fix it by returning an
error for indices larger than 0 as the pad supports a single format.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-10-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: hsit: Fix size enumeration
Laurent Pinchart [Wed, 18 Mar 2026 23:59:02 +0000 (01:59 +0200)] 
media: renesas: vsp1: hsit: Fix size enumeration

The HSIT entity performs format conversion, which leads to incorrect
results with the vsp1_subdev_enum_frame_size() helper. Implement a
custom .enum_frame_size() handler that correctly validates the media bus
code. Size validation is identical to the helper.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-9-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: brx: Fix format propagation
Laurent Pinchart [Wed, 18 Mar 2026 23:59:01 +0000 (01:59 +0200)] 
media: renesas: vsp1: brx: Fix format propagation

The format width and height is never propagated to the BRX source pad,
leaving its initial configuration invalid. Propagate the whole format
from the first sink pad to the source pad instead of only propagating
the media bus code. This fixes compliance with the subdev format
propagation rules.

Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-8-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: rwpf: Fix media bus code and frame size enumeration
Laurent Pinchart [Wed, 18 Mar 2026 23:59:00 +0000 (01:59 +0200)] 
media: renesas: vsp1: rwpf: Fix media bus code and frame size enumeration

The RWPF can't freely convert between all input and output formats. They
support RGB <-> YUV conversion, but HSV formats can't be converted. Fix
the media bus code and frame size enumeration to take this into account
on the source pad.

Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-7-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: rpf: Fix crop width and height clamping
Laurent Pinchart [Wed, 18 Mar 2026 23:58:59 +0000 (01:58 +0200)] 
media: renesas: vsp1: rpf: Fix crop width and height clamping

The vsp1 driver doesn't enforce a minimum value on the RPF crop rectangle
width and height. Empty rectangles are accepted, leading to incorrect
hardware behaviour. Fix it by adding minimum width and height
constraints to the value clamping.

Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-6-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: rpf: Fix crop left and top clamping
Laurent Pinchart [Wed, 18 Mar 2026 23:58:58 +0000 (01:58 +0200)] 
media: renesas: vsp1: rpf: Fix crop left and top clamping

The RPF doesn't enforces the alignment constraint on the sink pad
format, which could have an odd size, possibly down to 1x1. In that
case, the upper bounds for the left and top coordinates clamping would
become negative, cast to a very large positive value. Incorrect crop
rectangle coordinates would then be incorrectly accepted.

A second issue can occur when the requested left and top coordinates are
negative. They are cast to a large unsigned value, clamped to the
maximum. While the calculation will produce valid values for the
hardware, this is not compliant with the V4L2 specification that
requires values to be adjusted to the closest valid value.

Fix both issues by switching to signed clamping, with an explicit
minimum to adjust negative values, and adjusting the clamp bounds to
avoid negative upper bounds.

Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-5-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: Fix code checks in frame size enumeration
Laurent Pinchart [Wed, 18 Mar 2026 23:58:57 +0000 (01:58 +0200)] 
media: renesas: vsp1: Fix code checks in frame size enumeration

The media bus code passed to the .enum_frame_size() operation for the
sink pad is required to be supported by the device, but not to match the
current format. All entities that use the vsp1_subdev_enum_frame_size()
helper, as well as the SRU and UDS entities that implement the operation
manually, perform the check incorrectly.

Fix the issue by implementing the correct code check in the
vsp1_subdev_enum_frame_size(). For the SRU and UDS, to avoid duplicating
code, use the vsp1_subdev_enum_frame_size() as a base and override the
enumerated size on the source pad with entity-specific constraints.

While at it, include the missing <linux/mutex.h> as the code locks
mutexes.

Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-4-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: Store size limits in vsp1_entity
Laurent Pinchart [Wed, 18 Mar 2026 23:58:56 +0000 (01:58 +0200)] 
media: renesas: vsp1: Store size limits in vsp1_entity

Most entities use the vsp1_subdev_enum_frame_size() and
vsp1_subdev_set_pad_format() helper functions to implement the
corresponding subdev operations. Both helpers are given the minimum and
maximum sizes supported by the entity as arguments, requiring each
entity to implement a wrapper.

Replace the function arguments with storing the size limits in the
vsp1_entity structure. This allows dropping most of the
.enum_frame_size() and .set_fmt() wrappers in entities.

Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-3-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: renesas: vsp1: Store supported media bus codes in vsp1_entity
Laurent Pinchart [Wed, 18 Mar 2026 23:58:55 +0000 (01:58 +0200)] 
media: renesas: vsp1: Store supported media bus codes in vsp1_entity

Most entities use the vsp1_subdev_enum_mbus_code() and
vsp1_subdev_set_pad_format() helper functions to implement the
corresponding subdev operations. Both helpers are given the list of
supported media bus codes as arguments, requiring each entity to
implement a wrapper.

Replace the function arguments with storing the supported media bus
codes in the vsp1_entity structure. This allows dropping most of the
.enum_mbus_code() wrappers from entities.

Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-2-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agommc: sdhci-of-aspeed: Handle optional controller reset
Ryan Chen [Tue, 24 Mar 2026 01:58:50 +0000 (09:58 +0800)] 
mmc: sdhci-of-aspeed: Handle optional controller reset

Get the optional reset line for the ASPEED SD controller during probe by
using devm_reset_control_get_optional_exclusive_deasserted().

This allows platforms such as AST2700, which require the SD controller
to be taken out of reset before use, to work with the existing driver.

Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
4 weeks agodt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible
Ryan Chen [Tue, 24 Mar 2026 01:58:49 +0000 (09:58 +0800)] 
dt-bindings: mmc: sdhci-of-aspeed: Add AST2700 compatible

AST2700 SDHCI controller is fully compatible with AST2600.

However, it is necessary to take the AST2700 SD controller out of
reset, so require the 'resets' property.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
4 weeks agomedia: uvcvideo: Add support for P010 pixel format
Oliver Collyer [Fri, 26 Dec 2025 06:57:18 +0000 (06:57 +0000)] 
media: uvcvideo: Add support for P010 pixel format

Add support for the P010 (10-bit Y/UV 4:2:0) pixel format to the
uvcvideo driver. This format is exposed by USB capture devices such as
the Magewell USB Capture HDMI 4K Pro when capturing HDR10 content.

P010 stores 10-bit Y and interleaved UV samples in 16-bit little-endian
words, with data in the upper 10 bits and zeros in the lower 6 bits.
This requires 2 bytes per sample, so bytesperline is wWidth * 2.

V4L2_PIX_FMT_P010 was added to the V4L2 core in commit 5374d8fb75f3
("media: Add P010 video format").

Based on the community DKMS patch from awawa-dev/P010_for_V4L2.

Link: https://github.com/awawa-dev/P010_for_V4L2
Signed-off-by: Oliver Collyer <ovcollyer@mac.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20251226065718.95504-1-ovcollyer@mac.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: uvcvideo: Add D436 and D555 cameras metadata support
Yogev Modlin [Sun, 26 Oct 2025 16:43:03 +0000 (18:43 +0200)] 
media: uvcvideo: Add D436 and D555 cameras metadata support

Add support for Intel RealSense D436 and D555 depth cameras metadata.
These cameras use the D4XX metadata format for transmitting depth and
sensor information.

The D555 camera uses UVC protocol version 1.5, while the D436 uses
an undefined protocol version. Both cameras require the D4XX metadata
format flag to properly handle their metadata streams.

Signed-off-by: Yogev Modlin <yogev.modlin@realsenseai.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20251026-fix-uvc-v4-2-610eb1329600@realsenseai.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: uvcvideo: Change comment to 'Intel RealSense'
Yogev Modlin [Sun, 26 Oct 2025 16:43:02 +0000 (18:43 +0200)] 
media: uvcvideo: Change comment to 'Intel RealSense'

RealSense branding is now independent of Intel. Update all driver
comments referencing "Intel" to "Intel RealSense" to reflect
current ownership. No code logic changes.

Signed-off-by: Yogev Modlin <yogev.modlin@realsenseai.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20251026-fix-uvc-v4-1-610eb1329600@realsenseai.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: uvcvideo: Add a stream backpointer in uvc_video_queue
Ricardo Ribalda [Wed, 18 Mar 2026 20:22:36 +0000 (20:22 +0000)] 
media: uvcvideo: Add a stream backpointer in uvc_video_queue

It is less prone to errors if we add a backpointer to stream from
struct uvc_video_queue.

Refactor the code.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20260318202352.1374443-1-ribalda@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: uvcvideo: Allow userspace to increase the meta buffersize
Ricardo Ribalda [Mon, 9 Mar 2026 15:01:56 +0000 (15:01 +0000)] 
media: uvcvideo: Allow userspace to increase the meta buffersize

Now we have the metadata size hardcoded to 10 KiB, this is a value that
works fine for bulk cameras or frames with no extra metadata. But not
for all usecases.

We have seen some cameras that produce more metadata per frame. Eg:
Frame 1 captured (Bytes: 11154)
Frame 2 captured (Bytes: 11616)
Frame 3 captured (Bytes: 11374)
Frame 4 captured (Bytes: 11132)
Frame 5 captured (Bytes: 11594)
Frame 6 captured (Bytes: 11352)
Frame 7 captured (Bytes: 11110)
Frame 8 captured (Bytes: 11572)
Frame 9 captured (Bytes: 11308)

When this happens, the driver (correctly) marks the metadata as ERROR.

This patch let userspace set bigger buffersize via S_FMT.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20260309-uvc-metadata-dmabuf-v1-3-fc8b87bd29c5@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: uvcvideo: uvc_queue_to_stream(): Support meta queues
Ricardo Ribalda [Mon, 9 Mar 2026 15:01:55 +0000 (15:01 +0000)] 
media: uvcvideo: uvc_queue_to_stream(): Support meta queues

The stream data structure has two queues: the metadata and the data
queues, but uvc_queue_to_stream() only supports the data queue. If we
pass the metadata queue the function will return an invalid pointer.

This patch add a parameter to the function to explicitly tell the
function which queue are we using.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://patch.msgid.link/20260309-uvc-metadata-dmabuf-v1-2-fc8b87bd29c5@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agomedia: uvcvideo: Enable VB2_DMABUF for metadata stream
Ricardo Ribalda [Mon, 9 Mar 2026 15:01:54 +0000 (15:01 +0000)] 
media: uvcvideo: Enable VB2_DMABUF for metadata stream

The UVC driver has two video streams, one for the frames and another one
for the metadata. Both streams share most of the codebase, but only the
data stream declares support for DMABUF transfer mode.

I have tried the DMABUF transfer mode with CONFIG_DMABUF_HEAPS_SYSTEM
and the frames looked correct.

This patch announces the support for DMABUF for the metadata stream.
This is useful for apps/HALs that only want to support DMABUF.

Cc: stable@vger.kernel.org
Fixes: 088ead2552458 ("media: uvcvideo: Add a metadata device node")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://patch.msgid.link/20260309-uvc-metadata-dmabuf-v1-1-fc8b87bd29c5@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
4 weeks agoslab,rcu: disable KVFREE_RCU_BATCHED for strict grace period
Jann Horn [Tue, 24 Mar 2026 21:35:12 +0000 (22:35 +0100)] 
slab,rcu: disable KVFREE_RCU_BATCHED for strict grace period

Disable CONFIG_KVFREE_RCU_BATCHED in CONFIG_RCU_STRICT_GRACE_PERIOD builds
so that kernel fuzzers have an easier time finding use-after-free involving
kfree_rcu().

The intent behind CONFIG_RCU_STRICT_GRACE_PERIOD is that RCU should invoke
callbacks and free objects as soon as possible (at a large performance
cost) so that kernel fuzzers and such have an easier time detecting
use-after-free bugs in objects with RCU lifetime.

CONFIG_KVFREE_RCU_BATCHED is a performance optimization that queues
RCU-freed objects in ways that CONFIG_RCU_STRICT_GRACE_PERIOD can't
expedite; for example, the following testcase doesn't trigger a KASAN splat
when CONFIG_KVFREE_RCU_BATCHED is enabled:
```
struct foo_struct {
  struct rcu_head rcu;
  int a;
};
struct foo_struct *foo = kmalloc(sizeof(*foo),
    GFP_KERNEL | __GFP_NOFAIL | __GFP_ZERO);

pr_info("%s: calling kfree_rcu()\n", __func__);
kfree_rcu(foo, rcu);
msleep(10);
pr_info("%s: start UAF access\n", __func__);
READ_ONCE(foo->a);
pr_info("%s: end UAF access\n", __func__);
```

Signed-off-by: Jann Horn <jannh@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Acked-by: Harry Yoo (Oracle) <harry@kernel.org>
Link: https://patch.msgid.link/20260324-kasan-kfree-rcu-v1-1-ac58a7a13d03@google.com
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
4 weeks agodrm/gem: Improve drm_gem_objects_lookup() kerneldoc
Tvrtko Ursulin [Mon, 16 Mar 2026 09:38:09 +0000 (09:38 +0000)] 
drm/gem: Improve drm_gem_objects_lookup() kerneldoc

Make clear that the returned array has to be free using kvfree().

While at it, fix broken reference to non-existant @objs and allow for more
error codes on failure.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Cc: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260316093809.97267-1-tvrtko.ursulin@igalia.com
[tursulin: fixup spelling]

4 weeks agodrm/msm/dpu: support plane splitting in quad-pipe case
Jun Nie [Thu, 12 Mar 2026 08:28:12 +0000 (16:28 +0800)] 
drm/msm/dpu: support plane splitting in quad-pipe case

The content of every half of screen is sent out via one interface in
dual-DSI case. The content for every interface is blended by a LM
pair in quad-pipe case, thus a LM pair should not blend any content
that cross the half of screen in this case. Clip plane into pipes per
left and right half screen ROI if topology is quad pipe case.
The clipped rectangle on every half of screen is futher handled by two
pipes if its width exceeds a limit for a single pipe.

For non-virtual-plane case, there is always one stage config to serve
a LM or LM pair. So the clipping does not occur when interating stages
in this case. The plane is mapped to 2 pipes only when width or clock
rate exceeds hardware constrain within stage check.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/711324/
Link: https://lore.kernel.org/r/20260312-msm-next-quad-pipe-split-v19-3-4ffa2b06c996@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
4 weeks agodrm/syncobj: Fix xa_alloc allocation flags
Tvrtko Ursulin [Tue, 24 Mar 2026 11:10:19 +0000 (11:10 +0000)] 
drm/syncobj: Fix xa_alloc allocation flags

The xarray conversion blindly and wrongly replaced idr_alloc with xa_alloc
and kept the GFP_NOWAIT. It should have been GFP_KERNEL to account for
idr_preload it removed. Fix it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: fec2c3c01f1c ("drm/syncobj: Convert syncobj idr to xarray")
Reported-by: Himanshu Girotra <himanshu.girotra@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Himanshu Girotra <himanshu.girotra@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260324111019.22467-1-tvrtko.ursulin@igalia.com
4 weeks agodrm/msm/dpu: Defer SSPP allocation until CRTC check
Jun Nie [Thu, 12 Mar 2026 08:28:11 +0000 (16:28 +0800)] 
drm/msm/dpu: Defer SSPP allocation until CRTC check

Currently, mapping plane to SSPP occurs during the plane check phase for
non-virtual plane case. The SSPP allocation and plane mapping occurs during
CRTC check phase for virtual plane case. Defer these SSPP operations until
CRTC check stage to unify the 2 cases, and ease later revisement for
quad-pipe change.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/711322/
Link: https://lore.kernel.org/r/20260312-msm-next-quad-pipe-split-v19-2-4ffa2b06c996@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
4 weeks agodrm/msm/dpu: Extract plane splitting into a dedicated function
Jun Nie [Thu, 12 Mar 2026 08:28:10 +0000 (16:28 +0800)] 
drm/msm/dpu: Extract plane splitting into a dedicated function

dpu_plane_atomic_check_nosspp() currently handles both plane
validation and plane splitting. For better simplicity and to
facilitate future refactoring, move the splitting logic into
its own dedicated function.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/711319/
Link: https://lore.kernel.org/r/20260312-msm-next-quad-pipe-split-v19-1-4ffa2b06c996@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
4 weeks agodrm/msm/dpu: calculate data_width like downstream
Alexander Koskovich [Sun, 22 Mar 2026 18:48:09 +0000 (18:48 +0000)] 
drm/msm/dpu: calculate data_width like downstream

Derive INTF data_width from dce_bytes_per_line rather than
timing->width when DSC is enabled. Use DIV_ROUND_UP to avoid
rounding errors.

Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Tested-by: Pengyu Luo <mitltlatltl@gmail.com> # Lenovo Legion Y700 Gen4 (SM8750)
Patchwork: https://patchwork.freedesktop.org/patch/713333/
Link: https://lore.kernel.org/r/20260322-fix-data-width-calc-v2-1-d5f28136bc4e@pm.me
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
4 weeks agoMerge tag 'perf-tools-fixes-for-v7.0-2-2026-03-23' into perf-tools-next
Namhyung Kim [Wed, 25 Mar 2026 07:06:23 +0000 (00:06 -0700)] 
Merge tag 'perf-tools-fixes-for-v7.0-2-2026-03-23' into perf-tools-next

To get the various fixes for v7.0.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>