]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
3 weeks agogenirq/proc: Runtime size the chip name
Thomas Gleixner [Sun, 17 May 2026 20:02:44 +0000 (22:02 +0200)] 
genirq/proc: Runtime size the chip name

The chip name column in the /proc/interrupt output is 8 characters and
right aligned, which causes visual clutter due to the fixed length and the
alignment. Many interrupt chips, e.g. PCI/MSI[X] have way longer names.

Update the length when a chip is assigned to an interrupt and utilize this
information for the output. Align it left so all chip names start at the
begin of the column.

Update the GDB script as well and disentangle the header maze so it
actually works with all .config combinations.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Link: https://patch.msgid.link/20260517194932.085786035@kernel.org
3 weeks agogenirq: Expose irq_find_desc_at_or_after() in core code
Thomas Gleixner [Sun, 17 May 2026 20:02:39 +0000 (22:02 +0200)] 
genirq: Expose irq_find_desc_at_or_after() in core code

... in preparation for a smarter iterator for /proc/interrupts.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Link: https://patch.msgid.link/20260517194932.005787611@kernel.org
3 weeks agogenirq: Add rcuref count to struct irq_desc
Thomas Gleixner [Sun, 17 May 2026 20:02:34 +0000 (22:02 +0200)] 
genirq: Add rcuref count to struct irq_desc

Prepare for a smarter iterator for /proc/interrupts so that the next
interrupt descriptor can be cached after lookup.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Link: https://patch.msgid.link/20260517194931.917415190@kernel.org
3 weeks agogenirq/proc: Increase default interrupt number precision to four
Thomas Gleixner [Sun, 17 May 2026 20:02:29 +0000 (22:02 +0200)] 
genirq/proc: Increase default interrupt number precision to four

Quite some architectures have four character wide acronyms for architecture
specific interrupts like IPI, NMI, etc.

The default precision of printing the Linux device interrupt numbers is
three, which causes quite some code to play games with adding or omitting
space after the acronym and the colon in order to keep the per CPU numbers
properly aligned.

Increase the default number precision to four in the core code and get rid
of the space games all over the place. At the same time align all
architecture specific descriptor texts left so that they show up in the
same column as the interrupt chip names, which makes the output more
uniform accross architectures. Fix up the GDB script to this new scheme as
well.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260517194931.839482411@kernel.org
3 weeks agogenirq: Calculate precision only when required
Thomas Gleixner [Sun, 17 May 2026 20:02:24 +0000 (22:02 +0200)] 
genirq: Calculate precision only when required

Calculating the precision of the interrupt number column on every initial
show_interrupt() invocation is a pointless exercise as the underlying
maximum number of interrupts rarely changes.

Calculate it only when that number is modified and let show_interrupts()
use the cached value.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260517194931.760664517@kernel.org
3 weeks agogenirq: Cache the condition for /proc/interrupts exposure
Thomas Gleixner [Sun, 17 May 2026 20:02:19 +0000 (22:02 +0200)] 
genirq: Cache the condition for /proc/interrupts exposure

show_interrupts() evaluates a boatload of conditions to establish whether
it should expose an interrupt in /proc/interrupts or not.

That can be simplified by caching the condition in an internal status flag,
which is updated when one of the relevant inputs changes.

The irq_desc::kstat_irq check is dropped because visible interrupt
descriptors always have a valid pointer.

As a result the number of instructions and branches for reading
/proc/interrupts is reduced significantly.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260517194931.680943749@kernel.org
3 weeks agogenirq/manage: Make NMI cleanup RT safe
Thomas Gleixner [Sun, 17 May 2026 20:02:14 +0000 (22:02 +0200)] 
genirq/manage: Make NMI cleanup RT safe

Eventually blocking functions cannot be invoked with interrupts disabled
and a raw spin lock held. Restructure the code so this happens outside of
the descriptor lock held region.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/20260517194931.601972758@kernel.org
3 weeks agogenirq: Expose nr_irqs in core code
Thomas Gleixner [Sun, 17 May 2026 20:02:09 +0000 (22:02 +0200)] 
genirq: Expose nr_irqs in core code

... to avoid function calls in the core code to retrieve the maximum number
of interrupts.

Rename it to 'total_nr_irqs' as 'nr_irqs' is too generic and fix up the
'nr_irqs' reference in the related GDB script as well.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://patch.msgid.link/20260517194931.522168332@kernel.org
3 weeks agoscripts/gdb: Update x86 interrupts to the array based storage
Thomas Gleixner [Sun, 17 May 2026 20:02:04 +0000 (22:02 +0200)] 
scripts/gdb: Update x86 interrupts to the array based storage

x86 changed the interrupt statistics from a struct with individual members
to an counter array. It also provides a corresponding info array with the
strings for prefix and description and an indicator to skip the entry.

Update the already out of sync GDB script to use the counter and the info
array, which keeps the GDB script in sync automatically.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260517194931.442613033@kernel.org
3 weeks agox86/irq: Move IOAPIC misrouted and PIC/APIC error counts into irq_stats
Thomas Gleixner [Sun, 17 May 2026 20:01:59 +0000 (22:01 +0200)] 
x86/irq: Move IOAPIC misrouted and PIC/APIC error counts into irq_stats

The special treatment of these counts is just adding extra code for no real
value. The irq_stats mechanism allows to suppress output of counters, which
should never happen by default and provides a mechanism to enable them for
the rare case that they occur.

Move the IOAPIC misrouted and the PIC/APIC error counts into irq_stats,
mark them suppressed by default and update the sites which increment them.

This changes the output format of 'ERR' and 'MIS' in case there are events
to the regular per CPU display format and otherwise suppresses them
completely.

As a side effect this removes the arch_cpu_stat() mechanism from proc/stat
which was only there to account for the error interrupts on x86 and missed
to take the misrouted ones into account.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260517194931.361942103@kernel.org
3 weeks agox86/irq: Suppress unlikely interrupt stats by default
Thomas Gleixner [Sun, 17 May 2026 20:01:54 +0000 (22:01 +0200)] 
x86/irq: Suppress unlikely interrupt stats by default

Unlikely interrupt counters like the spurious vector and the synthetic APIC
ICR read retry show up in /proc/interrupts with all counts 0 most of the
time.

As these are events which should never happen, suppress them by default and
enable them for output when they actually happen.

This requires a seperate bitmap as the description array is marked
__ro_after_init. With that bitmap in place it becomes RO data.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260517194931.276486277@kernel.org
3 weeks agox86/irq: Make irqstats array based
Thomas Gleixner [Sun, 17 May 2026 20:01:48 +0000 (22:01 +0200)] 
x86/irq: Make irqstats array based

Having the x86 specific interrupt statistics as a data structure with
individual members instead of an array is just stupid as it requires
endless copy and paste in arch_show_interrupts() and arch_irq_stat_cpu(),
where the latter does not even take the latest interrupt additions into
account. The resulting #ifdef orgy is just disgusting.

Convert it to an array of counters, which does not make a difference in the
actual interrupt hotpath increment as the array index is constant and
therefore not any different than the member based access.

But in arch_show_interrupts() and arch_irq_stat_cpu() this just turns into
a loop, which reduces the text size by ~2k (~12%):

   text    data     bss     dec     hex filename
  19643   15250     904   35797    8bd5 ../build/arch/x86/kernel/irq.o
  17355   15250     904   33509    82e5 ../build/arch/x86/kernel/irq.o

Adding a new vector or software counter only requires to update the table
and everything just works. Using the core provided emit function which
speeds up 0 outputs makes it significantly faster.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260517194931.196070643@kernel.org
3 weeks agogenirq/proc: Utilize irq_desc::tot_count to avoid evaluation
Thomas Gleixner [Sun, 17 May 2026 20:01:43 +0000 (22:01 +0200)] 
genirq/proc: Utilize irq_desc::tot_count to avoid evaluation

Interrupts which are not marked per CPU increment not only the per CPU
statistics, but also the accumulation counter irq_desc::tot_count.

Change the counter to type unsigned long so it does not produce sporadic
zeros due to wrap arounds on 64-bit machines and do a quick check for non
per CPU interrupts. If the counter is zero, then simply emit a full set of
zero strings. That spares the evaluation of the per CPU counters completely
for interrupts with zero events.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260517194931.115522199@kernel.org
3 weeks agogenirq/proc: Avoid formatting zero counts in /proc/interrupts
Thomas Gleixner [Sun, 17 May 2026 20:01:38 +0000 (22:01 +0200)] 
genirq/proc: Avoid formatting zero counts in /proc/interrupts

A large portion of interrupt count entries are zero. There is no point in
formatting the zero value as it is way cheeper to just emit a constant
string.

Collect the number of consecutive zero counts and emit them in one go
before a non-zero count and at the end of the line.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://patch.msgid.link/20260517194931.034728540@kernel.org
3 weeks agox86/irq: Optimize interrupts decimals printing
Dmitry Ilvokhin [Sun, 17 May 2026 20:01:33 +0000 (22:01 +0200)] 
x86/irq: Optimize interrupts decimals printing

Monitoring tools periodically scan /proc/interrupts to export metrics as a
timeseries for future analysis and investigation.

In large fleets, /proc/interrupts is polled (often every few seconds) on
every machine. The cumulative overhead adds up quickly across thousands
of nodes, so reducing the cost of generating these stats does have a
measurable operational impact. With the ongoing trend toward higher core
counts per machine, this cost becomes even more noticeable over time,
since interrupt counters are per-CPU. In Meta's fleet, we have observed
this overhead at scale.

Although a binary /proc interface would be a better long-term solution
due to lower formatting (kernel side) and parsing (userspace side)
overhead, the text interface will remain in use for some time, even if
better solutions will be available. Optimizing the /proc/interrupts
printing code is therefore still beneficial.

Function seq_printf() supports rich format string for decimals printing,
but it doesn't required for printing /proc/interrupts per CPU counters,
seq_put_decimal_ull_width() function can be used instead to print per
CPU counters, because very limited formatting is required for this case.
Similar optimization idea is already used in show_interrupts().

As a side effect this aligns the x86 decriptions with the generic
interrupts event descriptions.

Performance counter stats (truncated) for 'sh -c cat /proc/interrupts

Before:

      3.42 msec task-clock        #    0.802 CPUs utilized   ( +-  0.05% )
         1      context-switches  #  291.991 /sec            ( +-  0.74% )
         0      cpu-migrations    #    0.000 /sec
       343      page-faults       #  100.153 K/sec           ( +-  0.01% )
 8,932,242      instructions      #    1.66  insn per cycle  ( +-  0.34% )
 5,374,427      cycles            #    1.569 GHz             ( +-  0.04% )
 1,483,154      branches          #  433.068 M/sec           ( +-  0.22% )
    28,768      branch-misses     #    1.94% of all branches ( +-  0.31% )

0.00427182 +- 0.00000215 seconds time elapsed  ( +-  0.05% )

After:

      2.39 msec task-clock        #    0.796 CPUs utilized   ( +-  0.06% )
         1      context-switches  #  418.541 /sec            ( +-  0.70% )
         0      cpu-migrations    #    0.000 /sec
       343      page-faults       #  143.560 K/sec           ( +-  0.01% )
 7,020,982      instructions      #    1.30  insn per cycle  ( +-  0.52% )
 5,397,266      cycles            #    2.259 GHz             ( +-  0.06% )
 1,569,648      branches          #  656.962 M/sec           ( +-  0.08% )
    25,419      branch-misses     #    1.62% of all branches ( +-  0.72% )

0.00299996 +- 0.00000206 seconds time elapsed  ( +-  0.07% )

Relative speed up in time elapsed is around 29%.

[ tglx: Fixed it up so it applies to current mainline ]

Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/aQj5mGZ6_BBlAm3B@shell.ilvokhin.com
Link: https://patch.msgid.link/20260517194930.949709489@kernel.org
3 weeks agoregulator: mt6363: select CONFIG_IRQ_DOMAIN
Arnd Bergmann [Tue, 26 May 2026 10:19:37 +0000 (12:19 +0200)] 
regulator: mt6363: select CONFIG_IRQ_DOMAIN

When build-testing this driver without CONFIG_IRQ_DOMAIN causes
a compile-time error:

drivers/regulator/mt6363-regulator.c: In function 'mt6363_regulator_probe':
drivers/regulator/mt6363-regulator.c:884:18: error: implicit declaration of function 'irq_find_host' [-Wimplicit-function-declaration]
  884 |         domain = irq_find_host(interrupt_parent);
      |                  ^~~~~~~~~~~~~
drivers/regulator/mt6363-regulator.c:884:16: error: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  884 |         domain = irq_find_host(interrupt_parent);
      |                ^
drivers/regulator/mt6363-regulator.c:896:30: error: implicit declaration of function 'irq_create_fwspec_mapping'; did you mean 'irq_create_of_mapping'? [-Wimplicit-function-declaration]
  896 |                 info->virq = irq_create_fwspec_mapping(&fwspec);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                              irq_create_of_mapping

This is rather hard to trigger because so many other drivers
enable IRQ_DOMAIN already, but I ran into this on an s390
randconfig build.

Ensure this is always enabled using a Kconfig 'select IRQ_DOMAIN'
entry, as we do for all other users of this.

Fixes: 3c36965df808 ("regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260526102003.2527570-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agodt-bindings: display: panel-lvds: Add Riverdi RVT70HSLNWCA0 and RVT101HVLNWC00
Vitor Soares [Fri, 22 May 2026 16:11:08 +0000 (17:11 +0100)] 
dt-bindings: display: panel-lvds: Add Riverdi RVT70HSLNWCA0 and RVT101HVLNWC00

The Riverdi RVT70HSLNWCA0 is a 7.0" WSVGA (1024x600) IPS TFT LCD LVDS
panel used in the Riverdi RVT70HSDNWCA0 display module.

The Riverdi RVT101HVLNWC00 is a 10.1" WXGA (1280x800) IPS TFT LCD LVDS
panel used in the Riverdi RVT101HVDNWC00 display module.

Link: https://download.riverdi.com/RVT70HSLNWCA0/DS_RVT70HSLNWCA0_Rev.1.4.pdf
Link: https://download.riverdi.com/RVT101HVLNWC00/DS_RVT101HVLNWC00_Rev.1.4.pdf
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260522161105.277519-17-ivitro@gmail.com
3 weeks agodrm/panel: fix kernel-doc warning for devm_drm_panel_add()
Dongyang Jin [Thu, 21 May 2026 09:45:45 +0000 (17:45 +0800)] 
drm/panel: fix kernel-doc warning for devm_drm_panel_add()

Use the correct kernel-doc notation for struct members to eliminate
kernel-doc warnings:

Warning: drivers/gpu/drm/drm_panel.c:119 function parameter 'dev'
 not described in 'devm_drm_panel_add'
Warning: drivers/gpu/drm/drm_panel.c:119 function parameter 'dev'
 not described in 'devm_drm_panel_add'

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605210648.RI4ufD66-lkp@intel.com/
Signed-off-by: Dongyang Jin <jindongyang@kylinos.cn>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260521094545.3039207-1-jindongyang@kylinos.cn
3 weeks agodrm/panel: simple: add NEC NL6448BC33-70C
Steffen Trumtrar [Mon, 18 May 2026 07:47:46 +0000 (09:47 +0200)] 
drm/panel: simple: add NEC NL6448BC33-70C

Add NEC NL6448BC33-70C 10.4" 640x480 LCD module support.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260518-v7-1-topic-panel-simple-nl6448bc33-v3-2-21ea14a6e835@pengutronix.de
3 weeks agodt-bindings: display: simple: Add NEC NL6448BC33-70C panel
Steffen Trumtrar [Mon, 18 May 2026 07:47:45 +0000 (09:47 +0200)] 
dt-bindings: display: simple: Add NEC NL6448BC33-70C panel

Add the NEC LCD Technologies,Ltd. NL6448BC33-70C 10.4" 640x480 LCD panel.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260518-v7-1-topic-panel-simple-nl6448bc33-v3-1-21ea14a6e835@pengutronix.de
3 weeks agodrm/panel: simple: Add AM-1280800W8TZQW-T00H
Dario Binacchi [Fri, 15 May 2026 08:22:01 +0000 (10:22 +0200)] 
drm/panel: simple: Add AM-1280800W8TZQW-T00H

Add Ampire, AM-1280800W8TZQW-T00H 10.1" TFT LCD panel timings.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260515082232.1766586-2-dario.binacchi@amarulasolutions.com
3 weeks agodt-bindings: display: simple: Add AM-1280800W8TZQW-T00H
Dario Binacchi [Fri, 15 May 2026 08:22:00 +0000 (10:22 +0200)] 
dt-bindings: display: simple: Add AM-1280800W8TZQW-T00H

Add dt-bindings for 10.1" TFT LCD module from Ampire Co. Ltd.
as part of panel-simple.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260515082232.1766586-1-dario.binacchi@amarulasolutions.com
3 weeks agos390/ism: Drop superfluous zeros in pci_device_id array
Uwe Kleine-König (The Capable Hub) [Fri, 22 May 2026 15:30:09 +0000 (17:30 +0200)] 
s390/ism: Drop superfluous zeros in pci_device_id array

The .driver_data member of the struct pci_device_id array were
initialized by a list expressions to zero without making use of that
value. In this case it's better to not specify a value at all and let
the compiler fill in the zeros. Same for the list terminator that can
better be completely empty.

This patch doesn't introduce changes to the compiled array.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Acked-by: Alexandra Winter <wintera@linux.ibm.com>
Link: https://patch.msgid.link/20260522153010.777081-2-u.kleine-koenig@baylibre.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agoPM: hibernate: Use flexible array for CRC uncompressed buffers
Rosen Penev [Sun, 10 May 2026 21:39:48 +0000 (14:39 -0700)] 
PM: hibernate: Use flexible array for CRC uncompressed buffers

The CRC uncompressed buffer pointer array has the same lifetime as
struct crc_data, but it is currently allocated separately.  That adds
another allocation failure path and a matching cleanup branch without
providing any extra flexibility.

Store the pointer array as a flexible array member and allocate it
together with the crc_data using kzalloc_flex().  The array remains
zero-initialized, while the allocation and error handling become
simpler.

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260510213948.41750-1-rosenp@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 weeks agoriscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes
Trevor Gamblin [Wed, 20 May 2026 13:06:23 +0000 (15:06 +0200)] 
riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes

Update the Muse Pi Pro devicetree with SD card support to match what
was done for the OrangePi RV2 in [1]. More precisely:

- Enable sdhci0 controller with 4-bit bus width
- Configure card detect GPIO with internal pull-up support
- Connect vmmc-supply to buck4 for 3.3V card power
- Connect vqmmc-supply to aldo1 for 1.8V/3.3V I/O switching
- Add dual pinctrl states for voltage-dependent pin configuration
- Support UHS-I SDR25, SDR50, and SDR104 modes
- Add stable MMC device aliases (mmc0 = eMMC, mmc1 = SD card)

[1] https://lore.kernel.org/linux-riscv/20260316-orangepi-sd-card-uhs-v3-0-aefd3b7832df@gmail.com/T/#

Tested-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://lore.kernel.org/linux-riscv/20260316-orangepi-sd-card-uhs-v3-0-aefd3b7832df@gmail.com/T/#
Link: https://patch.msgid.link/20260520130624.1763487-1-a.heider@gmail.com
Signed-off-by: Yixun Lan <dlan@kernel.org>
3 weeks agonet: Avoid checksumming unreadable skb tail on trim
Björn Töpel [Fri, 22 May 2026 12:06:40 +0000 (14:06 +0200)] 
net: Avoid checksumming unreadable skb tail on trim

pskb_trim_rcsum_slow() keeps CHECKSUM_COMPLETE valid by subtracting
the checksum of the bytes removed from the skb tail. That assumes the
removed bytes can be read.

io_uring zcrx skbs may contain unreadable net_iov frags. With fbnic
header/data split, small TCP/IPv4 packets can carry Ethernet padding
in such a frag. ip_rcv_core() trims the skb to iph->tot_len before TCP
sees it, and the CHECKSUM_COMPLETE adjustment then calls
skb_checksum() on the padding.

This is exposed by IPv4 because small TCP/IPv4 frames can be shorter
than the Ethernet minimum payload. TCP/IPv6 frames are large enough in
the normal zcrx path, so they do not hit the same padding trim.

Keep the existing checksum adjustment for readable skbs. If the
remaining packet is fully linear, drop CHECKSUM_COMPLETE and let the
stack validate the packet after trimming. If unreadable payload would
remain, fail the trim; the checksum cannot be adjusted without reading
the trimmed tail.

Also clear skb->unreadable when trimming removes all frags.

Fixes: 65249feb6b3d ("net: add support for skbs with unreadable frags")
Signed-off-by: Björn Töpel <bjorn@kernel.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260522120643.242974-1-bjorn@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
3 weeks agodrm/i915: relocate intel_hpd_cancel_work() call
Jani Nikula [Sat, 16 May 2026 10:18:52 +0000 (13:18 +0300)] 
drm/i915: relocate intel_hpd_cancel_work() call

The i915 and xe calls to display, in particular for
probe/cleanup/suspend/resume, need to be unified. It does not help to
have the related calls scattered around. As a small step forward,
relocate the intel_hpd_cancel_work() call from intel_irq_uninstall() to
i915_driver_remove().

Note that the other intel_irq_uninstall() call sites don't need the
call, as they're on error paths where hotplug hasn't been enabled yet.

Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/20260516101852.1373108-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 weeks agothunderbolt: Limit XDomain response copy to actual frame size
Michael Bommarito [Mon, 25 May 2026 09:28:29 +0000 (05:28 -0400)] 
thunderbolt: Limit XDomain response copy to actual frame size

tb_xdomain_copy() copies req->response_size bytes from the received
packet buffer regardless of the actual frame size.  When a short
response arrives, this reads past the valid frame data in the DMA
pool buffer into stale contents from previous transactions.

Use the minimum of frame size and expected response size for the
copy length.

Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
3 weeks agothunderbolt: Validate XDomain request packet size before type cast
Michael Bommarito [Mon, 25 May 2026 09:28:28 +0000 (05:28 -0400)] 
thunderbolt: Validate XDomain request packet size before type cast

tb_xdp_handle_request() casts the received packet buffer to
protocol-specific structs without verifying that the allocation
is large enough for the target type.  A peer can send a minimal
XDomain packet that passes the generic header length check but is
shorter than the struct accessed after the cast, causing out-of-
bounds reads from the kmemdup allocation.

Plumb the packet length through xdomain_request_work and validate
it against the expected struct size before each cast.

Fixes: 8e1de7042596 ("thunderbolt: Add support for XDomain lane bonding")
Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
3 weeks agothunderbolt: Clamp XDomain response data copy to allocation size
Michael Bommarito [Mon, 25 May 2026 09:28:27 +0000 (05:28 -0400)] 
thunderbolt: Clamp XDomain response data copy to allocation size

tb_xdp_properties_request() derives the per-packet copy length from
the response header without checking that it fits in the previously
allocated data buffer.  A malicious peer can set its length field
larger than the declared data_length, causing memcpy to write past
the kcalloc allocation.

Clamp the per-packet copy length so that the cumulative offset
never exceeds data_len.

Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
3 weeks agothunderbolt: Bound root directory content to block size
Michael Bommarito [Mon, 25 May 2026 09:28:26 +0000 (05:28 -0400)] 
thunderbolt: Bound root directory content to block size

__tb_property_parse_dir() does not check that content_offset +
content_len fits within block_len for the root directory case.
When rootdir->length equals or exceeds block_len - 2, the entry
loop reads past the allocated property block.

Add a bounds check after computing content_offset and content_len
to reject directories whose content extends past the block.

Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
3 weeks agothunderbolt: Reject zero-length property entries in validator
Michael Bommarito [Mon, 25 May 2026 09:28:25 +0000 (05:28 -0400)] 
thunderbolt: Reject zero-length property entries in validator

tb_property_entry_valid() accepts entries with length == 0 for
DIRECTORY, DATA, and TEXT types.  A zero-length TEXT entry passes
validation but causes an underflow in the null-termination logic:

  property->value.text[property->length * 4 - 1] = '\0';

When property->length is 0 this writes to offset -1 relative to
the allocation.

Reject zero-length entries early in the validator since they have no
valid representation in the XDomain property protocol.

Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
3 weeks agoRDMA/core: Move flow related functions to ib_uverbs_support.ko
Jason Gunthorpe [Tue, 26 May 2026 01:22:42 +0000 (22:22 -0300)] 
RDMA/core: Move flow related functions to ib_uverbs_support.ko

mlx5 uses these as part of the driver implementation, move them to the
support module instead.

Link: https://patch.msgid.link/r/6-v3-43aba1969751+1988-ib_uverbs_support_ko_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
3 weeks agoRDMA/core: Move ucaps into ib_uverbs_support.ko
Jason Gunthorpe [Tue, 26 May 2026 01:22:41 +0000 (22:22 -0300)] 
RDMA/core: Move ucaps into ib_uverbs_support.ko

mlx5 uses these move them into the support module from ib_uverbs.ko.

Link: https://patch.msgid.link/r/5-v3-43aba1969751+1988-ib_uverbs_support_ko_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
3 weeks agoRDMA/core: Make a new module for the uverbs components needed by drivers
Jason Gunthorpe [Tue, 26 May 2026 01:22:40 +0000 (22:22 -0300)] 
RDMA/core: Make a new module for the uverbs components needed by drivers

To maintain the split where ib_uverbs.ko should not be depended on by
drivers, add a new module ib_uverbs_support.ko which contains the driver
called functions that are too large or too rare to be placed in
ib_uverbs_core.ko

Start by moving most of rdma_core.c into this module, making some
adjustments to split it from the actual uverbs FD code.

This was not done originally because we lacked EXPORT_SYMBOL_NS and I had
a fear that drivers would abuse this interface surface.

Link: https://patch.msgid.link/r/4-v3-43aba1969751+1988-ib_uverbs_support_ko_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
3 weeks agoRDMA/core: Remove uverbs_async_event_release()
Jason Gunthorpe [Tue, 26 May 2026 01:22:39 +0000 (22:22 -0300)] 
RDMA/core: Remove uverbs_async_event_release()

Instead of having an alternative fops release always use the standard
uverbs_uobject_fd_release() and route the special async behavior back up
through uverbs_obj_fd_type ops pointer.

This removes a dependency where the technically lower level rdma_core.c is
referring to a symbol from uverbs_std_types_async_fd.c.

Link: https://patch.msgid.link/r/3-v3-43aba1969751+1988-ib_uverbs_support_ko_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
3 weeks agoRDMA/core: Move many of the little EXPORTs from uverbs_ioctl into ib_core_uverbs
Jason Gunthorpe [Tue, 26 May 2026 01:22:38 +0000 (22:22 -0300)] 
RDMA/core: Move many of the little EXPORTs from uverbs_ioctl into ib_core_uverbs

Not as many drivers need these functions but it does free efa from the
ib_uverbs.ko dependency and follows the general design better.

Link: https://patch.msgid.link/r/2-v3-43aba1969751+1988-ib_uverbs_support_ko_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
3 weeks agoRDMA/core: Do not compile ib_core_uverbs without USER_ACCESS
Jason Gunthorpe [Tue, 26 May 2026 01:22:37 +0000 (22:22 -0300)] 
RDMA/core: Do not compile ib_core_uverbs without USER_ACCESS

Remove the entire ib_core_uverbs.c from the build if
CONFIG_INFINIBAND_USER_ACCESS is not set. These functions are only used to
support uverbs and are never callable even if they happen to get linked
in.

Provide inlines for the missing ones to return errors to further push code
elimination in drivers.

Link: https://patch.msgid.link/r/1-v3-43aba1969751+1988-ib_uverbs_support_ko_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
3 weeks agopowercap: intel_rapl: Fix memory leak in rapl_add_package_cpuslocked()
Sumeet Pawnikar [Fri, 15 May 2026 18:26:16 +0000 (23:56 +0530)] 
powercap: intel_rapl: Fix memory leak in rapl_add_package_cpuslocked()

When topology_physical_package_id()/topology_logical_die_id() returns
a negative value, rapl_add_package_cpuslocked() returns ERR_PTR(-EINVAL)
directly without freeing the rapl_package structure that was just
allocated by kzalloc_obj(), leaking memory on every failed package
addition.

Use the existing err_free_package label so that the allocation is
released on the error path.

Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
Link: https://patch.msgid.link/20260515182616.227707-1-sumeet4linux@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 weeks agowifi: iwlwifi: mld: fix indentation in iwl_mld_fill_supp_rates()
Dongyang Jin [Tue, 19 May 2026 06:02:59 +0000 (14:02 +0800)] 
wifi: iwlwifi: mld: fix indentation in iwl_mld_fill_supp_rates()

Fix the following inconsistent indentation warnings reported by smatch:

smatch warnings:
drivers/net/wireless/intel/iwlwifi/mld/tlc.c:454 iwl_mld_fill_supp_rates() warn: inconsistent indenting

There's an extra tab, remove it.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605170928.yPTN7kOn-lkp@intel.com/
Signed-off-by: Dongyang Jin <jindongyang@kylinos.cn>
Link: https://patch.msgid.link/20260519060259.2327712-1-jindongyang@kylinos.cn
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: transport: add memory read under NIC access
Johannes Berg [Sun, 17 May 2026 07:59:59 +0000 (10:59 +0300)] 
wifi: iwlwifi: transport: add memory read under NIC access

Add functions to be able to do memory read under NIC access,
in order to use them later during firmware dump. These may
drop and re-acquire the spinlock, but will not acquire and
release the NIC access.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.7bb1ea51c347.I91420a24fb0c481c75a2600d60e1365c15c1c5a9@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: dbg: remove unused 'range_len' arg from dump
Johannes Berg [Sun, 17 May 2026 07:59:58 +0000 (10:59 +0300)] 
wifi: iwlwifi: dbg: remove unused 'range_len' arg from dump

None of the functions use this, and it's not really passed the
length of the specific range anyway, but rather the entire
remaining size. Remove the unused argument.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.ea3502f97c2a.I4ce08f0ea7ea3bacd4928b427c0710b77259d002@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fw: separate out old-style dump code
Johannes Berg [Sun, 17 May 2026 07:59:57 +0000 (10:59 +0300)] 
wifi: iwlwifi: fw: separate out old-style dump code

There are two dump paths: new "ini" style, and the old,
more driver-centric, way. Separate out the code for the
old way into a separate dbg-old.c file, to simplify.

Fix a typo ('trasport') along the way.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.1de0f1110d5a.I4faebe15192a1f27cb4b7270fb52154f06eb2a10@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fw: dbg: always use non-tracing PRPH access
Johannes Berg [Sun, 17 May 2026 07:59:56 +0000 (10:59 +0300)] 
wifi: iwlwifi: fw: dbg: always use non-tracing PRPH access

The iwl_{read,write}_prph_no_grab() functions will trace each
access, but in debug dump a lot of accesses already use the
transport versions of these functions directly. Since the data
(register addresses and their content) is going into the dump
file, tracing isn't really needed. Use the transport functions
in all places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.bbc7623a0348.I827729916da8f264befbcb90ac6509c359ee97a3@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fw: separate ini dump allocation
Johannes Berg [Sun, 17 May 2026 07:59:55 +0000 (10:59 +0300)] 
wifi: iwlwifi: fw: separate ini dump allocation

Separate out the ini dump allocation to happen before the
actual dumping in preparation for better device MAC access.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.01a65fd9e6de.If9b648a5565671801c15be898f2b89afdb878256@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: fw: move struct iwl_fw_ini_dump_entry to dbg.c
Johannes Berg [Sun, 17 May 2026 07:59:54 +0000 (10:59 +0300)] 
wifi: iwlwifi: fw: move struct iwl_fw_ini_dump_entry to dbg.c

This is only used/needed in this file, so move it to clarify
that it's not part of any external API.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.72b02319e812.I5cf95f64e3c3c688871bfabbe4fd7393b63a7dc8@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: clean up location format/BW encoding
Johannes Berg [Sun, 17 May 2026 07:59:53 +0000 (10:59 +0300)] 
wifi: iwlwifi: clean up location format/BW encoding

This is all fairly manual, with the shifts etc., and
the documentation has to call out the specific bits
(which also isn't usable for our tracing data). Add
an enum that directly declares the bit masks for it
and then use the more modern u8_encode_bits().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.bc09f4f6fd29.I315f15856eb36f0490b8f5008537d3e0ffc215f2@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: Add names for Killer BE1735x and BE1730x
Shahar Tzarfati [Sun, 17 May 2026 07:59:52 +0000 (10:59 +0300)] 
wifi: iwlwifi: Add names for Killer BE1735x and BE1730x

The devices were supported but had no name in the driver.
Add the correct names for these devices.

Signed-off-by: Shahar Tzarfati <shahar.tzarfati@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.359f865f0920.Ie73648dd75f9c7d9e9a707311bd4d724d83b8763@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: move iwl_trans_activate_nic to iwl-trans.c
Emmanuel Grumbach [Sun, 17 May 2026 07:59:51 +0000 (10:59 +0300)] 
wifi: iwlwifi: move iwl_trans_activate_nic to iwl-trans.c

This function reaches the transport eventually so move it to
iwl-trans.c. Now we can remove the include to the pcie transport's
internal header from iwl-io.c

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260517100550.0d433fb04d51.I50c48e3f4abe23236d3735236dac250588780f6a@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: move pcie content to pcie internal transport
Emmanuel Grumbach [Sun, 17 May 2026 07:59:50 +0000 (10:59 +0300)] 
wifi: iwlwifi: move pcie content to pcie internal transport

The iwl_txq, iwl_pcie_first_tb_buf and iwl_pcie_txq_entry don't need to
be exported to the op_mode in iwl-trans.h. Declare those in the
transport's internal header file to avoid pollution.
iwl_trans_pcie_send_hcmd can also be moved to the internal header file.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260517100550.208921548b4b.I76b1ac8499275e6d231880861e3843278f278c34@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: keep healthy link on EMLSR missed beacon exit
Avinash Bhatt [Sun, 17 May 2026 07:59:49 +0000 (10:59 +0300)] 
wifi: iwlwifi: mld: keep healthy link on EMLSR missed beacon exit

When EMLSR exits due to beacon loss on the current link, the driver
should keep the link that is still receiving beacons. The previous
code always called get_primary_link(), keeping the primary link
regardless of which link is actually losing beacons. If the primary
link is the one losing beacons, the driver exits EMLSR onto the
degraded link and the connection is lost eventually.

When both links lose beacons, keep the primary link. When only the
current link loses beacons -- whether due to signal loss or a BSS
parameter change -- keep the other link.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260517100550.b2d700f7775e.I8e9189ce6cf4388878beab14e56341becd5f427c@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: skip MLO scan trigger when AP has no QBSS Load IE
Avinash Bhatt [Sun, 17 May 2026 07:59:48 +0000 (10:59 +0300)] 
wifi: iwlwifi: mld: skip MLO scan trigger when AP has no QBSS Load IE

When FW PHY statistics report high channel load (MCLM), the driver
triggers an internal MLO scan to find a better link. However, link grade
computation uses the QBSS Load IE from AP beacons, not MCLM data. If
the AP does not broadcast a QBSS Load IE, the scan produces no benefit
as the grade falls back to static band defaults regardless, and the same
bad link will be selected anyway as the active link.

Skip the MLO scan trigger when the AP does not advertise a QBSS Load IE.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260517100550.621538e20244.I7fdccb759508f32991cc06774cc7621725a58bd3@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: bump maximum core version for BZ/SC/DR to 105
Miri Korenblit [Sun, 17 May 2026 07:59:47 +0000 (10:59 +0300)] 
wifi: iwlwifi: bump maximum core version for BZ/SC/DR to 105

Start supporting Core 105 FW on these devices.

Link: https://patch.msgid.link/20260517100550.8674feeafcad.I3d3ae3a7acb976a947cd7e65a8d7fb8199d2e1ab@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: purge async notifications upon nic error
Miri Korenblit [Sun, 17 May 2026 07:59:46 +0000 (10:59 +0300)] 
wifi: iwlwifi: mld: purge async notifications upon nic error

This fixes a kernel panic in reconfig failure:

1. we have a BSS connection
2. we have a NAN connection
3. FW error occurs
4. reconfig restores the BSS connection
5. however, restoring the NAN connection fails due to a FW error.
6. erroneously, ieee80211_handle_reconfig_failure is called and marks all
   interfaces as not-in-driver (will be fixed in a different patch).
7. mac80211 frees the links of the BSS connection but doesn't tell the
   driver about that, as it thinks that this vif is not in the driver.
8. in ieee80211_stop_device, *ALL* wiphy works are getting flushed
   (erroneously?)
9. Therefore, async_handlers_wk is being executed, processing the
   statistics notification that was received after we restored the BSS
   connection.
10. the notification handler dereferences fw_id_to_bss_conf[id], which is
    now a dangling pointer, as mac80211 already freed this link in (7).
11. On the first access to one of the links fields, we panic.

While this can and should be fixed by removing the call to
ieee80211_handle_reconfig_failure in (6), it is also not a good idea to
carry and maybe handle notifications from a dead FW.

We do purge the notifications when we stop the FW, but in reconfig
failure we stop the FW too late, after the notifications are processed.
In addition, async_handlers_wk can always be scheduled before the
reconfig work.

Purge the notifications immediately when transport notifies about a nic
error.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.4414228bf1d1.I1926a2b2e7827eaac22882699880ec04a3cb95f0@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: don't flush async_handlers_wk when canceling notifications
Miri Korenblit [Sun, 17 May 2026 07:59:45 +0000 (10:59 +0300)] 
wifi: iwlwifi: mld: don't flush async_handlers_wk when canceling notifications

iwl_mld_cancel_async_notifications does 2 things: it purges the list of
notifications and flushes the async_handlers_wk.

We call iwl_mld_cancel_async_notifications after we stopped or suspended
the fw. So in that stage we don't expect any new notification coming,
and if erroneously there are new notifications coming, the work will be
queued again anyway, so the flush is pretty much pointless.

iwl_mld_cancel_async_notifications will need to be called in a context
w/o the wiphy lock held, and the only reason why this function requires
the lock being held is for flushing the work.

Remove the flush.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260517100550.70dddca96191.I06d3c6433ec22f81f2fb3fb2ee43881e662c5212@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: disallow puncturing in US/CA for WH
Pagadala Yesu Anjaneyulu [Fri, 15 May 2026 12:09:48 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: disallow puncturing in US/CA for WH

FM continues to follow the BIOS/MCC policy, while WH sets
DISALLOW_PUNCTURING for US/CA and clears it for other MCC values.
Update the MCC handling accordingly.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260515150751.df1f1fdd141f.I900c9e2e3dd722619db12ba10d0879a56a2a55f2@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: expose beacon avg signal
Shahar Tzarfati [Fri, 15 May 2026 12:09:47 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: expose beacon avg signal

Store beacon_average_energy from per-link FW statistics and expose it
via station_info as rx_beacon_signal_avg in sta statistics.

This fixes missing beacon average signal reporting to upper layers.

Signed-off-by: Shahar Tzarfati <shahar.tzarfati@intel.com>
Link: https://patch.msgid.link/20260515150751.a74a22d90890.I74d596359c5b69364fb977fdf31396eb57ca0927@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: pcie: add two LNL PCI IDs
Johannes Berg [Fri, 15 May 2026 12:09:46 +0000 (15:09 +0300)] 
wifi: iwlwifi: pcie: add two LNL PCI IDs

Add two PCI IDs for two WiFi-7 BE1735x Killer devices (these
are CRFs) so they work when put into the LNL platform.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515150751.d2e3c380227a.I791eef3dedc11a8b246ce3130a34018886e63d3f@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: api: clean up/fix some kernel-doc references
Johannes Berg [Fri, 15 May 2026 12:09:45 +0000 (15:09 +0300)] 
wifi: iwlwifi: api: clean up/fix some kernel-doc references

Some of these structs just don't exist (any more), or other
versions should be referenced, clean that up.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515150751.1e65dc357cbf.I454805593324e51ff71ec5e6bac83aa6dace5383@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: api: remove NAN_GROUP
Johannes Berg [Fri, 15 May 2026 12:09:44 +0000 (15:09 +0300)] 
wifi: iwlwifi: api: remove NAN_GROUP

This is no longer used by the driver nor supported by firmware,
and the kernel-doc reference to enum iwl_nan_subcmd_ids is long
dead. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515150751.1427beb76b0a.I6faacff99020984b14a76d9387f3aaa6281f3552@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add link and link station FW IDs to debugfs
Johannes Berg [Fri, 15 May 2026 12:09:43 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: add link and link station FW IDs to debugfs

Add the link and link station FW IDs to debugfs to aid debug
and testing, since assignments can't be known ahead of time,
especially with ID randomisation turned on.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515150751.7224fab5fe8d.Ic2fd82f5f20945aa070ac9e38882fcff2172a4d8@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: rename LINK_DEBUGFS_WRITE_FILE_OPS
Johannes Berg [Fri, 15 May 2026 12:09:42 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: rename LINK_DEBUGFS_WRITE_FILE_OPS

These are with wiphy mutex held, so rename the macro to
LINK_DEBUGFS_WIPHY_WRITE_FILE_OPS indicating that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515150751.5bff36ea7dd0.I62b01f83b622f281257fb842d9cc00b28dc2f5e1@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Disallow using a per-STA GTK for Tx
Ilan Peer [Fri, 15 May 2026 12:09:41 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: Disallow using a per-STA GTK for Tx

When a GTK is configured for a station, it can only be used for Rx
and never for Tx. In such a case, set the IWL_SEC_KEY_FLAG_NO_TX
flag when the key is installed, so the FW will not use it for Tx.

Specifically, this is needed for per-station GTK installed on NAN
NDI stations associated with NAN Data interfaces.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515150751.b004744087cb.I25fb83f9e3dc563d122a160da150d793155513fa@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: print UHR rate type
Daniel Gabay [Fri, 15 May 2026 12:09:40 +0000 (15:09 +0300)] 
wifi: iwlwifi: print UHR rate type

Log "UHR" in rs_pretty_print_rate() instead of "Unknown".

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Link: https://patch.msgid.link/20260515150751.768874507c43.I3cffe81612cd0f2fc218ab26ae2aa3e9ba541a15@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: reduce the log level of firmware debug buffer size mismatch
Emmanuel Grumbach [Fri, 15 May 2026 12:09:39 +0000 (15:09 +0300)] 
wifi: iwlwifi: reduce the log level of firmware debug buffer size mismatch

This is not really an error and we can safely reduce the log level to
INFO.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260515150751.36a772e925aa.I0f8db3099bd07e72ee007b322c0f85102f0550f9@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: evacuate NAN channels on link switch
Miri Korenblit [Fri, 15 May 2026 12:09:38 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: evacuate NAN channels on link switch

The FW API doesn't allow a station (of certain types, including
STATION_TYPE_PEER) to not be correlated to any link. Therefore,
when switching links, mac80211 first adds the new link and then
removes the old one.

In case we have a NAN interface that operates on 3 links and a
BSS interface that operates on the 4th link, there won't be any
room to perform a link switch that temporarily needs two links
for the BSS interface, but the firmware only has four total.

To mitigate this, try to evacuate a NAN channel in this scenario:
First try to evacuate a NAN channel using the same phy as the BSS
link being deactivated, since we expect NAN to follow the BSS
channel configuration. If that doesn't work, try to evacuate any
NAN channel.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515150751.a193c0f41b1f.I1d56c8d8d61d110422271971843b71a93f5ec354@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: implement UHR multi-link PM
Johannes Berg [Fri, 15 May 2026 12:09:37 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: implement UHR multi-link PM

For multi-link power management, the driver really only needs
to advertise the capability and tell the firmware that the AP
has it. Implement this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260515150751.a28557532e2b.Id35c7f7c319c36daf8ef35fec28940d4db6fc253@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add UHR DUO support
Johannes Berg [Fri, 15 May 2026 12:09:36 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: add UHR DUO support

The firmware needs to know whether or not DUO (assisting) is
supported by the AP, and we should claim DUO support ourselves.
Implement this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260515150751.c006eda0139a.I2b1b540c256d29b3b6af21f7eacbe1f549734e9f@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add support for deferred nan schedule config
Avraham Stern [Fri, 15 May 2026 12:09:35 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: add support for deferred nan schedule config

Add support for deferred schedule update. Notify mac80211 that the
schedule update is done when the firmware notifies that the schedule
is applied.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20260515150751.a69730d26890.I2ae54cbed8b507e6398a55c19795b27d5ea03aba@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: nan: add availability attribute to schedule config
Avraham Stern [Fri, 15 May 2026 12:09:34 +0000 (15:09 +0300)] 
wifi: iwlwifi: mld: nan: add availability attribute to schedule config

Add the availability attribute to the schedule config command. The
firmware needs to add this attribute to schedule update frames
(e.g. when ULW changed or the local schedule changed).

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20260515150751.97809376508e.Ie7f00f97992016c6bb2f4a5c9fc201ac58eed8ce@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: set correct key mask for NAN
Johannes Berg [Wed, 13 May 2026 05:44:02 +0000 (08:44 +0300)] 
wifi: iwlwifi: mld: set correct key mask for NAN

For NAN data, the supplicant may derive and install GTKs to
transmit with. As multicast data encryption is supported only
with firmware versions that support adding NAN multicast
data station, allow GTK installation only with such FW
versions. Otherwise, do not install the GTK to the device.

For NAN management, there are no GTKs, but there are IGTKs
and BIGTKs, which need to be installed for the NAN broadcast
and NAN management stations. This is supported only with
firmware versions that allow adding NAN broadcast station
and NAN management station.

Handle both of these cases by adjusting the station mask
appropriately, returning a zero station mask for the GTK
and allowing that to not be an error/warning message.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Co-developed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260513084215.7e18e0718d22.Icbf4204a9f1190eb4102016ad5f1c5bdab49635b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Add support for NAN multicast data
Ilan Peer [Wed, 13 May 2026 05:44:01 +0000 (08:44 +0300)] 
wifi: iwlwifi: mld: Add support for NAN multicast data

The FW added a new station type to allow NAN multicast
data to be transmitted. The queue of the station is
opened by the firmware when all the NAN Peer NDI stations
associated with the NDI are scheduled at the same time.

Add the corresponding support in iwlmld:

- When a NAN data interface is added, add a NAN multicast
  data station and allocate a queue to it.
- When a NAN data interface is removed, remove the NAN
  multicast station.
- On the Tx path, when a multicast data frame is received
  on a NAN data interface, direct it to the NAN multicast
  data queue.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260513084215.1d8e3463717d.I57deaea42bce9afee63f284a57eb8755485e7ea8@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Replace static declarations of IWL_MLD_ALLOC_FN
Ilan Peer [Wed, 13 May 2026 05:44:00 +0000 (08:44 +0300)] 
wifi: iwlwifi: mld: Replace static declarations of IWL_MLD_ALLOC_FN

Replace static declarations of IWL_MLD_ALLOC_FN with a new macro
IWL_MLD_ALLOC_FN_STATIC that declares the static.

This is needed to resolve issues with spatch, which fails to handle
functions after "static IWL_MLD_ALLOC_FN".

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260513084215.861e4554157d.Id07d4037c75f3ebc8a57ac95b14286369fb3467b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: define MODULE_FIRMWARE with the correct API
Miri Korenblit [Wed, 13 May 2026 05:43:59 +0000 (08:43 +0300)] 
wifi: iwlwifi: define MODULE_FIRMWARE with the correct API

A firmware API of a mix and match (MAC + RF) is the lower one of the
two. But the MODULE_FIRMWARE of QU/QUZ/SO/MA/TY with GF/HR, was defined
using the max API of GF/HR, which is 100, instead of the max API of
QU/QUZ/SO/MA/TY, which are API 77/89.
Therefore, the wrong firmware files were published in the modinfo,
leading to missing firmware files.

Fix this by using the right API when declaring MODULE_FIRMWARE.

While at it, add a IWL_FW_AND_PNVM entry for SO and GF4, that was
missing.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260513084215.c8dcacbeb616.I3d51a9daeda6fb7f52b3014101db79fdc98295d5@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: bump core version for BZ/SC/DR to 104
Miri Korenblit [Wed, 13 May 2026 05:43:58 +0000 (08:43 +0300)] 
wifi: iwlwifi: bump core version for BZ/SC/DR to 104

Start supporting Core 104 FW on these devices.

Link: https://patch.msgid.link/20260513084215.9d584ef19b3c.I2b5b08ff63f8fafda6bc888b597615ad7d34f537@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: update link grading tables per bandwidth
Avinash Bhatt [Wed, 13 May 2026 05:43:57 +0000 (08:43 +0300)] 
wifi: iwlwifi: mld: update link grading tables per bandwidth

Replace single RSSI-to-grade table with separate tables for each
operational bandwidth. Grade selection now depends on both RSSI and
the link's operational bandwidth.

Improve puncturing penalty calculation to apply proportional reduction
based on unusable spectrum percentage rather than absolute channel count.

Update existing KUnit tests with RSSI values for new grading tables.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Tested-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260513084215.9f848b0da851.Id239216fda62e25d343495696cc60742e57d56ea@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: implement PSD/EIRP RSSI adjustment
Avinash Bhatt [Wed, 13 May 2026 05:43:56 +0000 (08:43 +0300)] 
wifi: iwlwifi: mld: implement PSD/EIRP RSSI adjustment

APs operating in PSD mode increase transmit power with bandwidth,
requiring RSSI compensation for accurate link grading.

Parse TPE elements to determine power mode and apply RSSI adjustment
based on operational bandwidth and power constraints.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260513084215.ff1c5ba7491f.I2403678e34625809a7edf02f18760eda16a2c906@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: give link STA debugfs files a namespace
Johannes Berg [Wed, 13 May 2026 05:43:55 +0000 (08:43 +0300)] 
wifi: iwlwifi: mld: give link STA debugfs files a namespace

The generated data structures and function names used are
just the debugfs filename, which is a shared namespace and
could lead to confusion. Prefix these with "link_sta_" to
disambiguate.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260513084215.4421f114bb33.I0de78b6b184935bc2a3d77fa649888da31b5a0fb@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: implement UHR DPS
Johannes Berg [Wed, 13 May 2026 05:43:54 +0000 (08:43 +0300)] 
wifi: iwlwifi: mld: implement UHR DPS

For UHR, implement dynamic power save (DPS). Since the firmware
handles most of it, simply advertise DPS capability and set the
corresponding link flag when the AP has advertised that it is a
DPS assisting AP.

DPS assisting is currently not supported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260513084215.69c5657f2b0c.I0e0dfcd2e2641a5656a14f01ce696443ae10bc4a@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: support NPCA capability for UHR devices
Johannes Berg [Wed, 13 May 2026 05:43:53 +0000 (08:43 +0300)] 
wifi: iwlwifi: mld: support NPCA capability for UHR devices

UHR devices have NPCA capability, so implement the necessary
configuration and set the capability bit.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260513084215.8c88bf84af91.If59ceaa49c2431e08941bcba3b2e75bb93aaad63@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add handler for NAN ULW attribute notification
Avraham Stern [Wed, 13 May 2026 05:43:52 +0000 (08:43 +0300)] 
wifi: iwlwifi: mld: add handler for NAN ULW attribute notification

When a notification about a new ULW attribute arrives, send it to
user space so the ULW attribute can be added to the relevant frames
(e.g. SDF).

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20260513084215.76d980e195a7.Ide4aaf4553a3980e6990485cd37204a922c36913@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: smem_offset smem_len are not needed from 22000 and up
Emmanuel Grumbach [Wed, 13 May 2026 05:43:51 +0000 (08:43 +0300)] 
wifi: iwlwifi: smem_offset smem_len are not needed from 22000 and up

This was used for the old (pre-ini) debug mechanism which is now
obsolete.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260513084215.18095aac398a.I0bdc5120b9b4226692dcffb1c5971f617d99e632@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: max_event_log_size is needed for iwldvm only
Emmanuel Grumbach [Wed, 13 May 2026 05:43:50 +0000 (08:43 +0300)] 
wifi: iwlwifi: max_event_log_size is needed for iwldvm only

This is used to set init_evtlog_size and inst_evtlog_size in case those
are not advertised by the firmware's TLVs.
Those two fields are used only in iwldvm.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260513084215.a83033e43988.I8a55f8ff0e7bc5f42a49b15facd8558708b7d880@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: shadow_ram_support is needed for iwldvm only.
Emmanuel Grumbach [Wed, 13 May 2026 05:43:49 +0000 (08:43 +0300)] 
wifi: iwlwifi: shadow_ram_support is needed for iwldvm only.

Keep that setting only for devices that use iwldvm.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260513084215.365f3984c554.I29138e178dea6fc371a3907013bb3825c4e82475@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: led_compensation is needed for iwldvm only
Emmanuel Grumbach [Wed, 13 May 2026 05:43:48 +0000 (08:43 +0300)] 
wifi: iwlwifi: led_compensation is needed for iwldvm only

Keep that setting only for devices that use iwldvm.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260513084215.a618af54e3ad.I635c3f49c317960dc8751ddeb5a4a3114d52f406@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Add KUnit tests for channel-load thresholds
Avinash Bhatt [Tue, 12 May 2026 19:34:41 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: Add KUnit tests for channel-load thresholds

Add a KUnit test suite for iwl_mld_chan_load_requires_scan,
covering level-up, level-down, and no-change transitions.
The test directly sets channel-load values, validating
scan-trigger decisions and updated load levels

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260512222731.4dd3ccaffc46.I9c1f210e5ef25248097a226f4b3a2af5fbcf3c87@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: Add support for multiple NAN Management stations
Ilan Peer [Tue, 12 May 2026 19:34:40 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: Add support for multiple NAN Management stations

The following limitations arise from the current FW support for NAN:

- While NAN synchronization and discovery beacons are sent
  internally by the firmware, the BIGTK is configured to the
  auxiliary station associated with the NAN operation. Thus,
  the beacons are transmitted unprotected.
- The auxiliary station cannot be configured with support for
  management frame protection as this is not supported by the
  firmware. Thus, there is no way to protect the SDFs and the
  NAFs.

To overcome the above limitations the firmware introduced the
following new station types:

- NAN broadcast station: Used for NAN synchronization and
  discovery. i.e., used for beacon transmissions. A BIGTK
  can be configured to this station and thus beacons can
  be transmitted with protection.
- NAN management station: Used for sending SDFs and NAFs.
  This station can be configured with support for management
  frame protection etc.

Modify the iwlmld logic to support the older and the newer
firmware designs. As no Tx queue is needed for the NAN
broadcast station, modify the internal station support
to allow adding/removing a station without a queue. In
addition, since no links are associated with these stations,
modify the internal station support to allow adding a station
without a link mask.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260512222731.692bf627811d.I7170dbaa28a74519c012e2d7818e2999819dc478@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add support for nan schedule config command version 2
Avraham Stern [Tue, 12 May 2026 19:34:39 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: add support for nan schedule config command version 2

Version 2 of the NAN schedule config command adds support for deferred
schedule update and passing the availability attribute blob to
firmware.
Add support for the new command version. Currently the new
functionality is not supported.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20260512222731.422e4bc47f84.I04b7dec6f3e48cfd950e7ff6f13484d0881d832e@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add duplicated beacon RSSI adjustment
Avinash Bhatt [Tue, 12 May 2026 19:34:38 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: add duplicated beacon RSSI adjustment

For 6 GHz duplicated beacons, the RSSI is measured only on the 20 MHz
primary channel while the actual beacon energy spans the full
operational bandwidth. This leads to underestimated link quality.

Detect duplicated beacons and apply bandwidth-based RSSI adjustments.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260512222731.a4c873e63054.Iea8e8a5f3b384622308dd8d03c5881ff75f1908c@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: implement the new RSC notification
Emmanuel Grumbach [Tue, 12 May 2026 19:34:37 +0000 (22:34 +0300)] 
wifi: iwlwifi: implement the new RSC notification

Add support for a new RSC notification that arrives on DATA queues.
The same RSC handling previously done in the WOWLAN flow is now done
through this notification, with backward compatibility maintained.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260512222731.2c0cd8b43e67.I7cfee4b57e7f84b0d38667290f45ed5be4cdd270@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add chan-load hysteresis for MLO scan triggers
Avinash Bhatt [Tue, 12 May 2026 19:34:36 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: add chan-load hysteresis for MLO scan triggers

Introduce a three-level, table-driven hysteresis mechanism for
deciding when to trigger internal MLO scans based on MCLM Chan
Load. Prevents repeated triggers under fluctuating load conditions.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260512222731.2db48151d32d.I8660f0660a95358bda067af806d28bc2fa6f7f76@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: validate aux sta before flush in stop_nan
Daniel Gabay [Tue, 12 May 2026 19:34:35 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: validate aux sta before flush in stop_nan

iwl_mld_stop_nan() calls iwl_mld_flush_link_sta_txqs() without checking
that aux_sta.sta_id is valid. The DW end handler correctly guards this
with a WARN_ON check. Add the same defensive check to stop_nan for
consistency and to avoid sending a flush command with an invalid sta_id.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260512222731.76b3db062a5e.I0567cfeb915c38c517eb6e1829d78c9fa8653c1f@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: add NULL check for channel in DW end handler
Daniel Gabay [Tue, 12 May 2026 19:34:34 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: add NULL check for channel in DW end handler

ieee80211_get_channel() can return NULL if the frequency is not
registered in the wiphy (e.g. due to regulatory domain restrictions).
The returned channel pointer is passed directly to
cfg80211_next_nan_dw_notif() which dereferences it unconditionally
in both the tracepoint and the netlink message, causing a NULL
pointer dereference.

Add a NULL check before using the channel pointer.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260512222731.a250203cd1c6.I1d807aab415da30a55dd89a974c3226adc547ebb@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: fix NAN DW end notification handler
Daniel Gabay [Tue, 12 May 2026 19:34:33 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: fix NAN DW end notification handler

Use IWL_DEBUG_INFO instead of IWL_INFO for logging the DW end
notification, as this is a recurring event during NAN operation
and should not spam the kernel log.

Also fix a coding style issue - missing space after 'if'.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Link: https://patch.msgid.link/20260512222731.0fd880fb80f9.Iacd459d0e2df28444bb6ccf8730e2f50440e6e32@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: Transition to basic uAPSD with MAC_PM_POWER_TABLE API VER_3
Avinash Bhatt [Tue, 12 May 2026 19:34:32 +0000 (22:34 +0300)] 
wifi: iwlwifi: Transition to basic uAPSD with MAC_PM_POWER_TABLE API VER_3

uAPSD is transitioning to a certification-only feature. The new
firmware API version 3 removes advanced uAPSD fields, keeping only
basic parameters needed for certification testing.

Support the new VER_3 API in the MLD driver while maintaining
backward compatibility with VER_1/2. The MVM driver continues
using VER_2 only. Remove the obsolete PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION
notification from the MLD driver

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
Link: https://patch.msgid.link/20260512222731.96b6f53c8708.I4f01b97b25d91ebb1561845d7925103e274574fa@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: mld: call iwl_mld_free_ap_early_key() for AP only
Avraham Stern [Tue, 12 May 2026 19:34:31 +0000 (22:34 +0300)] 
wifi: iwlwifi: mld: call iwl_mld_free_ap_early_key() for AP only

The driver supports intalling IGTK on a NAN device interface. When
the IGTK is removed, iwl_mld_free_ap_early_key() is called which
results in a warning since no links are attached to this interface.
The iwl_mld_free_ap_early_key() function should be called for AP or
IBSS interfaces only. Check the interface type before calling it.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20260512222731.d67d658b421d.Ife2d1f3b17119ce696582ce6a2a69026d368d8af@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: set state to NO_FW on reset
Johannes Berg [Tue, 12 May 2026 19:34:30 +0000 (22:34 +0300)] 
wifi: iwlwifi: set state to NO_FW on reset

On debugfs reset, set the transport FW state to NO_FW
so that the restart won't attempt to send commands,
which of course fails because the FW was killed during
the error dump.

Use iwl_trans_fw_error() now since that's effectively
the same as the old code plus setting the state.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512222731.cdebf264f5e1.Ia31783c74df0d4b66816a1b34d3771b9a717048b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: define new FSEQ TLV with MAC ID
Johannes Berg [Tue, 12 May 2026 19:34:29 +0000 (22:34 +0300)] 
wifi: iwlwifi: define new FSEQ TLV with MAC ID

Some firmware files can be used for different MACs, for example
for sc2/sc2f, yet might have different FSEQ versions. The files
will then contain multiple bigger FSEQ TLVs indicating the MAC
ID in addition to the version.

For now, since we don't parse this, define only the new format.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512222731.f31ffbff36b0.I227e5c94d4da79a32058d71539b190384caba03e@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: tighten flags in debugfs command sending
Johannes Berg [Tue, 12 May 2026 19:34:28 +0000 (22:34 +0300)] 
wifi: iwlwifi: tighten flags in debugfs command sending

The only flags that could reasonably be used here are
CMD_WANT_SKB and CMD_ASYNC, CMD_SEND_IN_RFKILL doesn't
really make sense and CMD_BLOCK_TXQS just triggers a
warning, as does CMD_WANT_SKB | CMD_ASYNC.

Clear CMD_WANT_SKB since the response SKB isn't used
anyway, and refuse flags other than CMD_ASYNC to avoid
the warnings or other issues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260512222731.71b8cda9c4e8.I0cccfd67675989b48d003833f5813c8fbded45a6@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
3 weeks agowifi: iwlwifi: pcie: add debug print for resume flow if powered off
Aaron Katzin [Tue, 12 May 2026 19:34:27 +0000 (22:34 +0300)] 
wifi: iwlwifi: pcie: add debug print for resume flow if powered off

Log when the resume flow identifies based on the
scratch register that the device was powered off.

Signed-off-by: Aaron Katzin <aaron.katzin@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20260512222731.42623e43fde7.Ibcd656ca845828ce6f2358f9ef80e1ddf03f8f59@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>