100 Commits
Author SHA1 Message Date
Jose Ignacio Tornos Martinez e538d9fe4a wifi: nl80211: re-check wiphy netns in testmode and vendor dump continuations
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit f681502c79173a79c3de16be274eca83e8fd8d3f
Author: Maoyi Xie <maoyixie.tju@gmail.com>
Date:   Wed May 27 21:33:58 2026 +0800

    wifi: nl80211: re-check wiphy netns in testmode and vendor dump continuations
    
    Commit 79240f3f6d76 ("wifi: nl80211: re-check wiphy netns in
    nl80211_prepare_wdev_dump() continuation") fixed one dumpit path that
    looked the wiphy up by index on a later call without confirming it was
    still in the caller's netns. Two more dumpit paths have the same gap.
    
    nl80211_testmode_dump() and nl80211_prepare_vendor_dump() both keep the
    wiphy index in cb->args[] and look it up again on later calls, through
    cfg80211_rdev_by_wiphy_idx() and wiphy_idx_to_wiphy(). The first call
    binds to the caller's netns. A later call does not check it again. In
    between, the wiphy can move to another netns via
    NL80211_CMD_SET_WIPHY_NETNS.
    
    Add the same net_eq() check to both. On a mismatch, return -ENODEV and
    the dump ends.
    
    No mainline driver registers .testmode_dump or
    wiphy_vendor_command.dumpit, so these paths are not reachable today.
    Drivers outside the tree can register either.
    
    Signed-off-by: Maoyi Xie <maoyixie.tju@gmail.com>
    Link: https://patch.msgid.link/20260527133358.2853238-1-maoyixie.tju@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:40 +02:00
Jose Ignacio Tornos Martinez 7880e4df06 dt-bindings: wireless: ath10k: Add quirk to skip host cap QMI requests
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 3d7640b6c371a1795e6d9580695d20caf16be9a4
Author: Amit Pundir <amit.pundir@linaro.org>
Date:   Tue Apr 7 08:43:54 2026 +0200

    dt-bindings: wireless: ath10k: Add quirk to skip host cap QMI requests
    
    Some firmware versions do not support the host-capability QMI request.
    Since this request occurs before firmware and board files are loaded,
    the quirk cannot be expressed in the firmware itself and must be described
    in the device tree.
    
    Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
    Co-developed-by: David Heidelberg <david@ixit.cz>
    Signed-off-by: David Heidelberg <david@ixit.cz>
    Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260407-skip-host-cam-qmi-req-v5-1-dfa8a05c6538@ixit.cz
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:40 +02:00
Jose Ignacio Tornos Martinez b421166716 wifi: rtw89: 8922d: fix typo rx_freq_frome_ie
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit d6a3aac6ed5d50aa2ce3d5dfed70d97ca6217f21
Author: Ping-Ke Shih <pkshih@realtek.com>
Date:   Mon Apr 20 11:40:36 2026 +0800

    wifi: rtw89: 8922d: fix typo rx_freq_frome_ie
    
    The commit 127ea8d0b068 ("wifi: rtw89: fix typo "frome" -> "from" in rx_freq_frome_ie")
    change the struct field to correct the typo, but miss to fix this for
    RTL8922D because it is submitting at the same time.
    
    As RTL8922D is not enabled yet, this build error doesn't appear.
    
    Fix it accordingly.
    
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260420034051.17666-2-pkshih@realtek.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:40 +02:00
Jose Ignacio Tornos Martinez 2cc3c63e25 wifi: mt76: mt7921: fix resource leak in probe error path
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 346dac35b1384af9338b34b6835e82e634ea4d2c
Author: Hongling Zeng <zenghongling@kylinos.cn>
Date:   Tue May 12 14:52:45 2026 +0800

    wifi: mt76: mt7921: fix resource leak in probe error path
    
    When pcim_iomap_region() or devm_kmemdup() fail, the code returns
    directly without cleaning up previously allocated resources:
      - mt76_device allocated by mt76_alloc_device()
      - pci irq vectors allocated by pci_alloc_irq_vectors()
    Fix this by jumping to the existing error cleanup path instead of
    returning directly.
    
    Fixes: ee5bb35d2b83 ("wifi: mt76: mt7921: Replace deprecated PCI function")
    Fixes: 222606f43b58 ("wifi: mt76: mt7921: handle MT7902 irq_map quirk with mutable copy")
    Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
    Link: https://patch.msgid.link/20260512065245.46496-1-zenghongling@kylinos.cn
    Signed-off-by: Felix Fietkau <nbd@nbd.name>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:40 +02:00
Jose Ignacio Tornos Martinez 68683981ad wifi: rtw89: correct drop logic for malformed AMPDU frames
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 63ccdfac8677387dfdbd9d4336089e9823280704
Author: Po-Hao Huang <phhuang@realtek.com>
Date:   Fri May 15 09:44:29 2026 +0800

    wifi: rtw89: correct drop logic for malformed AMPDU frames
    
    The previous commit aims to fix issue caused by malformed AMPDU frames.
    But the drop logic fails to deal with the first AMPDU packet paired with
    certain range of sequence number, and leads to unexpected packet drop.
    It is more likely to encounter this failure when there are busy traffic
    during rekey process and could lead to disconnection from the AP.
    Fix this by adding a initial state judgement and only reset status
    during pairwise rekey.
    
    Fixes: bda294ed0ed0 ("wifi: rtw89: Drop malformed AMPDU frames with abnormal PN")
    Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260515014433.16168-10-pkshih@realtek.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:40 +02:00
Jose Ignacio Tornos Martinez 1d85cdfff4 wifi: rtl818x: drop redundant device reference
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 68e7d359a5eeea75197626c800d082955032e30a
Author: Johan Hovold <johan@kernel.org>
Date:   Fri Mar 6 09:51:42 2026 +0100

    wifi: rtl818x: drop redundant device reference
    
    Driver core holds a reference to the USB interface and its parent USB
    device while the interface is bound to a driver and there is no need to
    take additional references unless the structures are needed after
    disconnect.
    
    Drop the redundant device reference to reduce cargo culting, make it
    easier to spot drivers where an extra reference is needed, and reduce
    the risk of memory leaks when drivers fail to release it.
    
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260306085144.12064-17-johan@kernel.org

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:40 +02:00
Jose Ignacio Tornos Martinez 7faea71733 wifi: ath6kl: rename disconnect callback
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 0bc013d68a5d1943728d110d759c6587c2b81913
Author: Johan Hovold <johan@kernel.org>
Date:   Fri Mar 6 09:51:28 2026 +0100

    wifi: ath6kl: rename disconnect callback
    
    Rename the disconnect callback so that it reflects the callback name for
    consistency with the rest of the kernel (e.g. makes it easier to grep
    for).
    
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Link: https://patch.msgid.link/20260306085144.12064-3-johan@kernel.org
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez a8c523bdb9 wifi: ath6kl: drop redundant device reference
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 86581adf05f526f53b90ebcbbc2fd4d9f9fd4c96
Author: Johan Hovold <johan@kernel.org>
Date:   Fri Mar 6 09:51:27 2026 +0100

    wifi: ath6kl: drop redundant device reference
    
    Driver core holds a reference to the USB interface and its parent USB
    device while the interface is bound to a driver and there is no need to
    take additional references unless the structures are needed after
    disconnect.
    
    Drop the redundant device reference to reduce cargo culting, make it
    easier to spot drivers where an extra reference is needed, and reduce
    the risk of memory leaks when drivers fail to release it.
    
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Link: https://patch.msgid.link/20260306085144.12064-2-johan@kernel.org
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez ca894d1687 wifi: libertas_tf: drop redundant device reference
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit b1af0de313bde1539c2501ef6849791010950387
Author: Johan Hovold <johan@kernel.org>
Date:   Fri Mar 6 09:51:34 2026 +0100

    wifi: libertas_tf: drop redundant device reference
    
    Driver core holds a reference to the USB interface and its parent USB
    device while the interface is bound to a driver and there is no need to
    take additional references unless the structures are needed after
    disconnect.
    
    Drop the redundant device reference to reduce cargo culting, make it
    easier to spot drivers where an extra reference is needed, and reduce
    the risk of memory leaks when drivers fail to release it.
    
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Link: https://patch.msgid.link/20260306085144.12064-9-johan@kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez 1082ec230f wifi: libertas: drop redundant device reference
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 75e375816392e8b84feafc97e2c72513f8bd11d4
Author: Johan Hovold <johan@kernel.org>
Date:   Fri Mar 6 09:51:33 2026 +0100

    wifi: libertas: drop redundant device reference
    
    Driver core holds a reference to the USB interface and its parent USB
    device while the interface is bound to a driver and there is no need to
    take additional references unless the structures are needed after
    disconnect.
    
    Drop the redundant device reference to reduce cargo culting, make it
    easier to spot drivers where an extra reference is needed, and reduce
    the risk of memory leaks when drivers fail to release it.
    
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Link: https://patch.msgid.link/20260306085144.12064-8-johan@kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez 5ebb6282b1 net: qrtr: fix refcount saturation and potential UAF in qrtr_port_remove
JIRA: https://issues.redhat.com/browse/RHEL-184812
CVE: CVE-2026-52947

commit a2171131ecda1ed61a594a1eb715e75fdad0fef5
Author: Mingyu Wang <25181214217@stu.xidian.edu.cn>
Date:   Thu Jun 4 14:48:01 2026 +0800

    net: qrtr: fix refcount saturation and potential UAF in qrtr_port_remove
    
    In qrtr_port_remove(), the socket reference count is decremented via
    __sock_put() before the port is removed from the qrtr_ports XArray and
    before the RCU grace period elapses.
    
    This breaks the fundamental RCU update paradigm. It exposes a race
    window where a concurrent RCU reader (such as qrtr_reset_ports() or
    qrtr_port_lookup()) can obtain a pointer to the socket from the XArray,
    and attempt to call sock_hold() on a socket whose reference count has
    already dropped to zero.
    
    This exact race condition was hit during syzkaller fuzzing, leading to
    the following refcount saturation warning and a potential Use-After-Free:
    
      refcount_t: saturated; leaking memory.
      WARNING: CPU: 3 PID: 1273 at lib/refcount.c:22 refcount_warn_saturate+0xae/0x1d0
      Modules linked in: qrtr(+) bochs drm_shmem_helper ...
      Call Trace:
       <TASK>
       qrtr_reset_ports net/qrtr/af_qrtr.c:768 [inline] [qrtr]
       __qrtr_bind.isra.0+0x48b/0x570 net/qrtr/af_qrtr.c:805 [qrtr]
       qrtr_bind+0x17d/0x210 net/qrtr/af_qrtr.c:901 [qrtr]
       kernel_bind+0xe4/0x120 net/socket.c:3592
       qrtr_ns_init+0x1a6/0x380 net/qrtr/ns.c:715 [qrtr]
       qrtr_proto_init+0x3b/0xff0 net/qrtr/af_qrtr.c:169 [qrtr]
       do_one_initcall+0xf5/0x5e0 init/main.c:1283
       ...
       </TASK>
    
    Fix this by deferring the reference count decrement until after the
    xa_erase() and the synchronize_rcu() complete.
    
    (Note: The v1 of this patch incorrectly replaced __sock_put() with
    sock_put(). As Simon Horman pointed out, the callers of qrtr_port_remove()
    still hold a reference to the socket, so freeing the socket memory here
    would lead to a subsequent UAF in the caller. Thus, the __sock_put() is
    kept, but only repositioned to close the RCU race.)
    
    Fixes: bdabad3e36 ("net: Add Qualcomm IPC router")
    Signed-off-by: Mingyu Wang <25181214217@stu.xidian.edu.cn>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20260604064801.1180388-1-w15303746062@163.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez fec9264f23 wifi: cfg80211: enforce HE/EHT cap/oper consistency
JIRA: https://issues.redhat.com/browse/RHEL-184812
CVE: CVE-2026-53257

commit cb9959ab5f99611d27a06586add84811fe8102dc
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Jun 3 11:18:11 2026 +0200

    wifi: cfg80211: enforce HE/EHT cap/oper consistency
    
    Xiang Mei reports that mac80211 could crash if eht_cap is set
    but eht_oper isn't. Rather than fixing that for the individual
    user(s), enforce that both HE/EHT have consistent elements.
    
    Reported-by: Xiang Mei <xmei5@asu.edu>
    Fixes: 22c64f37e1d4 ("wifi: mac80211: Update MCS15 support in link_conf")
    Link: https://patch.msgid.link/20260603091812.101894-2-johannes@sipsolutions.net
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez 19615ed654 wifi: fix leak if split 6 GHz scanning fails
JIRA: https://issues.redhat.com/browse/RHEL-184812
CVE: CVE-2026-53258

commit e8694f7cc29287e843648d1075177b9a2000d957
Author: Fedor Pchelkin <pchelkin@ispras.ru>
Date:   Mon Jun 1 12:41:56 2026 +0300

    wifi: fix leak if split 6 GHz scanning fails
    
    rdev->int_scan_req is leaked if cfg80211_scan() fails.  Note that it's
    supposed to be released at ___cfg80211_scan_done() but this doesn't happen
    as rdev->scan_req is NULL at that point, too, leading to the early return
    from the freeing function.
    
    unreferenced object 0xffff8881161d0800 (size 512):
      comm "wpa_supplicant", pid 379, jiffies 4294749765
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 f0 81 13 16 81 88 ff ff  ................
      backtrace (crc c867fdb6):
        kmemleak_alloc+0x89/0x90
        __kmalloc_noprof+0x2fd/0x410
        cfg80211_scan+0x133/0x730
        nl80211_trigger_scan+0xc69/0x1cc0
        genl_family_rcv_msg_doit+0x204/0x2f0
        genl_rcv_msg+0x431/0x6b0
        netlink_rcv_skb+0x143/0x3f0
        genl_rcv+0x27/0x40
        netlink_unicast+0x4f6/0x820
        netlink_sendmsg+0x797/0xce0
        __sock_sendmsg+0xc4/0x160
        ____sys_sendmsg+0x5e4/0x890
        ___sys_sendmsg+0xf8/0x180
        __sys_sendmsg+0x136/0x1e0
        __x64_sys_sendmsg+0x76/0xc0
        x64_sys_call+0x13f0/0x17d0
    
    Found by Linux Verification Center (linuxtesting.org).
    
    Fixes: c8cb5b854b ("nl80211/cfg80211: support 6 GHz scanning")
    Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
    Link: https://patch.msgid.link/20260601094157.92703-1-pchelkin@ispras.ru
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez 3e39e88d11 wifi: mac80211: limit injected antenna index in ieee80211_parse_tx_radiotap
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 6c0cf89f36ac0c0fd8687a4ccdce2efb23a9c663
Author: Deepanshu Kartikey <kartikey406@gmail.com>
Date:   Sun May 31 06:47:21 2026 +0530

    wifi: mac80211: limit injected antenna index in ieee80211_parse_tx_radiotap
    
    When parsing the radiotap header of an injected frame,
    ieee80211_parse_tx_radiotap() uses the IEEE80211_RADIOTAP_ANTENNA value
    directly as a shift count:
    
            info->control.antennas |= BIT(*iterator.this_arg);
    
    *iterator.this_arg is an 8-bit value taken straight from the frame
    supplied by userspace, so BIT() can be asked to shift by up to 255. That
    is undefined behaviour on the unsigned long and is reported by UBSAN:
    
      UBSAN: shift-out-of-bounds in net/mac80211/tx.c:2174:30
      shift exponent 235 is too large for 64-bit type 'unsigned long'
      Call Trace:
       ieee80211_parse_tx_radiotap+0xadb/0x1950 net/mac80211/tx.c:2174
       ieee80211_monitor_start_xmit+0xb1f/0x1250 net/mac80211/tx.c:2451
       ...
       packet_sendmsg+0x3eb6/0x50f0 net/packet/af_packet.c:3109
    
    info->control.antennas is a 2-bit bitmap (u8 antennas:2), so only antenna
    indices 0 and 1 can ever be represented. Ignore any larger value instead
    of shifting out of bounds.
    
    Reported-by: syzbot+8e0622f6d9446420271f@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=8e0622f6d9446420271f
    Fixes: ef246a1480 ("wifi: mac80211: support antenna control in injection")
    Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
    Link: https://patch.msgid.link/20260531011721.102941-1-kartikey406@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez e8eaf9069c wifi: nl80211: reject oversized EMA RNR lists
JIRA: https://issues.redhat.com/browse/RHEL-184812
CVE: CVE-2026-53182

commit 4cd92957e8f8cc4ebfe8a5d4203c14c592fde6b1
Author: Yuqi Xu <xuyuqiabc@gmail.com>
Date:   Fri May 29 23:25:37 2026 +0800

    wifi: nl80211: reject oversized EMA RNR lists
    
    nl80211_parse_rnr_elems() stores the parsed element count in a
    u8-backed cfg80211_rnr_elems::cnt field and uses that count to size
    the flexible array allocation.
    
    Reject nested NL80211_ATTR_EMA_RNR_ELEMS input once the count reaches
    255, before incrementing it again. This keeps the parser aligned with
    the data structure it fills and matches the existing bound check used
    by nl80211_parse_mbssid_elems().
    
    Fixes: dbbb27e183 ("cfg80211: support RNR for EMA AP")
    Cc: stable@kernel.org
    Reported-by: Yuan Tan <yuantan098@gmail.com>
    Reported-by: Zhengchuan Liang <zcliangcn@gmail.com>
    Reported-by: Xin Liu <bird@lzu.edu.cn>
    Assisted-by: Codex:gpt-5.4
    Signed-off-by: Yuqi Xu <xuyuqiabc@gmail.com>
    Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
    Link: https://patch.msgid.link/20260529152542.1412734-1-n05ec@lzu.edu.cn
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:39 +02:00
Jose Ignacio Tornos Martinez d0845e8578 wifi: iwlwifi: pcie: simplify the resume flow if fast resume is not used
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 093305d801fae6ff9b8bb531fd78b579794c4f80
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Sun May 31 13:30:19 2026 +0300

    wifi: iwlwifi: pcie: simplify the resume flow if fast resume is not used
    
    In most distributions, NetworkManager shuts the device down before
    entering system suspend, so fast suspend is typically not used.
    
    On older devices, resume currently tries to grab NIC access to infer
    whether the device was powered off while suspended. That probe is only
    meaningful for the fast-suspend path where the device is expected to
    remain alive.
    
    Unfortunately, for unclear reasons, grabbing NIC access was harmful as
    reported in the bugzilla ticket below.
    
    Workaround this issue by simply not grabbing NIC access if fast suspend
    is not used.
    
    Cc: stable@vger.kernel.org
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221501
    Assisted-by: GitHub Copilot:gpt-5.3-codex
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Link: https://patch.msgid.link/20260531133005.e2ed9e0cd44f.If283625983a843933e0c01561a421daff184e9e9@changeid
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez 53e762cfbd wifi: iwlwifi: mvm: avoid oversized UATS command copy
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit e0c121d545134af886b28c4c26d91abf5dd39c17
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Fri May 29 08:57:07 2026 +0300

    wifi: iwlwifi: mvm: avoid oversized UATS command copy
    
    MCC_ALLOWED_AP_TYPE_CMD exceeds the fixed copied host-command buffer
    and triggers warnings in the gen2 enqueue path when command
    0xc05 is sent.
    
    Use IWL_HCMD_DFL_NOCOPY as it was done before the offending commit.
    
    Fixes: 078df640ef05 ("wifi: iwlwifi: mld: add support for iwl_mcc_allowed_ap_type_cmd v2")
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260529085453.9af349ab459b.I348df3980764c15efce0099a35fe8a88fb2a6ee2@changeid

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez 0ee152688d wifi: iwlwifi: mld: send tx power constraints before link activation
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 9bf1b409afc7c4a1f0340f3975846c4f3278643a
Author: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Date:   Fri May 29 08:57:06 2026 +0300

    wifi: iwlwifi: mld: send tx power constraints before link activation
    
    TX power constraints must be sent to the firmware before link
    activation. If not, the firmware will use default power values.
    
    Fix this by moving the iwl_mld_send_ap_tx_power_constraint_cmd()
    call from iwl_mld_start_ap_ibss() to iwl_mld_assign_vif_chanctx(),
    before iwl_mld_activate_link() for AP interfaces. Also update
    the guard in the function to allow it to run before link activation
    for AP interfaces.
    
    Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260529085453.06c94b01efd2.Id43bdfe5eb030061c23348779687ba71b5f58182@changeid

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez 3087a6d1df wifi: iwlwifi: mvm: don't support the reset handshake for old firmwares
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 0eaa1f245ac03ed0c6394159360532726f666811
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Fri May 29 08:57:05 2026 +0300

    wifi: iwlwifi: mvm: don't support the reset handshake for old firmwares
    
    -77.ucode doesn't contain the fixes for this flow it seems.
    Don't use the firmware reset handshake even if the firmware claims
    support for it.
    
    Fixes: 906d4eb844 ("iwlwifi: support firmware reset handshake")
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220600
    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/20260529085453.9307b81d9b02.I21bba9e649f4cd0e35d3ea6cd97a03258be5832f@changeid

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez c1b7351a6b wifi: cfg80211: wext: validate chandef in monitor mode
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit dc14686f27df6454b13b16ad1c9203ab3e9b0375
Author: Kartik Nair <contact.kartikn@gmail.com>
Date:   Mon May 11 01:54:37 2026 +0530

    wifi: cfg80211: wext: validate chandef in monitor mode
    
    cfg80211_wext_siwfreq() constructs a channel definition for monitor
    mode but passes it to cfg80211_set_monitor_channel() without first
    validating it with cfg80211_chandef_valid(). This causes a WARN_ON
    in cfg80211_chandef_dfs_required() when it receives an invalid chandef.
    
    Add the missing cfg80211_chandef_valid() check before calling
    cfg80211_set_monitor_channel() to return -EINVAL early on invalid
    channel definitions, consistent with how other callers handle this.
    
    Reported-by: syzbot+02a1a03b8622d3c7d1c9@syzkaller.appspotmail.com
    Signed-off-by: Kartik Nair <contact.kartikn@gmail.com>
    Link: https://patch.msgid.link/20260510202437.7857-1-contact.kartikn@gmail.com
    [clarify subject]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez 4af7191656 wifi: mac80211: consume only present negotiated TTLM maps
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit a6e6ccd5bd07155c2add6c74ce1a5e68ad3b95ea
Author: Michael Bommarito <michael.bommarito@gmail.com>
Date:   Fri May 15 11:17:18 2026 -0400

    wifi: mac80211: consume only present negotiated TTLM maps
    
    ieee80211_tid_to_link_map_size_ok() validates negotiated TTLM elements
    against the number of link-map entries indicated by link_map_presence.
    ieee80211_parse_neg_ttlm() must consume the same layout.
    
    The parser advanced its cursor for every TID, including TIDs whose
    presence bit is clear and therefore have no map bytes in the element.
    A sparse map can then make a later present TID read past the validated
    element.
    
    The bad bytes land in neg_ttlm->{up,down}link[tid] but are gated by
    valid_links before being applied to driver state, so a peer cannot
    turn the read into a policy change.  Under KUnit + KASAN with an
    exact-sized element allocation the OOB read is reported as a
    slab-out-of-bounds; whether the same trigger fires under the
    production RX path depends on surrounding allocator state.
    
    Advance the cursor only when the current TID has a map present.
    
    Fixes: 8f500fbc6c ("wifi: mac80211: process and save negotiated TID to Link mapping request")
    Cc: stable@vger.kernel.org
    Assisted-by: Claude:claude-opus-4-7
    Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
    Link: https://patch.msgid.link/20260515151719.1317659-2-michael.bommarito@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez 958d8822b0 wifi: wilc1000: fix dma_buffer leak on bus acquire failure
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit dd7b6a8671939708cc4b7a46786d8c11297e8f69
Author: Shitalkumar Gandhi <shital.gandhi45@gmail.com>
Date:   Mon May 11 09:57:32 2026 +0530

    wifi: wilc1000: fix dma_buffer leak on bus acquire failure
    
    wilc_wlan_firmware_download() allocates dma_buffer with kmalloc() at
    the top of the function and uses a 'fail:' label to free it via
    kfree(dma_buffer) on error.
    
    All later error paths correctly use 'goto fail' to route through this
    cleanup. However, the early failure path after the first acquire_bus()
    call uses a bare 'return ret;', which leaks dma_buffer whenever the bus
    acquire fails.
    
    Replace the early return with goto fail so the existing cleanup path
    runs.
    
    Found via a custom Coccinelle semantic patch hunting for kmalloc'd
    locals leaked on early-return error paths in driver firmware-download
    code.
    
    Fixes: 1241c5650ff7 ("wifi: wilc1000: Fill in missing error handling")
    Signed-off-by: Shitalkumar Gandhi <shitalkumar.gandhi@cambiumnetworks.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20260511042732.998311-1-shitalkumar.gandhi@cambiumnetworks.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez 0e3204ef6d wifi: mac80211: capture fast-RX rate before mesh reuses skb->cb
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit d71c841be5d9e586ee7f36c0dc8ed4db0d9a1349
Author: Zhao Li <enderaoelyther@gmail.com>
Date:   Sat May 9 12:34:28 2026 +0800

    wifi: mac80211: capture fast-RX rate before mesh reuses skb->cb
    
    ieee80211_invoke_fast_rx() reads RX status through
    IEEE80211_SKB_RXCB(skb), which aliases the same skb->cb storage
    that ieee80211_rx_mesh_data() reuses as IEEE80211_TX_INFO.  In the
    unicast forward path, mesh_data does:
    
            info = IEEE80211_SKB_CB(fwd_skb);
            memset(info, 0, sizeof(*info));
    
    on the same skb the caller still names via rx->skb, then either
    queues the skb for TX (success) or kfree_skb()'s it (no-route)
    before returning RX_QUEUED.  The caller's RX_QUEUED arm then
    calls sta_stats_encode_rate(status) on memory that is either
    zeroed (success path) or freed (no-route path).  The latter is
    KASAN slab-use-after-free in ieee80211_prepare_and_rx_handle.
    
    Fix by encoding the rate from status before invoking
    ieee80211_rx_mesh_data(), so the RX_QUEUED arm consumes a value
    captured while status was still backed by valid memory.
    
    Fixes: 3468e1e0c6 ("wifi: mac80211: add mesh fast-rx support")
    Cc: stable@vger.kernel.org
    Signed-off-by: Zhao Li <enderaoelyther@gmail.com>
    Link: https://patch.msgid.link/20260509043427.60322-2-enderaoelyther@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez e23129b061 wifi: mac80211: fix multi-link element inheritance
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit fe2d61a5d2849ee75dd4deeb2fe35f78d80721f8
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri May 8 09:10:32 2026 +0200

    wifi: mac80211: fix multi-link element inheritance
    
    When parsing a beacon, mac80211 erroneously inherits any
    reconfiguration or EPCS multi-link elements from the outer
    elements into the multi-BSSID profile that's requested, if
    connected to a non-transmitted BSS, unless that profile
    has a non-inheritance element.
    
    This also happens if parsing a multi-BSSID profile that
    doesn't have a non-inheritance element.
    
    Fix this by having an empty non-inheritance element so
    cfg80211_is_element_inherited() is invoked in these cases
    and causes the parser to skip the elements that should
    never be inherited.
    
    Fixes: cf36cdef10 ("wifi: mac80211: Add support for parsing Reconfiguration Multi Link element")
    Fixes: 24711d60f849 ("wifi: mac80211: Support parsing EPCS ML element")
    Reviewed-by: Ilan Peer <ilan.peer@intel.com>
    Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
    Link: https://patch.msgid.link/20260508091032.92184c0a3f08.I3c43b0b63d2cef8a4ddddaef1c2faaeb1de711ad@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:38 +02:00
Jose Ignacio Tornos Martinez 62cc71ec6f wifi: mac80211: fix MLE defragmentation
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit a74e893f30db64cdce0fc7a96d3baa417bcd55f5
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri May 8 09:10:31 2026 +0200

    wifi: mac80211: fix MLE defragmentation
    
    If either reconf or EPCS multi-link element (MLE) is contained in
    a non-transmitted profile, the defragmentation routine is called
    with a pointer to the defragmented copy, but the original elements.
    
    This is incorrect for two reasons:
     - if the original defragmentation was needed, it will not find the
       correct data
     - if the original frame is at a higher address, the parsing will
       potentially overrun the heap data (though given the layout of
       the buffers, only into the new defragmentation buffer, and then
       it has to stop and fail once that's filled with copied data.
    
    Fix it by tracking the container along with the pointer and in
    doing so also unify the two almost identical defragmentation
    routines.
    
    Fixes: 4d70e9c548 ("wifi: mac80211: defragment reconfiguration MLE when parsing")
    Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Ilan Peer <ilan.peer@intel.com>
    Link: https://patch.msgid.link/20260508091031.8a6c34613178.I4de16ebbce2d27f2f8f98fc49949c7a376c2fe8d@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez fae7de6e3c wifi: mac80211: don't override max_amsdu_subframes
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit e1e83feb8eae82cc9cc676db4c70f52fedc4735d
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Wed May 13 17:06:27 2026 +0300

    wifi: mac80211: don't override max_amsdu_subframes
    
    In client mode, the extended capabilities are handled by the kernel
    looking at the association frame.  When the supplicant installs the keys
    it calls sta_apply_parameters and it doesn't include the extended
    capabilities since those can't change after association.
    As a result, we overrode the max_amsdu_subframes that we set after
    association.
    
    Check that the ext_capa coming from the user space is valid before
    looking at it. If the ext_capa is NULL, it really means that the
    extended capabilities are not changed (as opposed to cleared).
    
    The default value for max_amsdu_subframes is 0, which means there is no
    limit. This value is valid and in case the association response frame
    does not have extended capabilities, this is the value we should use.
    
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221079
    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/20260513170623.828dbb58c782.Ifd2bfc190c26140e919127adb02ffddd7b551499@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez 6602ed92fe wifi: ath12k: fix EHT TX MCS limitation due to wrong 20 MHz-only parsing
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 60fb2cf51e77bb1c0261160b4be44209d68956b1
Author: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Date:   Thu May 14 11:32:51 2026 +0800

    wifi: ath12k: fix EHT TX MCS limitation due to wrong 20 MHz-only parsing
    
    When connecting to an AP configured for EHT 20 MHz with a full EHT
    MCS/NSS map (supporting MCS 0-13)
    
    Supported EHT-MCS and NSS Set
        EHT-MCS Map (BW <= 80MHz): 0x444444
            .... .... .... .... .... 0100 = Rx Max Nss That Supports EHT-MCS 0-9: 4
            .... .... .... .... 0100 .... = Tx Max Nss That Supports EHT-MCS 0-9: 4
            .... .... .... 0100 .... .... = Rx Max Nss That Supports EHT-MCS 10-11: 4
            .... .... 0100 .... .... .... = Tx Max Nss That Supports EHT-MCS 10-11: 4
            .... 0100 .... .... .... .... = Rx Max Nss That Supports EHT-MCS 12-13: 4
            0100 .... .... .... .... .... = Tx Max Nss That Supports EHT-MCS 12-13: 4
    
    TX throughput is observed to be significantly lower than expected.
    Investigation shows that TX rates are limited to EHT MCS 11, even though
    the AP advertises support for EHT MCS 12/13.
    
    The root cause is an incorrect parsing of the Supported EHT-MCS and NSS
    Set element in ath12k_peer_assoc_h_eht().
    
    IEEE Std 802.11be-2024 Figure 9-1074as describes the format for 20
    MHz-Only Non-AP STAs.
    
    IEEE Std 802.11be-2024 Figure 9-1074at describes the format for all
    other AP and non-AP STAs.
    
    Currently the first format is parsed when the peer advertises no wider
    HE channel width support, without considering whether it is an AP or a
    non-AP STA. This is incorrect: the peer AP's capabilities must be parsed
    using Figure 9-1074at even when it operates on 20 MHz only. Parsing it
    as Figure 9-1074as causes rx_tx_mcs13_max_nss to be interpreted as zero,
    which is then passed to firmware, leading firmware to assume the peer
    does not support MCS 13 and to limit TX rates at MCS 11.
    
    Fix this by parsing the Figure 9-1074as format only when the peer is a
    20 MHz-Only non-AP STA, i.e. when the local interface operates as AP or
    mesh point.
    
    Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
    
    Fixes: 6c95151e2e77 ("wifi: ath12k: Add EHT MCS/NSS rates to Peer Assoc")
    Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260514-ath12k-fix-20mhz-only-mcs-map-v1-1-a38d4a9b21a2@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez 8e1fd20dc8 wifi: ath11k: clear shared SRNG pointer state on restart
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit f51e4b3b5574ad8cb5b16b11f8a1452147ece87a
Author: Kyle Farnung <kfarnung@gmail.com>
Date:   Wed May 13 21:52:12 2026 -0700

    wifi: ath11k: clear shared SRNG pointer state on restart
    
    LMAC rings reuse the shared rdp/wrp pointer buffers without going
    through the normal SRNG hw-init path that zeros non-LMAC ring
    pointers. After restart, ath11k_hal_srng_clear() can therefore hand
    stale hp/tp state from the previous firmware instance back to the new
    one.
    
    Clear the shared pointer buffers while keeping the allocations in
    place so restart still avoids reallocating SRNG DMA memory, but starts
    with fresh ring-pointer state.
    
    Fixes: 32be3ca4cf78b ("wifi: ath11k: HAL SRNG: don't deinitialize and re-initialize again")
    Cc: stable@vger.kernel.org
    Closes: https://lore.kernel.org/all/CAOPSVF04q6uvVdq8GTRLHBrVMdpt9=o9wVcFMc6f-yhmSBcZqQ@mail.gmail.com/
    Signed-off-by: Kyle Farnung <kfarnung@gmail.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260513-kfarnung-ath11k-srng-clear-pointer-state-v1-1-bc700dd8b333@gmail.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez 42227ca00d wifi: ath11k: fix use after free in ath11k_dp_rx_msdu_coalesce()
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 72b8654e3b83548f64524add2e9145e9b6c8a852
Author: Willmar Knikker <willmar@met-dubbel-l.nl>
Date:   Tue May 5 17:17:43 2026 +0000

    wifi: ath11k: fix use after free in ath11k_dp_rx_msdu_coalesce()
    
    In ath11k_dp_rx_msdu_coalesce() the loop uses ->is_continuation after
    the dev_kfree_skb_any(). This can cause a use after free kfence.
    
    Use flag for caching is_continuation for use after the
    dev_kfree_skb_any().
    
    Fixes: d5c65159f2 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
    Signed-off-by: Willmar Knikker <willmar@met-dubbel-l.nl>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260505171709.547274-1-willmar@met-dubbel-l.nl
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez 28659df5f5 wifi: ath11k: fix peer resolution on rx path when peer_id=0
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 2a2451a34afdf563b3102d36a4b6cf335cf813e2
Author: Matthew Leach <matthew.leach@collabora.com>
Date:   Fri Apr 24 10:50:35 2026 +0100

    wifi: ath11k: fix peer resolution on rx path when peer_id=0
    
    It has been observed that on certain chipsets a peer can be assigned
    peer_id=0. For reception of non-aggregated MPDUs this is fine as
    ath11k_dp_rx_h_find_peer() has a fallback case where it locates the peer
    based upon the source MAC address. On an aggregated link, the mpdu_start
    header is only populated by hardware on the first sub-MSDU. This causes
    the peer resolution to be skipped for the subsequent MSDUs and the
    encryption type of these frames to be set to an incorrect value,
    resulting in these MSDUs being dropped by ieee80211.
    
    ath11k_pci 0000:03:00.0: data rx skb 000000002f4b704d len 1534 peer xx:xx:xx:xx:xx:xx 0 ucast sn 3063 he160 rate_idx 9 vht_nss 2 freq 5240 band 1 flag 0x40d1a fcs-err 0 mic-err 0 amsdu-more 0 peer_id 0 first_msdu 1 last_msdu 0
    ath11k_pci 0000:03:00.0: data rx skb 0000000038acd580 len 1534 peer (null) 0 ucast sn 3063 he160 rate_idx 9 vht_nss 2 freq 5240 band 1 flag 0x40d00 fcs-err 0 mic-err 0 amsdu-more 0 peer_id 0 first_msdu 0 last_msdu 1
    
    Remove the null peer_id checks in ath11k_dp_rx_h_find_peer() and
    ath11k_hal_rx_parse_mon_status_tlv(), allowing peers with an assigned ID
    of 0 to be resolved.
    
    Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.9
    
    Fixes: 2167fa606c ("ath11k: Add support for RX decapsulation offload")
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Signed-off-by: Matthew Leach <matthew.leach@collabora.com>
    Reviewed-by: P Praneesh <praneesh.p@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260424-ath11k-null-peerid-workaround-v4-1-252b224d3cf6@collabora.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez ede6a7b8f0 wifi: iwlwifi: mld: disconnect only after 6 beacons without Rx
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 734a4e051b9767f439137940095d63afbfed0745
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Fri May 15 15:15:00 2026 +0300

    wifi: iwlwifi: mld: disconnect only after 6 beacons without Rx
    
    After 4 missed beacons since last Rx, the firmware will send an NDP to the
    AP. If the NDP is ACK'ed, it'll reset the missed_beacons_since_last_rx
    counter.
    Disconnecting after 4 beacons doesn't give enough time to the firmware
    to send the NDP.
    
    Wait until we get 6 missed beacons since last Rx before disconnecting.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Link: https://patch.msgid.link/20260515151352.c4ed0d849f98.Iefa2e8be9edfc74683997eea60bb53c2002f31f0@changeid
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez c6228fb07d wifi: iwlwifi: mld: don't WARN on WoWLAN suspend w/o BSS vif
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit b753b3334bad7c4735b6e5face0c331d4be11dda
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri May 15 15:14:59 2026 +0300

    wifi: iwlwifi: mld: don't WARN on WoWLAN suspend w/o BSS vif
    
    Clearly, from a user perspective, it must be valid to configure
    WoWLAN (which can include network detection) and then suspend
    while not connected to a network, or even without an interface
    at all (WoWLAN config is handled on a per-wiphy basis). Since
    mac80211 doesn't distinguish these cases and simply calls the
    driver to suspend whenever WoWLAN is configured, the driver has
    to cleanly handle the case where it's called for WoWLAN but no
    (BSS) interface exists.
    
    Remove the WARN_ON(), move the print so it doesn't get done in
    this case, and keep returning 1 to disconnect everything.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://patch.msgid.link/20260515151352.0c55d1135409.I54f8be0e2aa28cfb1cb1dcf3b2d2d8fe75b4397b@changeid
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez cb3802346b wifi: iwlwifi: use correct function to read STEP_URM register
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 25e416f148f3f948638ca7c6ff63fd842d9c07ad
Author: Moriya Itzchaki <moriya.itzchaki@intel.com>
Date:   Fri May 15 15:14:58 2026 +0300

    wifi: iwlwifi: use correct function to read STEP_URM register
    
    CNVI_PMU_STEP_FLOW is a PRPH register, not a UMAC PRPH register.
    Use iwl_read_prph() instead of iwl_read_umac_prph() to read it
    correctly.
    
    Signed-off-by: Moriya Itzchaki <moriya.itzchaki@intel.com>
    Reviewed-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://patch.msgid.link/20260515151352.3a69fa2dbda7.I8d96635a9c06a835b05a10b6d66c8a9299676246@changeid
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:37 +02:00
Jose Ignacio Tornos Martinez 8dc7b026a2 wifi: iwlwifi: mvm: fix driver-set TX rates on old devices
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit fb84b5cbcaab3ca0f4e961d92a40ed7f3aac483b
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri May 15 15:14:57 2026 +0300

    wifi: iwlwifi: mvm: fix driver-set TX rates on old devices
    
    On old devices such as 7265D, rates are still encoded in version 1
    format, which doesn't use the CCK/OFDM rate index (0-3/0-7) but
    rather their PLCP value (e.g. 10 for 1 Mbps CCK rate.)
    
    While introducing v3 rates, I changed the driver from internally
    handling v1 rates and converting to v2, to internally handling v3
    and converting to v1 or v2 according to the firmware. I accordingly
    changed the code in iwl_mvm_mac80211_idx_to_hwrate() to no longer
    have different values for different APIs. This was correct.
    
    However, I later reverted this part of the change, because it was
    reported that I had broken beacon rates, causing a FW assert/crash.
    This caused TX_CMD rates to be set incorrectly, potentially causing
    a warning when reported back from the device as having been used.
    
    Fix this (hopefully correctly now) by handling beacon rates in the
    TX_CMD that's embedded in the beacon template command separately.
    Restore iwl_mvm_mac80211_idx_to_hwrate() to return only the rate
    index, not PLCP value, fixing the real TX_CMD.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://patch.msgid.link/20260515151351.7407e293dff7.I4ea1a17f8fe99c933d3f3e30d077cf4246125c3e@changeid
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez df97d57e84 wifi: iwlwifi: mld: don't dereference a pointer before NULL checking it
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit d733ed481fd20a8e7bfe5119c4e77761ba3f87ee
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Fri May 15 15:14:56 2026 +0300

    wifi: iwlwifi: mld: don't dereference a pointer before NULL checking it
    
    In iwl_mld_remove_link, the link->fw_id is saved at the beginning of the
    function so we have it after we freed the link.
    
    But the link pointer can be NULL, and is not checked when the fw_id is
    stored.
    
    Fix it by simply freeing the link at the end of the function.
    
    fFixes: 0e66a39f4f0e ("wifi: iwlwifi: fix potential use after free in iwl_mld_remove_link()")
    Reviewed-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://patch.msgid.link/20260515151351.371f40fc6711.I6a82cfe9655564e9c5731af91c36493b26b1208e@changeid
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez 1a1ced902a wifi: iwlwifi: mld: stop TX during firmware restart
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 2becb38a3e217ef2b2f42fddd7db7a25905ec291
Author: Sheroz Juraev <goodmartiandev@gmail.com>
Date:   Sun Mar 15 13:12:21 2026 +0500

    wifi: iwlwifi: mld: stop TX during firmware restart
    
    When iwlwifi firmware crashes (e.g., NMI_INTERRUPT_UNKNOWN on Intel
    BE201/Wi-Fi 7), iwl_mld_nic_error() sets mld->fw_status.in_hw_restart
    to true. However, iwl_mld_tx_from_txq() does not check this flag before
    dequeuing frames from mac80211 and pushing them to the transport layer.
    
    Since the firmware is dead, iwl_trans_tx() returns -EIO for each frame,
    which then gets freed immediately. Under high-throughput conditions
    (e.g., Tailscale UDP traffic or active SSH sessions), this creates a
    tight dequeue-send-fail-free loop that wastes CPU cycles and generates
    rapid skb allocation churn, leading to memory pressure from slab
    fragmentation.
    
    The RX path already has this guard (iwl_mld_rx_mpdu checks
    in_hw_restart at rx.c:1906), and so does the TXQ allocation worker
    (iwl_mld_add_txqs_wk at tx.c:156). Add the same guard to
    iwl_mld_tx_from_txq() to stop all TX during firmware restart.
    
    Frames left in mac80211's TXQs are naturally drained after restart
    completes, when queue reallocation triggers iwl_mld_tx_from_txq()
    via iwl_mld_add_txq_list(), or when new upper-layer traffic invokes
    wake_tx_queue.
    
    Tested on ASUS Zenbook 14 UX3405CA with Intel BE201 (Wi-Fi 7) on
    kernel 6.19.5 where the firmware crashes approximately every 10-15
    minutes under Tailscale traffic.
    
    Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sheroz Juraev <goodmartiandev@gmail.com>
    Link: https://patch.msgid.link/20260315081221.2678478-1-goodmartiandev@gmail.com
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez 747de7954d wifi: iwlwifi: mld: fix TSO segmentation explosion when AMSDU is disabled
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 92cee08dc4f00e77fd1317e4343c5d458b0abab7
Author: Cole Leavitt <cole@unwrap.rs>
Date:   Sat Apr 4 22:41:44 2026 -0700

    wifi: iwlwifi: mld: fix TSO segmentation explosion when AMSDU is disabled
    
    When the TLC notification disables AMSDU for a TID, the MLD driver sets
    max_tid_amsdu_len to the sentinel value 1. The TSO segmentation path in
    iwl_mld_tx_tso_segment() checks for zero but not for this sentinel,
    allowing it to reach the num_subframes calculation:
    
      num_subframes = (max_tid_amsdu_len + pad) / (subf_len + pad)
                    = (1 + 2) / (1534 + 2) = 0
    
    This zero propagates to iwl_tx_tso_segment() which sets:
    
      gso_size = num_subframes * mss = 0
    
    Calling skb_gso_segment() with gso_size=0 creates over 32000 tiny
    segments from a single GSO skb. This floods the TX ring with ~1024
    micro-frames (the rest are purged), creating a massive burst of TX
    completion events that can lead to memory corruption and a subsequent
    use-after-free in TCP's retransmit queue (refcount underflow in
    tcp_shifted_skb, NULL deref in tcp_rack_detect_loss).
    
    The MVM driver is immune because it checks mvmsta->amsdu_enabled before
    reaching the num_subframes calculation. The MLD driver has no equivalent
    bitmap check and relies solely on max_tid_amsdu_len, which does not
    catch the sentinel value.
    
    Fix this by detecting the sentinel value (max_tid_amsdu_len == 1) at the
    existing check and falling back to non-AMSDU TSO segmentation. Also add
    a WARN_ON_ONCE guard after the num_subframes division as defense-in-depth
    to catch any future code paths that produce zero through a different
    mechanism.
    
    Suggested-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
    Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver")
    Signed-off-by: Cole Leavitt <cole@unwrap.rs>
    Link: https://patch.msgid.link/20260405054145.1064152-3-cole@unwrap.rs
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez a8b66c7c6f wifi: ath10k: skip WMI and beacon transmission when device is wedged
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 54a5b38e4396530e5b2f12b54d3844e860ab6784
Author: Kang Yang <kang.yang@oss.qualcomm.com>
Date:   Tue Apr 28 14:17:37 2026 +0800

    wifi: ath10k: skip WMI and beacon transmission when device is wedged
    
    In ath10k_wmi_cmd_send(), the current code detects ATH10K_STATE_WEDGED
    and sets ret to -ESHUTDOWN, but still proceeds to transmit pending
    beacons and calls ath10k_wmi_cmd_send_nowait().
    
    This can lead to incorrect behavior, as WMI commands and beacons are
    still sent after the device has been marked as wedged, and the original
    -ESHUTDOWN return value may be overwritten by the result of the send
    path.
    
    The wedged state indicates the hardware is already unreliable, and no
    further interaction with firmware is expected or meaningful in this
    state.
    
    Fix this by skipping beacon transmission and the WMI send path entirely
    once ATH10K_STATE_WEDGED is detected, ensuring consistent return values
    and avoiding unnecessary firmware interaction.
    
    Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1
    Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189
    
    Fixes: c256a94d1b1b ("wifi: ath10k: shutdown driver when hardware is unreliable")
    Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260428061737.37-1-kang.yang@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez 3dcff2acd9 wifi: ath11k: fix error path leak in ath11k_tm_cmd_wmi_ftm()
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 7320d6eb861e9913193a7801834c661381756a79
Author: Nicolas Escande <nico.escande@gmail.com>
Date:   Wed May 6 15:42:40 2026 +0200

    wifi: ath11k: fix error path leak in ath11k_tm_cmd_wmi_ftm()
    
    This is similar to what was fixed by previous patches. We have a call
    to ath11k_wmi_cmd_send() which does check the return value, but forgot
    to free the related skb on error.
    
    Fixes: b43310e44e ("wifi: ath11k: factory test mode support")
    Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260506134240.2284016-4-nico.escande@gmail.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez e21acbfe85 wifi: ath11k: fix error path leaks in some WMI calls
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit ebad0b48996fd4919c36bbcb07289d37d046de74
Author: Nicolas Escande <nico.escande@gmail.com>
Date:   Wed May 6 15:42:39 2026 +0200

    wifi: ath11k: fix error path leaks in some WMI calls
    
    This is the same pattern that was previously identified as problematic:
    direct 'return ath11k_wmi_cmd_send(...)' will leak the skb in the error
    path if it is not explicitly handled.
    
    Fixes: c417b247ba ("ath11k: implement hardware data filter")
    Fixes: 9cbd7fc9be ("ath11k: support MAC address randomization in scan")
    Fixes: ba9177fcef ("ath11k: Add basic WoW functionalities")
    Fixes: fec4b898f3 ("ath11k: Add WoW net-detect functionality")
    Fixes: c3c36bfe99 ("ath11k: support ARP and NS offload")
    Fixes: a16d9b50cf ("ath11k: support GTK rekey offload")
    Fixes: 652f69ed9c ("ath11k: Add support for SAR")
    Fixes: 0f84a156aa ("ath11k: Handle keepalive during WoWLAN suspend and resume")
    Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260506134240.2284016-3-nico.escande@gmail.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez 6d01d41eed wifi: ath11k: fix error path leaks in some WMI WOW calls
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 55dda532bbc261aef495e403c8900c5e2ab5fa34
Author: Nicolas Escande <nico.escande@gmail.com>
Date:   Wed May 6 15:42:38 2026 +0200

    wifi: ath11k: fix error path leaks in some WMI WOW calls
    
    Fix two instances where we used to directly return the result of
    ath11k_wmi_cmd_send(...). Because we did not check the return value, we
    also did not free the skb in the error path.
    
    Fixes: 79802b13a4 ("ath11k: implement WoW enable and wakeup commands")
    Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260506134240.2284016-2-nico.escande@gmail.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez 369fd804f7 wifi: cfg80211: advance loop vars in cfg80211_merge_profile()
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 7666dbb1bacc4ba522b96740cba7283d243d16e1
Author: John Walker <johnwalker0@gmail.com>
Date:   Thu May 7 17:07:20 2026 -0600

    wifi: cfg80211: advance loop vars in cfg80211_merge_profile()
    
    cfg80211_merge_profile() reassembles a Multi-BSSID non-transmitted BSS
    profile that has been split across multiple consecutive MBSSID elements.
    Its while-loop calls
    
            cfg80211_get_profile_continuation(ie, ielen, mbssid_elem, sub_elem)
    
    but never advances mbssid_elem or sub_elem inside the body.  Each
    iteration therefore searches for a continuation that follows the same
    fixed pair; the helper returns the same next_mbssid; and the same
    next_sub bytes are memcpy()'d into merged_ie at a growing offset until
    the buffer fills.
    
    Advance both mbssid_elem and sub_elem to the just-consumed continuation
    so the next call to cfg80211_get_profile_continuation() searches for a
    further continuation beyond it (or returns NULL when none exists).
    
    A specially-crafted malicious beacon can take advantage of this bug
    to cause the kernel to spend an excessive amount of time in
    cfg80211_merge_profile (up to as much as 2ms per beacon received),
    which could theoretically be abused in some way.
    
    Cc: stable@vger.kernel.org
    Fixes: fe806e4992 ("cfg80211: support profile split between elements")
    Signed-off-by: John Walker <johnwalker0@gmail.com>
    Link: https://patch.msgid.link/20260507230720.64783-1-johnwalker0@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:36 +02:00
Jose Ignacio Tornos Martinez b607617284 wifi: nl80211: re-check wiphy netns in nl80211_prepare_wdev_dump() continuation
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 79240f3f6d766b342b57c32397d643e1cfa26b81
Author: Maoyi Xie <maoyi.xie@ntu.edu.sg>
Date:   Wed May 6 14:48:54 2026 +0800

    wifi: nl80211: re-check wiphy netns in nl80211_prepare_wdev_dump() continuation
    
    NL80211_CMD_GET_SCAN is implemented as a multi-call dumpit. The first
    invocation of nl80211_prepare_wdev_dump() validates the requested wdev
    against the caller's netns via __cfg80211_wdev_from_attrs(). Subsequent
    invocations look up the same wiphy by its global index and do not check
    that the wiphy is still in the caller's netns.
    
    Add the same filter to the continuation path. If the wiphy's netns no
    longer matches the caller's, return -ENODEV and the netlink dump
    machinery terminates the walk cleanly.
    
    Signed-off-by: Maoyi Xie <maoyi.xie@ntu.edu.sg>
    Link: https://patch.msgid.link/20260506064854.2207105-3-maoyixie.tju@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez 97c21d7b68 wifi: nl80211: require CAP_NET_ADMIN over the target netns in SET_WIPHY_NETNS
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 15994bb0cbb8fc4879da7552ddd08c1896261c39
Author: Maoyi Xie <maoyi.xie@ntu.edu.sg>
Date:   Wed May 6 14:48:53 2026 +0800

    wifi: nl80211: require CAP_NET_ADMIN over the target netns in SET_WIPHY_NETNS
    
    NL80211_CMD_SET_WIPHY_NETNS dispatches with GENL_UNS_ADMIN_PERM, which
    verifies that the caller has CAP_NET_ADMIN for the source netns. It
    doesn't verify that the caller has CAP_NET_ADMIN over the target netns
    selected by NL80211_ATTR_NETNS_FD or NL80211_ATTR_PID.
    
    This diverges from the convention enforced in
    net/core/rtnetlink.c::rtnl_get_net_ns_capable():
    
        /* For now, the caller is required to have CAP_NET_ADMIN in
         * the user namespace owning the target net ns.
         */
        if (!sk_ns_capable(sk, net->user_ns, CAP_NET_ADMIN))
            return ERR_PTR(-EACCES);
    
    A user with CAP_NET_ADMIN in their own user namespace can therefore
    push a wiphy into an arbitrary netns (including init_net) over which
    they have no privilege.
    
    Mirror the rtnetlink convention by requiring CAP_NET_ADMIN in the
    target netns before calling cfg80211_switch_netns().
    
    Signed-off-by: Maoyi Xie <maoyi.xie@ntu.edu.sg>
    Link: https://patch.msgid.link/20260506064854.2207105-2-maoyixie.tju@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez 1c928e02c5 wifi: nl80211: fix NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST usage
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 0f3c0a197309717d74729568f88957d448847937
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue May 5 13:38:37 2026 +0200

    wifi: nl80211: fix NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST usage
    
    This is documented as a u8 and has a policy of NLA_U8, but uses
    nla_get_u32() which means it's completely broken on big-endian.
    Fix it to use nla_get_u8().
    
    Fixes: 9bb7e0f24e ("cfg80211: add peer measurement with FTM initiator API")
    Link: https://patch.msgid.link/20260505113837.260159-2-johannes@sipsolutions.net
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez 1c58f86853 wifi: ath12k: initialize RSSI dBm conversion event state
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 81594a12d5cecb3ab35b603a00037c7c3ee87ab2
Author: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Date:   Mon Apr 27 16:00:11 2026 +0530

    wifi: ath12k: initialize RSSI dBm conversion event state
    
    Currently, the RSSI dBm conversion event handler leaves struct
    ath12k_wmi_rssi_dbm_conv_info_arg uninitialized on the stack before
    calling the TLV parser. If one of the optional sub-TLVs is absent, the
    corresponding *_present flag retains stack garbage and later gets read
    in ath12k_wmi_update_rssi_offsets(). With UBSAN enabled this triggers an
    invalid-load report for _Bool:
    
    UBSAN: invalid-load in drivers/net/wireless/ath/ath12k/wmi.c:9682:15
    load of value 9 is not a valid value for type '_Bool'
    Call Trace:
     ath12k_wmi_rssi_dbm_conversion_params_info_event.cold+0x72/0x85 [ath12k]
     ath12k_wmi_op_rx+0x1871/0x2ab0 [ath12k]
     ath12k_htc_rx_completion_handler+0x44b/0x810 [ath12k]
     ath12k_ce_recv_process_cb+0x554/0x9f0 [ath12k]
     ath12k_ce_per_engine_service+0xbe/0xf0 [ath12k]
     ath12k_pci_ce_workqueue+0x69/0x120 [ath12k]
    
    Initialize the parsed event state to zero before passing it to the TLV
    parser so missing sub-TLVs correctly leave the presence flags false.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
    
    Fixes: 0314ee81a91d ("wifi: ath12k: handle WMI event for real noise floor calculation")
    Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260427103011.2983269-1-rameshkumar.sundaram@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez b5838f15ec wifi: ath12k: fix leak in some ath12k_wmi_xxx() functions
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 05c5078de822148e7cb84968a8783ddfcb6c9ef1
Author: Nicolas Escande <nico.escande@gmail.com>
Date:   Wed Apr 22 18:32:58 2026 +0200

    wifi: ath12k: fix leak in some ath12k_wmi_xxx() functions
    
    Some wmi functions were using plain 'return ath12k_wmi_cmd_send(...)'
    without explicitly handling the error code. This leads to leaking the skb
    in case of error.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00218-QCAHKSWPL_SILICONZ-1
    
    Fixes: 66a9448b1b ("wifi: ath12k: implement hardware data filter")
    Fixes: 5931741709 ("wifi: ath12k: implement WoW enable and wakeup commands")
    Fixes: 4a3c212eee ("wifi: ath12k: add basic WoW functionalities")
    Fixes: 16f474d6d4 ("wifi: ath12k: add WoW net-detect functionality")
    Fixes: 1666108c74 ("wifi: ath12k: support ARP and NS offload")
    Fixes: aab4ae566f ("wifi: ath12k: support GTK rekey offload")
    Fixes: 7af01e5695 ("wifi: ath12k: handle keepalive during WoWLAN suspend and resume")
    Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260422163258.3013872-1-nico.escande@gmail.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez d8e0ff622e wifi: mac80211: tests: mark HT check strict
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 0cfff13c94cb5fa818bb374945ff280e08dc1bb9
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon May 4 08:54:27 2026 +0200

    wifi: mac80211: tests: mark HT check strict
    
    The HT check now only applies in strict mode since APs
    were found to be broken. Mark it as such.
    
    Fixes: 711a9c018ad2 ("wifi: mac80211: skip ieee80211_verify_sta_ht_mcs_support check in non-strict mode")
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez 519bfd27fa wifi: mac80211: check ieee80211_rx_data_set_link return in pubsta MLO path
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 9b55d5c1f5e481e391957f9096d798ca331c461b
Author: Michael Bommarito <michael.bommarito@gmail.com>
Date:   Tue Apr 21 20:06:51 2026 -0400

    wifi: mac80211: check ieee80211_rx_data_set_link return in pubsta MLO path
    
    __ieee80211_rx_handle_packet() resolves the link via
    ieee80211_rx_data_set_link() on the pubsta->mlo path but ignores the
    helper's return value.  Inside the helper,
      rx->link = rcu_dereference(rx->sdata->link[link_id]);
    can leave rx->link NULL if link_id references a slot already cleared
    by ieee80211_vif_set_links() during station-initiated ML
    reconfiguration (see mlme.c's ieee80211_ml_reconfiguration(), which
    invalidates sdata->link[] before the matching
    ieee80211_sta_remove_link() loop walks the link-sta hash).  RX dispatch
    still resolves a link_sta from the hash and then drops into
    ieee80211_prepare_and_rx_handle(), which dereferences link->conf->addr.
    
    Every other user site of ieee80211_rx_data_set_link() checks the return
    and bails on failure; only this branch did not.  Mirror the safe
    pattern.
    
    Fixes: e66b7920aa ("wifi: mac80211: fix initialization of rx->link and rx->link_sta")
    Assisted-by: Claude:claude-opus-4-7
    Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
    Link: https://patch.msgid.link/20260422000651.4184602-1-michael.bommarito@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez 1aebf0a536 wifi: nl80211: require admin perm on SET_PMK / DEL_PMK
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 381cd547bc6e35a610c5dfebe554d891eea40f03
Author: Michael Bommarito <michael.bommarito@gmail.com>
Date:   Tue Apr 21 18:45:52 2026 -0400

    wifi: nl80211: require admin perm on SET_PMK / DEL_PMK
    
    NL80211_CMD_SET_PMK and NL80211_CMD_DEL_PMK manage the offloaded
    4-way-handshake PMK state used by drivers advertising
    NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X.  The only in-tree
    driver that wires up both ->set_pmk / ->del_pmk and advertises
    the feature today is brcmfmac, so the practical reach of this
    patch is narrow.
    
    Both ops were introduced without a .flags gate, so the generic
    netlink layer dispatches them to an unprivileged caller instead
    of rejecting with -EPERM at the permission check.  Every other
    connection-state op in the adjacent block (CONNECT, ASSOCIATE,
    AUTHENTICATE, SET_KEY, ...) carries GENL_UNS_ADMIN_PERM; SET_PMK
    / DEL_PMK were introduced without the flag in 2017 and left
    unchanged by later refactors.  Johannes checked the original
    Intel submission history and confirmed there is no admin check
    in any prior revision either, so this seems likely to be a
    simple oversight rather than an intentional carve-out.
    
    Require GENL_UNS_ADMIN_PERM so the genl layer performs the same
    capable(CAP_NET_ADMIN) check as its siblings.  wpa_supplicant
    already needs CAP_NET_ADMIN for every other nl80211 op it issues,
    so supplicant operation is unaffected.  The worst case the missing
    gate enables today is an unprivileged local process on a
    multi-user system invalidating the offloaded PMK state of another
    user's 4-way-handshake session, forcing a full EAP re-auth on the
    next reconnect.
    
    Verified in UML: an unprivileged probe (uid=1000) sees
    SET_MULTICAST_TO_UNICAST (sibling op with GENL_UNS_ADMIN_PERM)
    return -EPERM on both pre- and post-fix kernels, while SET_PMK /
    DEL_PMK return -ENODEV from nl80211_pre_doit()'s wdev lookup pre-
    fix (proving dispatch crossed the genl permission check) and
    -EPERM post-fix (rejected at the genl layer as intended).
    
    Suggested-by: Johannes Berg <johannes@sipsolutions.net>
    Fixes: 3a00df5707 ("cfg80211: support 4-way handshake offloading for 802.1X")
    Assisted-by: Claude:claude-opus-4-7
    Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
    Acked-by: Arend van Spriel <arend.vanspriel@broadcom>
    Link: https://patch.msgid.link/20260421224552.4044147-1-michael.bommarito@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez 6cb8fcb140 wifi: brcmfmac: Fix potential use-after-free issue when stopping watchdog task
JIRA: https://issues.redhat.com/browse/RHEL-184812
CVE: CVE-2026-46180

commit c623b63580880cc742255eaed3d79804c1b91143
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date:   Thu Apr 16 11:33:39 2026 +0200

    wifi: brcmfmac: Fix potential use-after-free issue when stopping watchdog task
    
    Watchdog task might end between send_sig() and kthread_stop() calls, what
    results in the use-after-free issue. Fix this by increasing watchdog task
    reference count before calling send_sig() and dropping it by switching to
    kthread_stop_put().
    
    Cc: stable@vger.kernel.org
    Fixes: 373c83a801 ("brcmfmac: stop watchdog before detach and free everything")
    Fixes: a9ffda88be ("brcm80211: fmac: abstract bus_stop interface function pointer")
    Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
    Link: https://patch.msgid.link/20260416093339.2066829-1-m.szyprowski@samsung.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:35 +02:00
Jose Ignacio Tornos Martinez 2f641dc423 wifi: mac80211: skip ieee80211_verify_sta_ht_mcs_support check in non-strict mode
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 711a9c018ad252b2807f85d44e1267b595644f9b
Author: Rio Liu <rio@r26.me>
Date:   Wed Apr 15 16:57:13 2026 +0000

    wifi: mac80211: skip ieee80211_verify_sta_ht_mcs_support check in non-strict mode
    
    Some Xfinity XB8 firmware advertises >1 spatial stream MCS indexes in
    their basic HT-MCS set. On cards with lower spatial streams, the check
    would fail, and we'd be stuck with no HT when in fact work fine with its
    own supported rate. This change makes it so the check is only performed
    in strict mode.
    
    Fixes: 574faa0e936d ("wifi: mac80211: add HT and VHT basic set verification")
    Signed-off-by: Rio Liu <rio@r26.me>
    Link: https://patch.msgid.link/99Mv9QEceyPrQhSP52MtAVmz0_kWJmzqotJjD9YW6LGLqk-AZloAueUyHCURilFkuqOh6Ecv8i2KKdSE1ujP3AnbU5QEouVisT1w_V3xdfc=@r26.me
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez 0fcd8c7778 wifi: ath12k: use lockdep_assert_in_rcu_read_lock() for RCU assertions
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 4498664e2d5888efabb96428196a926acdaa25ed
Author: Yu-Hsiang Tseng <asas1asas200@gmail.com>
Date:   Thu Apr 23 02:08:14 2026 +0800

    wifi: ath12k: use lockdep_assert_in_rcu_read_lock() for RCU assertions
    
    Two functions in ath12k assert that the caller holds an RCU read lock:
    ath12k_mac_get_arvif() and ath12k_p2p_noa_update_vdev_iter(). Both use:
    
        WARN_ON(!rcu_read_lock_any_held());
    
    On kernels using preemptible RCU (CONFIG_PREEMPT=y or CONFIG_PREEMPT_RT=y)
    without CONFIG_DEBUG_LOCK_ALLOC, this produces a false positive splat
    whenever these functions are invoked from paths that do hold the RCU
    read lock (e.g. firmware stats processing or mac80211 interface
    iteration).
    
    Root cause:
    
      - Without CONFIG_DEBUG_LOCK_ALLOC, rcu_read_lock_any_held() is a
        static inline that returns !preemptible() as a proxy for "in an
        RCU read section".
    
      - With preemptible RCU, rcu_read_lock() does not disable preemption.
        A task can therefore be preemptible while legitimately holding an
        RCU read lock, making the proxy unreliable.
    
      - Callers such as ath12k_wmi_tlv_rssi_chain_parse() (via guard(rcu)())
        and ieee80211_iterate_active_interfaces_atomic() do hold the RCU
        read lock, so these warnings are incorrect.
    
    Typical splat seen on a WCN7850 station with periodic fw stats
    processing:
    
      WARNING: drivers/net/wireless/ath/ath12k/mac.c:791 at
        ath12k_mac_get_arvif+0x9e/0xd0 [ath12k]
      Tainted: G W O 6.19.13-rt #1 PREEMPT_RT
      Call Trace:
       ath12k_wmi_tlv_rssi_chain_parse+0x69/0x170 [ath12k]
       ath12k_wmi_tlv_iter+0x7f/0x120 [ath12k]
       ath12k_wmi_tlv_fw_stats_parse+0x342/0x6b0 [ath12k]
       ath12k_wmi_op_rx+0xe9e/0x3150 [ath12k]
       ath12k_htc_rx_completion_handler+0x3df/0x5b0 [ath12k]
       ath12k_ce_per_engine_service+0x325/0x3e0 [ath12k]
       ath12k_pci_ce_workqueue+0x20/0x40 [ath12k]
    
    Replace WARN_ON(!rcu_read_lock_any_held()) with
    lockdep_assert_in_rcu_read_lock(), which is gated on CONFIG_PROVE_RCU
    and therefore compiles out entirely when PROVE_RCU is disabled.
    PROVE_RCU kernels continue to get the full lockdep-based check, and
    the new helper precisely checks for rcu_read_lock() rather than any
    RCU variant, which better matches the callers' expectations.
    
    Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
    
    Fixes: 3dd2c68f206e ("wifi: ath12k: prepare vif data structure for MLO handling")
    Suggested-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Signed-off-by: Yu-Hsiang Tseng <asas1asas200@gmail.com>
    Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Link: https://patch.msgid.link/20260422180814.1938317-1-asas1asas200@gmail.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez ad358f4c9a wifi: ath12k: fix OF node refcount imbalance in WSI graph traversal
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit f3ba9e05cc7b65f41f58bb4808f6c3a8f7894bb1
Author: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
Date:   Fri Apr 10 12:43:00 2026 +0530

    wifi: ath12k: fix OF node refcount imbalance in WSI graph traversal
    
    ath12k_core_get_wsi_info() traverses the WSI (Wired Serial Interface)
    device graph starting from dev->of_node. The current code uses
    dev->of_node directly as the local traversal pointer and calls
    of_node_put() on error.
    
    Since the driver does not own a reference to dev->of_node, dropping it
    during traversal results in the following OF refcount underflow:
    
    OF: ERROR: of_node_release() detected bad of_node_put() on /soc@0/wifi@c000000
    CPU: 1 UID: 0 PID: 210 Comm: insmod Not tainted 6.19.0-rc4-next-20260109-00023-g797dd36dc178 #26 PREEMPT
    Hardware name: Qualcomm Technologies, Inc. IPQ5332 MI01.2 (DT)
    Call trace:
     show_stack+0x18/0x24 (C)
     dump_stack_lvl+0x60/0x80
     dump_stack+0x18/0x24
     of_node_release+0x164/0x1a0
     kobject_put+0xb4/0x278
     of_node_put+0x18/0x28
     ath12k_core_init+0x29c/0x5d4 [ath12k]
     ath12k_ahb_probe+0x950/0xc14 [ath12k]
     platform_probe+0x5c/0xa4
     really_probe+0xc0/0x3ec
     __driver_probe_device+0x80/0x170
     driver_probe_device+0x3c/0x120
     __driver_attach+0xc4/0x218
    OF: ERROR: next of_node_put() on this node will result in a kobject warning 'refcount_t: underflow; use-after-free.'
    
    Fix this by explicitly acquiring a reference to the starting node
    using of_node_get() and attaching automatic cleanup via
    __free(device_node).
    
    Each discovered WSI node is stored in ag->wsi_node[] with its own
    of_node_get() reference. These references are later released in
    ath12k_core_free_wsi_info() during driver teardown.
    
    Also remove unnecessary memset() of wsi_node array since cleanup now
    explicitly sets pointers to NULL.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    
    Fixes: 908c10c860e0 ("wifi: ath12k: parse multiple device information from Device Tree")
    Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260410071300.2323603-1-aaradhana.sahu@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez 9eb8935492 net: use get_random_u{16,32,64}() where appropriate [wireless]
JIRA: https://issues.redhat.com/browse/RHEL-184812

Conflicts: only wireless

commit 9addea5d44b69d377ba97a36f7a19e1097969e18
Author: David Carlier <devnexen@gmail.com>
Date:   Tue Apr 7 16:07:58 2026 +0100

    net: use get_random_u{16,32,64}() where appropriate
    
    Use the typed random integer helpers instead of
    get_random_bytes() when filling a single integer variable.
    The helpers return the value directly, require no pointer
    or size argument, and better express intent.
    
    Skipped sites writing into __be16 (netdevsim) and __le64
    (ceph) fields where a direct assignment would trigger
    sparse endianness warnings.
    
    Signed-off-by: David Carlier <devnexen@gmail.com>
    Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://patch.msgid.link/20260407150758.5889-1-devnexen@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez 3b88c36cd0 wifi: cfg80211: Explicitly include <linux/export.h> in michael-mic.c
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit fa489a77e3267e05df95db96ba98e141ec07cbd9
Author: Eric Biggers <ebiggers@kernel.org>
Date:   Wed Apr 8 20:03:33 2026 -0700

    wifi: cfg80211: Explicitly include <linux/export.h> in michael-mic.c
    
    This happened to be included transitively via a long chain starting with
    <linux/bitops.h>, but it's less fragile to include it explicitly.
    
    Signed-off-by: Eric Biggers <ebiggers@kernel.org>
    Link: https://patch.msgid.link/20260409030333.13024-1-ebiggers@kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez adf8e7488e wifi: ath10k: Add device-tree quirk to skip host cap QMI requests
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 6a7693873b20680a3c33bae0c9f9cb3185f64ade
Author: Amit Pundir <amit.pundir@linaro.org>
Date:   Tue Apr 7 08:43:55 2026 +0200

    wifi: ath10k: Add device-tree quirk to skip host cap QMI requests
    
    Some firmware versions do not support the host capability QMI request.
    Since this request occurs before firmware-N.bin and board-M.bin are
    loaded, the quirk cannot be expressed in the firmware itself.
    
    The root cause is unclear, but there appears to be a generation of
    firmware that lacks host capability support.
    
    Without this quirk, ath10k_qmi_host_cap_send_sync() returns
    QMI_ERR_MALFORMED_MSG_V01 before loading the firmware. This error is not
    fatal - Wi-Fi services still come up successfully if the request is simply
    skipped.
    
    Add a device-tree quirk to skip the host capability QMI request on devices
    whose firmware does not support it.
    
    For example, firmware build
    "QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1"
    on Xiaomi Poco F1 phone requires this quirk.
    
    Suggested-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
    Tested-by: Paul Sajna <sajattack@postmarketos.org>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
    Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: David Heidelberg <david@ixit.cz>
    Link: https://patch.msgid.link/20260407-skip-host-cam-qmi-req-v5-2-dfa8a05c6538@ixit.cz
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez 2049c942ae wifi: ath12k: Use michael_mic() from cfg80211
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 65abaa9e722ef29ce79dbc6034195961aa33954c
Author: Eric Biggers <ebiggers@kernel.org>
Date:   Tue Apr 7 20:06:49 2026 -0700

    wifi: ath12k: Use michael_mic() from cfg80211
    
    Just use the michael_mic() function from cfg80211 instead of a local
    implementation of it using the crypto_shash API.
    
    Note: when the kernel is booted with fips=1,
    crypto_alloc_shash("michael_mic", 0, 0) always returned
    ERR_PTR(-ENOENT), because Michael MIC is not a "FIPS allowed" algorithm.
    For now, just preserve that behavior exactly, to ensure that TKIP is not
    allowed to be used in FIPS mode.  This logic actually seems to disable
    the entire driver in FIPS mode and not just TKIP, but that was the
    existing behavior.  Supporting this driver in FIPS mode, if anyone
    actually needs it there, should be a separate commit.
    
    Signed-off-by: Eric Biggers <ebiggers@kernel.org>
    Link: https://patch.msgid.link/20260408030651.80336-5-ebiggers@kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez 1b4af0bb42 wifi: ath11k: Use michael_mic() from cfg80211
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 295e476b8217345ba25ff69d8e78c842771c31a8
Author: Eric Biggers <ebiggers@kernel.org>
Date:   Tue Apr 7 20:06:48 2026 -0700

    wifi: ath11k: Use michael_mic() from cfg80211
    
    Just use the michael_mic() function from cfg80211 instead of a local
    implementation of it using the crypto_shash API.
    
    Note: when the kernel is booted with fips=1,
    crypto_alloc_shash("michael_mic", 0, 0) always returned
    ERR_PTR(-ENOENT), because Michael MIC is not a "FIPS allowed" algorithm.
    For now, just preserve that behavior exactly, to ensure that TKIP is not
    allowed to be used in FIPS mode.  This logic actually seems to disable
    the entire driver in FIPS mode and not just TKIP, but that was the
    existing behavior.  Supporting this driver in FIPS mode, if anyone
    actually needs it there, should be a separate commit.
    
    Signed-off-by: Eric Biggers <ebiggers@kernel.org>
    Link: https://patch.msgid.link/20260408030651.80336-4-ebiggers@kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez 593d9df51a wifi: mac80211, cfg80211: Export michael_mic() and move it to cfg80211
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 613c83766884503f0f6bfdc45964c84b5286091c
Author: Eric Biggers <ebiggers@kernel.org>
Date:   Tue Apr 7 20:06:47 2026 -0700

    wifi: mac80211, cfg80211: Export michael_mic() and move it to cfg80211
    
    Export michael_mic() so that the ath11k and ath12k drivers can call it.
    In addition, move it from mac80211 to cfg80211 so that the ipw2x00
    drivers, which depend on cfg80211 but not mac80211, can also call it.
    
    Currently these drivers have their own local implementations of
    michael_mic() based on crypto_shash, which is redundant and inefficient.
    By consolidating all the Michael MIC code into cfg80211, we'll be able
    to remove the duplicate Michael MIC code in the crypto/ directory.
    
    Signed-off-by: Eric Biggers <ebiggers@kernel.org>
    Link: https://patch.msgid.link/20260408030651.80336-3-ebiggers@kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:34 +02:00
Jose Ignacio Tornos Martinez 77e5a5001b wifi: ath12k: Enable IPQ5424 WiFi device support
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 8fb66931fe31094aa2e1b2a5c015050b8b4cb2ec
Author: Sowmiya Sree Elavalagan <sowmiya.elavalagan@oss.qualcomm.com>
Date:   Tue Apr 7 10:56:33 2026 +0530

    wifi: ath12k: Enable IPQ5424 WiFi device support
    
    Currently, ath12k AHB (in IPQ5332) uses SCM calls to authenticate the
    firmware image to bring up userpd. From IPQ5424 onwards, Q6 firmware can
    directly communicate with the Trusted Management Engine - Lite (TME-L),
    eliminating the need for SCM calls for userpd bring-up.
    
    Hence, to enable IPQ5424 device support, use qcom_mdt_load_no_init() and
    skip the SCM call as Q6 will directly authenticate the userpd firmware.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Sowmiya Sree Elavalagan <sowmiya.elavalagan@oss.qualcomm.com>
    Co-developed-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
    Signed-off-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
    Co-developed-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
    Signed-off-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260407-ath12k-ipq5424-v5-6-8e96aa660ec4@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez b6e1bfc5d4 wifi: ath12k: Add CE remap hardware parameters for IPQ5424
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 38cff745fa7c0b006f95565a2e5de9f0cac13702
Author: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
Date:   Tue Apr 7 10:56:32 2026 +0530

    wifi: ath12k: Add CE remap hardware parameters for IPQ5424
    
    Add CE remap hardware parameters for Ath12k AHB device IPQ5424.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
    Signed-off-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260407-ath12k-ipq5424-v5-5-8e96aa660ec4@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez e6f6dcaabc wifi: ath12k: add ath12k_hw_regs for IPQ5424
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 7e2131ba332f5ae62b6302eb889feeeea56a1691
Author: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
Date:   Tue Apr 7 10:56:31 2026 +0530

    wifi: ath12k: add ath12k_hw_regs for IPQ5424
    
    Add register addresses (ath12k_hw_regs) for ath12k AHB based
    WiFi 7 device IPQ5424.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
    Signed-off-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260407-ath12k-ipq5424-v5-4-8e96aa660ec4@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez 3e778a6e29 wifi: ath12k: add ath12k_hw_version_map entry for IPQ5424
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 74f5a619b1a6a06cc5e6246d326da5b6f2b0fcbd
Author: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
Date:   Tue Apr 7 10:56:30 2026 +0530

    wifi: ath12k: add ath12k_hw_version_map entry for IPQ5424
    
    Add a new ath12k_hw_version_map entry for the AHB based WiFi 7 device
    IPQ5424.
    
    Reuse most of the ath12k_hw_version_map fields such as hal_ops,
    hal_desc_sz, tcl_to_wbm_rbm_map, and hal_params from IPQ5332. The
    register addresses differ on IPQ5424, hence set hw_regs temporarily
    to NULL and populated it in a subsequent patch.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260407-ath12k-ipq5424-v5-3-8e96aa660ec4@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez b22965f68b wifi: ath12k: Add ath12k_hw_params for IPQ5424
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit b1ad1a052beda2ac0400d6d4cc05dd2e549a6936
Author: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
Date:   Tue Apr 7 10:56:29 2026 +0530

    wifi: ath12k: Add ath12k_hw_params for IPQ5424
    
    Add ath12k_hw_params for the ath12k AHB-based WiFi 7 device IPQ5424.
    The WiFi device IPQ5424 is similar to IPQ5332. Most of the hardware
    parameters like hw_ops, wmi_init, ring_mask, etc., are the same between
    IPQ5424 and IPQ5332, hence use these same parameters for IPQ5424.
    Some parameters are specific to IPQ5424; initially set these to
    0 or NULL, and populate them in subsequent patches.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Saravanakumar Duraisamy <quic_saradura@quicinc.com>
    Signed-off-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260407-ath12k-ipq5424-v5-2-8e96aa660ec4@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez 1501e194c6 wifi: ath12k: Create symlink for each radio in a wiphy
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 0ec4b904be72f78ba6ce6bb9a8aaf2eb6b9b1004
Author: Roopni Devanathan <roopni.devanathan@oss.qualcomm.com>
Date:   Thu Apr 2 10:44:02 2026 +0530

    wifi: ath12k: Create symlink for each radio in a wiphy
    
    In single-wiphy design, when more than one radio is registered as a
    single-wiphy in the mac80211 layer, the following warnings are seen:
    
    1. debugfs: File 'ath12k' in directory 'phy0' already present!
    2. debugfs: File 'simulate_fw_crash' in directory 'pci-0000:57:00.0' already present!
       debugfs: File 'device_dp_stats' in directory 'pci-01777777777777777777777:57:00.0' already present!
    
    When more than one radio is registered as a single-wiphy, symlinks for
    all the radios are created in the same debugfs directory:
    /sys/kernel/debug/ieee80211/phyX/ath12k, resulting in warning 1. When a
    symlink is created for the first radio, since the 'ath12k' directory is
    not present, it will be created and no warning will be thrown. But when
    symlink is created for more than one radio, since the 'ath12k'
    directory was already created for symlink for radio 1, a warning is
    thrown complaining that 'ath12k' directory is already present. To resolve
    warning 1, create symlink for each radio in separate debugfs directories.
    For the first radio, the symlink will always be the 'ath12k' directory.
    This ensures that the existing directory structure is retained for
    single-wiphy and multi-wiphy architectures. In single-wiphy architecture
    with multiple radios, create symlink in separate debugfs directories
    introduced by mac80211.
    
    Existing debugfs directory in single-wiphy architecture:
    /sys/kernel/debug/ieee80211/phyX/ath12k is a symlink to
    /sys/kernel/debug/ath12k/pci-0001:01:00.0/macY
    
    Proposed debugfs directory in single-wiphy architecture with one radio:
    /sys/kernel/debug/ieee80211/phyX/ath12k is a symlink to
    /sys/kernel/debug/ath12k/pci-0001:01:00.0/mac0
    
    Proposed debugfs directory in single-wiphy architecture with more than
    one radio:
    /sys/kernel/debug/ieee80211/phyX/radio0/ath12k is a symlink to
    /sys/kernel/debug/ath12k/pci-0001:01:00.0/mac0 and
    /sys/kernel/debug/ieee80211/phyX/radioY/ath12k is a symlink to
    /sys/kernel/debug/ath12k/pci-0001:01:00.0/macY
    
    Where X is phy index and Y is radio index, seen in
    'iw phyX info | grep Idx'. Two symlinks for the first radio are to ensure
    compatibility with the existing design. Add radio_idx inside ar, to track
    the radio index in probing order.
    
    API ath12k_debugfs_pdev_create() that creates SoC entries is called more
    than once when hardware group starts up, resulting in warning 2. To
    resolve this warning, remove all other calls to this API and add one
    inside the ath12k_core_pdev_create(). This API carries all pdev-specific
    initializations and can conveniently hold a call to
    ath12k_debugfs_pdev_create().
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
    Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
    
    Co-developed-by: Harshitha Prem <harshitha.prem@oss.qualcomm.com>
    Signed-off-by: Harshitha Prem <harshitha.prem@oss.qualcomm.com>
    Signed-off-by: Roopni Devanathan <roopni.devanathan@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260402051402.3903795-1-roopni.devanathan@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez 5e266c39f9 wifi: ath12k: Skip adding inactive partner vdev info
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 7d7dc26f72abb7a76abb4a68ebad75d5ab7b375e
Author: Avula Sri Charan <quic_asrichar@quicinc.com>
Date:   Mon Mar 30 09:37:32 2026 +0530

    wifi: ath12k: Skip adding inactive partner vdev info
    
    Currently, a vdev that is created is considered active for partner link
    population. In case of an MLD station, non-associated link vdevs can be
    created but not started. Yet, they are added as partner links. This leads
    to the creation of stale FW partner entries which accumulate and cause
    assertions.
    
    To resolve this issue, check if the vdev is started and operating on a
    chosen frequency, i.e., arvif->is_started, instead of checking if the vdev
    is created, i.e., arvif->is_created. This determines if the vdev is active
    or not and skips adding it as a partner link if it's inactive.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01181-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Avula Sri Charan <quic_asrichar@quicinc.com>
    Signed-off-by: Roopni Devanathan <roopni.devanathan@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260330040732.1847263-1-roopni.devanathan@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez c2bd5d74a4 wifi: ath12k: Support channel change stats
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit af5708ed67fc562bc45fafbd0f95789c464c0105
Author: Harish Rachakonda <quic_rachakon@quicinc.com>
Date:   Thu Mar 26 10:36:41 2026 +0530

    wifi: ath12k: Support channel change stats
    
    Add support to request channel change stats from the firmware through
    HTT stats type 76. These stats give channel switch details like the
    channel that the radio changed to, its center frequency, time taken
    for the switch, chainmask details, etc.
    
    Sample output:
    echo 76 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type
    cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats
    Channel Change Timings:
    |PRIMARY CHANNEL FREQ|BANDWIDTH CENTER FREQ|PHYMODE|TX_CHAINMASK|RX_CHAINMASK|SWITCH TIME(us)|INI(us)|TPC+CTL(us)|CAL(us)|MISC(us)|CTL(us)|SW PROFILE|
    |                5200|                 5200|     24|          15|          15|         448850|   2410|      10546| 434593|    1071|   1100|         4|
    |                5240|                 5240|     24|          15|          15|         450730|   4106|      10524| 434528|    1306|   1150|         4|
    |                5180|                 5210|     26|          15|          15|         467894|   4764|      10438| 451101|    1337|   1508|         4|
    |                5200|                 5200|      0|          15|          15|          13838|   2692|       1736|   8558|     686|    802|         6|
    |                5180|                 5180|      0|          15|          15|          13465|   3207|        855|   8579|     578|    760|         6|
    |                5200|                 5200|     24|          15|          15|         570321|   2441|      10439| 555661|    1574|    949|         4|
    
    Note: QCC2072 and WCN7850 firmware does not support HTT stats type 76.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01181-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Harish Rachakonda <quic_rachakon@quicinc.com>
    Signed-off-by: Roopni Devanathan <roopni.devanathan@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260326050641.3066562-1-roopni.devanathan@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez 0014195381 wifi: ath12k: Rename hw_link_id to radio_idx in ath12k_ah_to_ar()
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit ba563287beaa99c18144b2e39f63b89412abfd18
Author: Roopni Devanathan <roopni.devanathan@oss.qualcomm.com>
Date:   Tue Mar 31 10:28:34 2026 +0530

    wifi: ath12k: Rename hw_link_id to radio_idx in ath12k_ah_to_ar()
    
    ath12k_ah_to_ar() is returning radio from the given hardware based on the
    radio index passed. But, the variable that radio index is received at is
    wrongly named 'hw_link_id', which points to the hardware link index that
    comes from the firmware. This affects readability.
    
    Resolve this by renaming 'hw_link_id' to 'radio_idx'.
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Roopni Devanathan <roopni.devanathan@oss.qualcomm.com>
    Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260331045834.1181924-1-roopni.devanathan@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:33 +02:00
Jose Ignacio Tornos Martinez 1a21fbfeef wifi: mac80211: enable MLO support for 4-address mode interfaces
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 915c1d23e2e3a94f432bda6fb64f47c06f840ca1
Author: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
Date:   Thu Mar 26 22:17:23 2026 +0530

    wifi: mac80211: enable MLO support for 4-address mode interfaces
    
    The current code does not support establishing MLO connections for
    interfaces operating in 4-address AP_VLAN mode.
    MLO bringup is blocked by sanity checks in cfg.c, iface.c, and mlme.c,
    which prevent MLD initialization when use_4addr is enabled.
    Remove these restrictions to allow 4-address AP_VLAN interfaces to
    initialize as part of an MLD and successfully participate in MLO
    connections. This patch series also adds the necessary changes to
    support WDS operation in MLO, making these modifications valid.
    
    Allow 4-address mode interfaces to:
    - Proceed with MLD initialization during interface setup
    - Add MLO links dynamically via ieee80211_add_intf_link()
    - Establish associations with MLO-capable access points
    - Support AP_VLAN interfaces with MLO parent APs
    
    Signed-off-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260326164723.553927-4-tamizh.raja@oss.qualcomm.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez fd077e5422 wifi: mac80211: use ap_addr for 4-address NULL frame destination
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 594be50a3f0a6b7389f40f7acbf0dd731beb5204
Author: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
Date:   Thu Mar 26 22:17:22 2026 +0530

    wifi: mac80211: use ap_addr for 4-address NULL frame destination
    
    Currently ieee80211_send_4addr_nullfunc() uses deflink.u.mgd.bssid
    for addr1 and addr3 fields. In MLO configurations, deflink.u.mgd.bssid
    represents link 0's BSSID and is not updated when link 0 is not an
    assoc link. This causes 4-address NULL frames to be sent to the
    wrong address, preventing WDS AP_VLAN interface creation on the peer AP.
    
    To fix this use sdata->vif.cfg.ap_addr instead, which contains the AP's MLD
    address populated during authentication/association and remains
    valid regardless of which links are active.
    
    This ensures 4-address NULL frames reach the correct AP, allowing
    proper WDS operation over MLO connections.
    
    Co-developed-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
    Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
    Signed-off-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260326164723.553927-3-tamizh.raja@oss.qualcomm.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez 9b579ff0ad wifi: mac80211: synchronize valid links for WDS AP_VLAN interfaces
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 469d5d5a3b7a133837004a18f34c899625fd5941
Author: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
Date:   Thu Mar 26 22:17:21 2026 +0530

    wifi: mac80211: synchronize valid links for WDS AP_VLAN interfaces
    
    The current code does not provide any link-configuration support
    for 4-address mode WDS AP_VLAN interfaces in MLO setups, preventing
    MLD stations from being added correctly. Add the required handling
    to enable proper integration of 4-address WDS stations into
    an MLO environment.
    
    When a 4-address station associates with an MLO AP, compute the
    intersection of valid links between the master AP interface and
    the station's advertised capabilities. Configure the AP_VLAN interface
    with only these common links to ensure correct data-path operation.
    
    This update ensures AP_VLAN interfaces correctly track link-state
    transitions and maintain consistent addressing across all active MLO links.
    
    Co-developed-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
    Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
    Signed-off-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260326164723.553927-2-tamizh.raja@oss.qualcomm.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez 366fe1d825 wifi: mac80211: handle VHT EXT NSS in ieee80211_determine_our_sta_mode()
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit b5b8e295973083abf823fb66647a7c702a8db8a7
Author: Nicolas Escande <nico.escande@gmail.com>
Date:   Fri Mar 27 11:02:56 2026 +0100

    wifi: mac80211: handle VHT EXT NSS in ieee80211_determine_our_sta_mode()
    
    A station which has a NSS ratio on the number of streams it is capable of
    in 160MHz VHT operation is supposed to use the 'Extended NSS BW Support'
    as defined by section '9.4.2.156.2 VHT Capabilities Information field'.
    
    This was missing in ieee80211_determine_our_sta_mode() and so we would
    wrongfully downgrade our bandwidth when connecting to an AP that supported
    160MHz with messages such as:
    
            [   37.638346] wlan1: AP XX:XX:XX:XX:XX:XX changed bandwidth in assoc response, new used config is 5280.000 MHz, width 3 (5290.000/0 MHz)
    
    Fixes: 310c8387c6 ("wifi: mac80211: clean up connection process")
    Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
    Link: https://patch.msgid.link/20260327100256.3101348-1-nico.escande@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez 2e05a7ca67 wifi: mac80211: remove unused variables in minstrel_ht_alloc_sta
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit c4ed2c3f4f5e34156e607f2ea92cefad638af50e
Author: Jiajia Liu <liujiajia@kylinos.cn>
Date:   Tue Apr 7 14:32:05 2026 +0800

    wifi: mac80211: remove unused variables in minstrel_ht_alloc_sta
    
    Remove the unused variable max_rates and related code. Also remove the
    variable mi and pass type to kzalloc_obj instead.
    
    Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn>
    Link: https://patch.msgid.link/20260407063205.68471-1-liujiajia@kylinos.cn
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez 7aab6e225e wifi: brcmfmac: silence warning for non-existent, optional firmware
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 368f5098ed0b2eb5d06dbbe692c163c85f240a4d
Author: Alexander Stein <alexander.stein@ew.tq-group.com>
Date:   Sat Mar 28 15:01:21 2026 +0100

    wifi: brcmfmac: silence warning for non-existent, optional firmware
    
    The driver tries to load optional firmware files, specific to
    the actual board compatible. These might not exist resulting in a warning
    like this:
    brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac4373-sdio.tq,imx93-tqma9352-mba93xxla-mini.bin failed with error -2
    
    Silence this by using firmware_request_nowait_nowarn() for all firmware
    loads which use brcmf_fw_request_done_alt_path() as callback. This one
    handles optional firmware files.
    
    Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
    Tested-by: Christian Hewitt <christianshewitt@gmail.com>
    [arend: use nowarn api for optional firmware files]
    Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
    Link: https://patch.msgid.link/20260328140121.2583606-1-arend.vanspriel@broadcom.com
    [clean up code a bit]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez c785634245 wifi: wilc1000: use kzalloc_flex
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit d278bf868604af9895f4b8b4f7f4bb82e317740c
Author: Rosen Penev <rosenp@gmail.com>
Date:   Thu Mar 26 20:06:16 2026 -0700

    wifi: wilc1000: use kzalloc_flex
    
    Because key is a flexible array member, kzalloc_flex can be used to
    handle the math properly and simplify the code slightly.
    
    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    Link: https://patch.msgid.link/20260327030616.8774-1-rosenp@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez 3dc5a886aa wifi: brcmfmac: of: defer probe for MAC address
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 084863593243c5dce0f2eef44e23de8c53ebf4a2
Author: Rosen Penev <rosenp@gmail.com>
Date:   Thu Feb 19 18:27:39 2026 -0800

    wifi: brcmfmac: of: defer probe for MAC address
    
    of_get_mac_address can return EPROBE_DEFER if the specific nvmem driver
    has not been loaded yet.
    
    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
    Link: https://patch.msgid.link/20260220022739.41755-1-rosenp@gmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez 7b3db440d7 wifi: brcmfmac: Fix error pointer dereference
JIRA: https://issues.redhat.com/browse/RHEL-184812
CVE: CVE-2026-53093

commit dd8592fc6007a451c3e4b9025de365e39de8178a
Author: Ethan Tidmore <ethantidmore06@gmail.com>
Date:   Mon Feb 16 20:30:43 2026 -0600

    wifi: brcmfmac: Fix error pointer dereference
    
    The function brcmf_chip_add_core() can return an error pointer and is
    not checked. Add checks for error pointer.
    
    Detected by Smatch:
    drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:1010 brcmf_chip_recognition() error:
    'core' dereferencing possible ERR_PTR()
    
    drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:1013 brcmf_chip_recognition() error:
    'core' dereferencing possible ERR_PTR()
    
    drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:1016 brcmf_chip_recognition() error:
    'core' dereferencing possible ERR_PTR()
    
    drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:1019 brcmf_chip_recognition() error:
    'core' dereferencing possible ERR_PTR()
    
    drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:1022 brcmf_chip_recognition() error:
    'core' dereferencing possible ERR_PTR()
    
    Fixes: cb7cf7be9e ("brcmfmac: make chip related functions host interface independent")
    Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
    Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
    Link: https://patch.msgid.link/20260217023043.73631-1-ethantidmore06@gmail.com
    [add missing wifi: prefix]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:32 +02:00
Jose Ignacio Tornos Martinez b6dd3ac1cb wifi: mac80211: allow add_key on NAN interfaces
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 014eec318fc00f0b497bffa04f1a45255ba7ff5e
Author: Avraham Stern <avraham.stern@intel.com>
Date:   Thu Mar 26 12:14:45 2026 +0200

    wifi: mac80211: allow add_key on NAN interfaces
    
    Keys may be added to the NAN interfaces to protect
    NAN management frames and data, allow that.
    
    Signed-off-by: Avraham Stern <avraham.stern@intel.com>
    Reviewed-by: Ilan Peer <ilan.peer@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.34961ba9a0c4.I5b7c646c456d4112e5ab8663026153ace9b6b7d6@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez 27aceb605f wifi: mac80211: report and drop spurious NAN Data frames
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 5f6fba9a1e7b03a6369a1078d3921440fff95200
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:44 2026 +0200

    wifi: mac80211: report and drop spurious NAN Data frames
    
    According to Wi-Fi Aware (TM) 4.0 specification 6.2.5, in case a frame
    is recevied from an address that doesn't belong to any active NDP, the
    frame should be dropped and a NAN Data Path Termination should be sent
    to the transmitter.
    Do it by dropping the frame and calling cfg80211_rx_spurious_frame in
    that case.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.721b3a61c580.I19e3572508beeba143871682c80e9a56b6c1046a@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez f963fc2986 wifi: mac80211: allow block ack agreements in NAN Data
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 779df4461440b34278d8558c8c977f8ff1d6c18d
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:43 2026 +0200

    wifi: mac80211: allow block ack agreements in NAN Data
    
    Allow receiving and sending Add Block Ack action frames for NAN Data
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.fe51df9d65f4.I104435f2af65e032cba168b1d842cb9610720041@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez b072e2bcbc wifi: mac80211: Accept frames on NAN DATA interfaces
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 61408403e2b4a3e90b2bc6eda9a57837c4fa8ece
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:42 2026 +0200

    wifi: mac80211: Accept frames on NAN DATA interfaces
    
    Accept frames there were received on NAN DATA interfaces:
    
    - Data frames, both multicast or unicast
    - Non-Public action frames, both multicast or unicast
    - Unicast secure management frames
    - FromDS and ToDS are 0.
    
    While at it, check FromDS/ToDS also for NAN management frames.
    
    Accept only data frames from devices that are part of the NAN
    cluster.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.0e6f37d4a40c.Iaa84cc3d063392f0150fcdf2bf610bdb41062f70@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez b13ef2aac3 wifi: mac80211: add support for TX over NAN_DATA interfaces
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit b5e4adbd01d1c4f864941162133840a370008e2c
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:41 2026 +0200

    wifi: mac80211: add support for TX over NAN_DATA interfaces
    
    Add support for TXing frames over NAN_DATA interfaces:
    - find the NDI station
    - populoate the addresses fields
    - use NUM_NL80211_BANDS for the band, similar to NAN interfaces.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.b1d248947158.I04b27d9727f7a553fa80520cf6e532683ac03690@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez 769845eff5 wifi: mac80211: update NAN data path state on schedule changes
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit e1d5c95456a433b8898fff48c17a6150e69e9af9
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:40 2026 +0200

    wifi: mac80211: update NAN data path state on schedule changes
    
    A carrier of an NDI interface is turned on when there is at least one NDI
    station that: (1) correlates to this interface (2) is authorized (3) the
    NAN peer to which this station belongs has at least one common slot with
    the local schedule. Otherwise, it is turned off.
    (common slots are slots where both schedules are active on compatible
     channels.)
    
    Implement the calculation of the carrier state and trigger it when
    needed.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.98ff4115406f.Ie796487ab9eb23cda819b0afac57e7267b134911@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez 6f8ed83359 wifi: mac80211: add NAN peer schedule support
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 840492bf333bf3b69503a573a7ad71147a7ab67e
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:39 2026 +0200

    wifi: mac80211: add NAN peer schedule support
    
    Peer schedules specify which channels the peer is available on and when.
    Add support for configuring peer NAN schedules:
    - build and store the schedule and maps
    - for each channel, make sure that it fits into the capabilities, and
      take the minimum between it and the local compatible nan channel.
    - configure the driver
    
    Note that the removal of a peer schedule should be done by the driver
    upon NMI station removal.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.185ff2283fa6.I0345eb665be8ccf4a77eb1aca9a421eb8d2432e2@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez 38e4809516 wifi: mac80211: support NAN stations
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 27e9b326b67440b559517977e19682461a50da2c
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:38 2026 +0200

    wifi: mac80211: support NAN stations
    
    Add support for both NMI and NDI stations.
    
    The NDI station will be linked to the NMI station of the NAN peer for
    which the NDI station is added.
    
    A peer can choose to reuse its NMI address as the NDI address.
    Since different keys might be in use for NAN management and for data
    frames, we will have 2 different stations, even if they'll have the same
    address.
    
    Even though there are no links in NAN, sta->deflink will still be used
    to store the one set of capabilities and SMPS mode.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.9fdd37b8e755.I7a7bd6e8e751cab49c329419485839afd209cfc6@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:31 +02:00
Jose Ignacio Tornos Martinez c551d994b0 wifi: mac80211: handle reconfig for NAN DATA interfaces
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit e43ec602201c5477508855f9c159956df18d108f
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:37 2026 +0200

    wifi: mac80211: handle reconfig for NAN DATA interfaces
    
    Make sure these interfaces are added to the driver only after the NAN
    one was, and after NAN operation was started.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.b14392ce99d6.I2ba3bfcd93e47e48d7f7c74007c70cca52d46896@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez b440cc49ec wifi: mac80211: support open and close for NAN_DATA interfaces
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit d6c470def51cd9ccc59c882e14ace478022b5a4a
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:36 2026 +0200

    wifi: mac80211: support open and close for NAN_DATA interfaces
    
    Support opening and closing a NAN_DATA interface.
    Track the NAN (NMI) interface, for convenience.
    Allow opening an NAN_DATA interface only if the NAN interface is running
    (NAN has started).
    When closing the NAN interface, make sure all NAN_DATA interfaces are
    closed first, and warn if this is not the case.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.a19de68119e5.Ia6724dac6a0e17cb69989dd714d14f4df1c69bef@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez 8741c3ce48 wifi: mac80211: add NAN local schedule support
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 589c06e8fdeec592e018004cebe283370160e581
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:35 2026 +0200

    wifi: mac80211: add NAN local schedule support
    
    A NAN local schedule consist of a list of NAN channels, and an array
    that maps time slots to the channel it is scheduled to (or NULL to indicate
    unscheduled).
    
    A NAN channel is the configuration of a channel which is used for NAN
    operations. It is a new type of chanctx user (before, the only user is a
    link). A NAN channel may not have a chanctx assigned if it is ULWed out.
    
    A NAN channel may or may not be scheduled (for example, user space
    may want to prepare the resources before the actual schedule is
    configured).
    
    Add management of the NAN local schedule.
    
    Since we introduce a new chanctx user, also adjust the different
    for_each_chanctx_user_* macros to visit also the NAN channels and take
    those into account.
    
    Co-developed-by: Avraham Stern <avraham.stern@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.03350fd40630.Id158f815cfc9b5ab1ebdb8ee608bda426e4d7474@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez f930435bf7 wifi: mac80211: run NAN DE code only when appropriate
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 23eab70e301f8b88282be658ac9b34b5a5953479
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 26 12:14:34 2026 +0200

    wifi: mac80211: run NAN DE code only when appropriate
    
    NAN DE (Discovery Engine) may be handled in the device or in user space.
    When handled in user space, all the NAN func management code should not
    run. Moreover, devices with user space DE should not provide the
    add/del_nan_func callbaks. For such devices, ieee80211_reconfig_nan will
    always fail.
    
    Make it clear what parts of ieee80211_if_nan are relevant to DE
    management, and touch those only when DE is offloaded.
    
    Add a check that makes sure that a driver doesn't register with
    add_del/nan_func callbacks if DE is in user space.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.6665f64865cd.Iee24bef3bae2e1d502216192e760c1e699d271c9@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez 8fb2320c52 wifi: mac80211: export ieee80211_calculate_rx_timestamp
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit b16df0dacb3a77d4c1ce95f21c58a2b99ae10213
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Thu Mar 26 12:14:33 2026 +0200

    wifi: mac80211: export ieee80211_calculate_rx_timestamp
    
    The function is quite useful when handling beacon timestamps. Export it
    so that it can be used by mac80211_hwsim and others.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.a1abc9c52f37.Ieabfe66768b1bf64c3076d62e73c50794faeacdc@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez d2ec3e135b wifi: ieee80211: add more NAN definitions
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 8ea6b92faebe4bad0e271cb9a8d819b8955ed476
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Thu Mar 26 12:14:32 2026 +0200

    wifi: ieee80211: add more NAN definitions
    
    These will be needed to implement NAN synchronization in mac80211_hwsim.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.ebb52db4c1eb.Ie8142cf92fc8c97c744a7c8b0a94ce3da6ff75ec@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez 515b9f913c wifi: mac80211: add a TXQ for management frames on NAN devices
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 7f0de94ef44653764fa2fb8548b1253f0554f213
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Thu Mar 26 12:14:31 2026 +0200

    wifi: mac80211: add a TXQ for management frames on NAN devices
    
    Currently there is no TXQ for non-data frames. Add a new txq_mgmt for
    this purpose and create one of these on NAN devices. On NAN devices,
    these frames may only be transmitted during the discovery window and it
    is therefore helpful to schedule them using a queue.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20260326121156.32eddd986bd2.Iee95758287c276155fbd7779d3f263339308e083@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez a87af22f3d wifi: rtw89: usb: fix TX flow control by tracking in-flight URBs
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 80119a77e5b03747b8886505df1b3cb26f49168d
Author: Lucid Duck <lucid_duck@justthetip.ca>
Date:   Wed Apr 1 22:22:16 2026 -0700

    wifi: rtw89: usb: fix TX flow control by tracking in-flight URBs
    
    rtw89_usb_ops_check_and_reclaim_tx_resource() returns a hardcoded
    placeholder value (42) instead of actual TX resource availability.
    This violates mac80211's flow control contract, preventing backpressure
    and causing uncontrolled URB accumulation under sustained TX load.
    
    Fix by adding per-channel atomic counters (tx_inflight[]) that track
    in-flight URBs. Increment before usb_submit_urb() with rollback on
    failure, decrement in the completion callback, and return the
    remaining capacity to mac80211. The firmware command channel (CH12)
    always returns 1 since it has its own flow control.
    
    The pre-increment pattern prevents a race where USB core completes the
    URB on another CPU before the submitting code increments the counter.
    
    128 URBs per channel provides headroom for RTL8832CU at 160 MHz
    bandwidth. Tested on RTL8852AU (USB3 80 MHz) where 64 and 128 showed
    equivalent throughput, and on RTL8832AU where 128 sustained full
    throughput under 8-stream parallel load.
    
    Tested on D-Link DWA-X1850 (RTL8832AU), kernel 6.19.8, Fedora 43:
    
                         Unpatched -> Patched (128 URBs)
      USB3 5GHz UL:      844 -> 837 Mbps (no regression)
      USB3 5GHz retx:    3 -> 0
      USB3 2.4GHz UL:    162 -> 164 Mbps (no regression)
      4-stream UL:       858 -> 826 Mbps (within variance)
      8-stream UL:       872 -> 826 Mbps (within variance)
      UDP flood:         0% loss (690K datagrams)
      60-second soak:    855 Mbps, 0 retransmits
    
    Reported-by: morrownr <morrownr@gmail.com>
    Signed-off-by: Lucid Duck <lucid_duck@justthetip.ca>
    Acked-by: Ping-Ke Shih <pkshih@realtek.com>
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260402052216.207858-1-lucid_duck@justthetip.ca

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez d4a886e1f1 wifi: rtw89: Add support for Elecom WDC-XE2402TU3-B
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 4e4fc2149b0a983670fd99bbd549012839bda79e
Author: Zenm Chen <zenmchen@gmail.com>
Date:   Mon Mar 30 17:34:39 2026 +0800

    wifi: rtw89: Add support for Elecom WDC-XE2402TU3-B
    
    Add the ID 056e:4024 to the table to support an additional RTL8832CU
    adapter: Elecom WDC-XE2402TU3-B.
    
    Link: https://github.com/morrownr/rtw89/commit/55c059e2bd49acd5cf93edbc8eda7b9e042f4efd
    Signed-off-by: Zenm Chen <zenmchen@gmail.com>
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260330093440.3615-1-zenmchen@gmail.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:30 +02:00
Jose Ignacio Tornos Martinez 086ffb730d wifi: rtw89: 8922d: add PCI ID of RTL8922DE and RTL8922DE-VS
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit a16ca7d91e4eb37a4faf0a2d2b44603489021725
Author: Ping-Ke Shih <pkshih@realtek.com>
Date:   Mon Mar 30 14:58:47 2026 +0800

    wifi: rtw89: 8922d: add PCI ID of RTL8922DE and RTL8922DE-VS
    
    Add PCI ID tables with RTL8922DE whose ID is 10EC:895D, and with
    RTL8922DE-VS whose ID are 10EC:892D and 10EC:882D. Also, add pci_info
    struct to describe the hardware capabilities and registers accordingly.
    
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260330065847.48946-10-pkshih@realtek.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:29 +02:00
Jose Ignacio Tornos Martinez 5c8998a60a wifi: rtw89: 8922d: add chip_info and chip_ops struct
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 0737a803bae462e69ef030dc9d050a29c1d6d265
Author: Ping-Ke Shih <pkshih@realtek.com>
Date:   Mon Mar 30 14:58:46 2026 +0800

    wifi: rtw89: 8922d: add chip_info and chip_ops struct
    
    Add remaining functions including calculate RX gain for power saving,
    channel frequency and RSSI from PPDU status, and WoWLAN declaration.
    Then fill chip_info and chip_ops tables, which RTL8922D has two variants
    RTL8922D and RTL8922DS supporting 4096 and 1024 QAM respectively. Other
    features, such as support of 2/5/6 GHz and up to 160 MHz bandwidth, for
    variants are the same,
    
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260330065847.48946-9-pkshih@realtek.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:29 +02:00
Jose Ignacio Tornos Martinez f00c0850d9 wifi: rtw89: 8922d: add ops related to BT coexistence mechanism
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 553fd44ce8ce3caccf580aa8286d8c211fea2a4a
Author: Ping-Ke Shih <pkshih@realtek.com>
Date:   Mon Mar 30 14:58:45 2026 +0800

    wifi: rtw89: 8922d: add ops related to BT coexistence mechanism
    
    The ops is used by shared BT coexistence mechanism to set WiFi TX power,
    get BT RSSI, and TX/RX parameters.
    
    The RTL8922D uses TX/RX parameter v9, so define it and fill NULL for
    other chips.
    
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260330065847.48946-8-pkshih@realtek.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:29 +02:00
Jose Ignacio Tornos Martinez 1e9b0566b6 wifi: rtw89: 8922d: add RF ops of init hardware and get thermal
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 9c2f79b4d912dc96bbe5b4dadccd1099d430436d
Author: Ping-Ke Shih <pkshih@realtek.com>
Date:   Mon Mar 30 14:58:44 2026 +0800

    wifi: rtw89: 8922d: add RF ops of init hardware and get thermal
    
    One is to initialize hardware for RF circuit, and the ops of get thermal
    is used to monitor temperature to re-calibrate RF or reduce TX duty to
    prevent overheating.
    
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260330065847.48946-7-pkshih@realtek.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:29 +02:00
Jose Ignacio Tornos Martinez f77aedadcb wifi: rtw89: 8922d: configure TX/RX path assisting in BT coexistence
JIRA: https://issues.redhat.com/browse/RHEL-184812

commit 2b19199952e6f2d6fbddd20c81d48180e98a3c3e
Author: Ping-Ke Shih <pkshih@realtek.com>
Date:   Mon Mar 30 14:58:43 2026 +0800

    wifi: rtw89: 8922d: configure TX/RX path assisting in BT coexistence
    
    The BT coexistence mechanism needs to control TX/RX path to co-work with
    BT well, and these helpers are provided by BB to configure path.
    
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260330065847.48946-6-pkshih@realtek.com

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2026-07-12 07:54:29 +02:00