linux/drivers/net/wireless
Devin Wittmayer 7825de3f75 wifi: mt76: mt792x: fix NULL dereference in ACPI SAR init during probe
Some laptops carry a MediaTek power table in their firmware, and the
driver reads it to set a transmit limit for each frequency range.  It
only fills in the ranges themselves when it registers the device.

The startup step that does this existed already, but it never programmed
anything.  Two recent commits made it run a regulatory update instead,
which sets the limits on the way through, long before registration.

As a result, on a machine that has the table the driver reads through an
empty pointer and the interface never appears:

  BUG: kernel NULL pointer dereference, address: 0000000000000004
  RIP: 0010:mt792x_init_acpi_sar_power
  Call Trace:
   mt7921_set_tx_sar_pwr
   mt7921_mcu_regd_update
   mt7921_regd_update
   mt7921_run_firmware
   mt7921e_mcu_init
   mt7921_init_work

Skip it when the ranges are missing. They are applied again once the
device is up, which is where they came from before.

Reported-by: Klara Modin <klarasmodin@gmail.com>
Closes: https://lore.kernel.org/linux-wireless/aoyxqHYvSuaBeubf@soda.int.kasm.eu/
Fixes: 9b80bd9cab ("wifi: mt76: mt7921: add regulatory wiphy self manager support")
Fixes: e9f3f1cc13 ("wifi: mt76: mt7925: add regulatory wiphy self manager support")
Signed-off-by: Devin Wittmayer <lucid_duck@justthetip.ca>
Tested-by: David Gow <david@davidgow.net>
Tested-by: Klara Modin <klarasmodin@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-09-13 10:15:16 -07:00
..
admtek
ath treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
atmel wifi: at76c50x-usb: avoid length underflow in at76_guess_freq() 2026-07-21 13:27:38 +02:00
broadcom wifi: brcmfmac: Fix memory leak in brcmf_sdio_read_control() 2026-08-06 14:04:09 +02:00
intel treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
intersil Mostly driver changes this time: 2026-07-27 16:03:40 -07:00
marvell Quite a bunch more work, of note: 2026-08-06 12:39:11 -07:00
mediatek wifi: mt76: mt792x: fix NULL dereference in ACPI SAR init during probe 2026-09-13 10:15:16 -07:00
microchip wifi: wilc1000: validate monitor transmit frame headers 2026-08-02 18:23:27 +02:00
morsemicro treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
nxp treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
purelifi wifi: plfxlc: use module_usb_driver() macro 2026-05-20 11:58:39 +02:00
quantenna wifi: cfg80211: convert cookie output to input parameter 2026-08-02 17:40:08 +02:00
ralink wifi: ralink: RT2X00: init EEPROM properly 2026-07-06 14:11:08 +02:00
realtek rtw-next patches for v7.3 2026-08-02 18:50:03 +02:00
rsi wifi: rsi: Fix types to appease CFI 2026-08-06 14:03:47 +02:00
silabs wifi: move action code from per-type frame structs 2026-03-06 10:36:26 +01:00
st wifi: cw1200: Revert "Fix locking in error paths" 2026-05-04 09:08:24 +02:00
ti Mostly driver changes this time: 2026-07-27 16:03:40 -07:00
virtual Mostly driver changes this time: 2026-07-27 16:03:40 -07:00
zydas wifi: zd1211rw: reject secondary interfaces to prevent conflicts 2026-08-02 18:23:27 +02:00
Kconfig Merge tag 'nxpwifi-2026-07-15' of https://github.com/jeffchen71/nxpwifi 2026-07-21 23:29:58 +02:00
Makefile Merge tag 'nxpwifi-2026-07-15' of https://github.com/jeffchen71/nxpwifi 2026-07-21 23:29:58 +02:00