openwrt/package/network/config/wifi-scripts
dastarothx 54cced5b2f
wifi-scripts: ucode: fix null dereference for 6GHz-only radios
he_phy_cap and he_mac_cap in phy_capabilities are only populated inside
the iftype_data loop. On 6GHz-only radios (e.g. QCN9074/ath11k_pci),
when capability bytes are unavailable they remain null, causing null
dereferences in device_htmode_append():

  Reference error: left-hand side expression is null
  if (!(he_phy_cap[3] & 0x80))

Initialise both to [] before the loop and guard the consumer side with
?? [] so bitwise checks conservatively disable beamformer/beamformee/twt
features rather than crashing.

Link: https://github.com/openwrt/openwrt/issues/23488
Signed-off-by: dastarothx <darkastalier@gmail.com>
(cherry picked from commit feca0b4507b9175b95a59701462d550eb0b855c0)
Link: https://github.com/openwrt/openwrt/pull/23503
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-05-24 13:12:19 +02:00
..
files wifi-scripts: fix macaddr check in mac80211.uc 2026-02-16 08:20:29 +00:00
files-ucode wifi-scripts: ucode: fix null dereference for 6GHz-only radios 2026-05-24 13:12:19 +02:00
Config.in wifi-scripts: enable ucode scripts by default 2025-09-24 13:45:40 +02:00
Makefile wifi-scripts: add ucode based scripts 2024-12-02 13:55:36 +01:00