summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2026-08-04bnxt_en: Move RSS table fill outside __bnxt_hwrm_vnic_set_rss()Shravya KN
This is a refactor patch with no change in behavior. The caller will now fill the RSS table before calling __bnxt_hwrm_vnic_set_rss(). In the next patch, we'll add code to determine the default ring for the VNIC when we fill the RSS table. Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by: Shravya KN <shravya.k-n@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20260731190937.807270-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net/mlx5e: fix BQL reset on SQ re-activationBobby Eshleman
mlx5e_queue_start() deactivates and re-activates all channels but closes only the queue being restarted. mlx5e_activate_txqsq() then unconditionally calls netdev_tx_reset_queue(), zeroing the BQL counters of channels that kept their in-flight TX WQEs. The next completion then over-charges and trips the BUG_ON() in dql_completed(): kernel BUG at lib/dynamic_queue_limits.c:99! RIP: 0010:dql_completed+0x23d/0x280 Call Trace: <IRQ> mlx5e_poll_tx_cq+0x668/0xa60 mlx5e_napi_poll+0x5b/0x7b0 net_rx_action+0x15a/0x580 Reset BQL only when the SQ has no bytes in flight (sq->cc == sq->pc). In the case that reset is skipped, the outstanding WQEs will eventually complete and rebalance the dql. The dql->limit is carried across the reset. Fixes: b2588ea40ec9 ("net/mlx5e: Implement queue mgmt ops and single channel swap") Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260803-mlx5-bql-v3-1-a30d4c66fe1d@meta.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: bonding: check register_netdevice_notifier() error in bonding_init()Minhong He
bonding_init() ignores register_netdevice_notifier() errors and still returns success, which can leave the bonding module loaded without its netdev notifier registered. Check the error and unwind prior initialization on failure. This is a future looking check, register_netdevice_notifier() only fails on double registration or if the registered notifier itself returns an error. Signed-off-by: Minhong He <heminhong@kylinos.cn> Acked-by: Jay Vosburgh <jv@jvosburgh.net> Link: https://patch.msgid.link/20260803090012.142638-1-heminhong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: vrf: check register_netdevice_notifier() error in vrf_init_module()Minhong He
vrf_init_module() ignores register_netdevice_notifier() errors and continues module initialization, which can leave VRF loaded without its netdev notifier registered. Check the error and fail module initialization early. This is a future looking check, register_netdevice_notifier() only fails on double registration or if the registered notifier itself returns an error. Signed-off-by: Minhong He <heminhong@kylinos.cn> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20260803090002.142453-1-heminhong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: macvlan: check register_netdevice_notifier() error in macvlan_init_module()Minhong He
macvlan_init_module() ignores register_netdevice_notifier() errors and continues module initialization, which can leave macvlan loaded without its netdev notifier registered. Check the error and fail module initialization early. This is a future looking check, register_netdevice_notifier() only fails on double registration or if the registered notifier itself returns an error. Signed-off-by: Minhong He <heminhong@kylinos.cn> Link: https://patch.msgid.link/20260803085950.142325-1-heminhong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: team: check register_netdevice_notifier() error in team_module_init()Minhong He
team_module_init() ignores register_netdevice_notifier() errors and continues module initialization, which can leave the team module loaded without its netdev notifier registered. Check the error and fail module initialization early. This is a future looking check, register_netdevice_notifier() only fails on double registration or if the registered notifier itself returns an error. Signed-off-by: Minhong He <heminhong@kylinos.cn> Link: https://patch.msgid.link/20260803085943.142261-1-heminhong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: lapbether: check register_netdevice_notifier() error in ↵Minhong He
lapbeth_init_driver() lapbeth_init_driver() ignores register_netdevice_notifier() errors and always returns success, which can leave the module loaded without its netdev notifier registered. Check the error and remove the packet type on failure. This is a future looking check, register_netdevice_notifier() only fails on double registration or if the registered notifier itself returns an error. Signed-off-by: Minhong He <heminhong@kylinos.cn> Link: https://patch.msgid.link/20260803085936.142160-1-heminhong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04usbnet: cap max_mtu for drivers without bind callbackLaurent Vivier
usbnet_probe() initializes max_mtu to ETH_MAX_MTU and only caps it inside the if (info->bind) block. Drivers without a bind callback never enter this block, so max_mtu stays at ETH_MAX_MTU. QEMU's usb-net device (0x0525/0xa4a2) is claimed by the cdc_subset driver which has no bind callback. The guest accepts any MTU from DHCP (e.g. 65520 from passt), leading to TCP segments that exceed the device's 2048-byte receive buffer and are silently dropped. Initialize max_mtu to net->mtu at probe time and update it inside the bind block. Fixes: f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") Cc: jarod@redhat.com Cc: stable@vger.kernel.org Link: https://gitlab.com/qemu-project/qemu/-/issues/3268 Link: https://bugs.passt.top/show_bug.cgi?id=189 Signed-off-by: Laurent Vivier <lvivier@redhat.com> Link: https://patch.msgid.link/20260731092711.857684-1-lvivier@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04bnge: use int for bnge_fix_rings_count() return valueAlok Tiwari
bnge_fix_rings_count() returns 0 on success or a negative errno on failure However, bnge_adjust_rings() stores its return value in a u16 variable, causing negative error codes such as -ENOMEM to be converted to a large positive value. Use an int for the return code variable so that error values are preserved and propagated correctly. Fixes: 627c67f038d2 ("bng_en: Add resource management support") Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Bhargava Marreddy <bhargava.marreddy@broadcom.com> Link: https://patch.msgid.link/20260801100923.1498570-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: atlantic: free RX pages of consumed but not refilled buffersYangyu Chen
aq_ring_rx_deinit() only walks [sw_head, sw_tail), the region posted to hardware. Since the page reuse strategy was added, a cleaned RX buffer keeps its page (and its DMA mapping) in the ring for reuse, and refill is batched: aq_ring_rx_fill() returns early until AQ_CFG_RX_REFILL_THRES slots are free. Slots that were consumed but not yet reposted therefore sit in the complementary [sw_tail, sw_head) gap with a live page, and the deinit walk never visits them: up to a refill batch worth of pages and DMA mappings leak on every interface down. Walk the whole ring instead and release whatever is still there. Also bail out if the buffer ring is already gone: a partial aq_ptp_ring_alloc() failure frees the ring but leaves aq_nic set, so aq_ptp_ring_deinit() still gets here on the unwind path. Cc: stable@vger.kernel.org # v5.2+ Fixes: 46f4c29d9de6 ("net: aquantia: optimize rx performance by page reuse strategy") Reviewed-by: Sukhdeep Singh <sukhdeeps@marvell.com> Signed-off-by: Yangyu Chen <cyy@cyyself.name> Acked-by: Mina Almasry <almasrymina@google.com> Link: https://patch.msgid.link/tencent_607CBA8237DA438E36B844318B21538DE008@qq.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: atlantic: free stranded TX buffers on ring deinitYangyu Chen
aq_vec_deinit() drains the TX rings with a single aq_ring_tx_clean() call, which frees at most AQ_CFG_TX_CLEAN_BUDGET (256) descriptors and stops at hw_head, which no longer moves once aq_vec_stop() has stopped the hardware and NAPI. Completed descriptors beyond the budget and everything still posted in [hw_head, sw_tail) keep their skb or xdp_frame when the interface goes down: aq_vec_ring_free() then frees the buffer ring and the references are lost for good. Today this is a silent memory leak on every interface down under TX/XDP_TX load. With the conversion of the RX path to page_pool posted for net-next it becomes much more visible: XDP_TX frames carry fragment references on the RX ring's page_pool, so a single stranded frame keeps the pool's inflight count above zero forever. page_pool_destroy() then never completes, the pool is leaked together with its pages, and "page_pool_release_retry() stalled pool shutdown" is warned every 60 seconds from that point on, on every ifdown, XDP detach or ring resize under XDP_TX load. Bring back aq_ring_tx_deinit() as it was before the removal and use it for teardown again, with one extension: TX rings can hold xdp_frames nowadays, so release those too. They are returned with xdp_return_frame() since this runs in process context. Fixes: eb36bedf28be ("net: aquantia: remove function aq_ring_tx_deinit") Cc: stable@vger.kernel.org # v4.11+ Reviewed-by: Sukhdeep Singh <sukhdeeps@marvell.com> Signed-off-by: Yangyu Chen <cyy@cyyself.name> Acked-by: Mina Almasry <almasrymina@google.com> Link: https://patch.msgid.link/tencent_EEDC35FAF2750A3A6A0B39BAE0E2C484860A@qq.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: stmmac: resume PHY before hardware setup when opening the interfaceStefan Agner
Since the referenced commit, changing the MTU on a running interface no longer disconnects and reconnects the PHY; __stmmac_release() merely stops phylink, which also suspends the PHY (BMCR power-down) when WoL is not enabled. __stmmac_open() then performs the DMA software reset in stmmac_hw_setup() before phylink_start() resumes the PHY again. IEEE 802.3 22.2.4.1.5 allows a PHY to stop its receive clock while powered down, and stmmac requires a running receive clock for the DMA software reset to complete (the phylink config sets mac_requires_rxc). On such setups, e.g. the RK3566-based Home Assistant Green with an RTL8211F-VD PHY in RGMII mode, any runtime MTU change now times out and leaves the interface dead: rk_gmac-dwmac fe010000.ethernet end0: Failed to reset the dma rk_gmac-dwmac fe010000.ethernet end0: stmmac_hw_setup: DMA engine initialization failed rk_gmac-dwmac fe010000.ethernet end0: __stmmac_open: Hw setup failed rk_gmac-dwmac fe010000.ethernet end0: failed reopening the interface after MTU change In the field this is triggered by NetworkManager applying an MTU while activating the connection, breaking networking entirely. The same regression has also been reported on i.MX8MP and reproduced on SoCFPGA based systems. Resume the PHY in __stmmac_open() before the hardware setup, making it the counterpart of the phylink_stop() in __stmmac_release(), like stmmac_resume() already does for the same reason. phylink_start() also resumes the PHY, but only after stmmac_hw_setup(), and it cannot be moved before the hardware setup since it may bring the link up immediately from a workqueue, racing with the initialization (see the comment in stmmac_resume()). For the regular ndo_open path the PHY has just been attached and is not suspended, in which case phylink_prepare_resume() does nothing. Fixes: db299a0c09e9 ("net: stmmac: move PHY handling out of __stmmac_open()/release()") Link: https://github.com/home-assistant/operating-system/issues/4858 Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Stefan Agner <stefan@agner.ch> Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20260803095156.132827-1-stefan@agner.ch Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: microchip: vcap api: Fix possible memory leak in vcap_decode_rule()Abdun Nihaal
The memory allocated for struct vcap_rule_internal, keyfields and actionfields inside vcap_dup_rule() are not freed in some of the error paths in vcap_decode_rule(). Fix that by calling vcap_free_rule(). Compile tested only. Issue found using a prototype static analysis tool built on top of the LLVM compiler infrastructure. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Reviewed-by: Joe Damato <joe@dama.to> Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in> Link: https://patch.msgid.link/20260801055507.47534-1-nihaal@cse.iitm.ac.in Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04Merge tag 'ovpn-net-20260730' of https://github.com/OpenVPN/ovpn-net-nextJakub Kicinski
Antonio Quartulli says: ==================== Included fixes: * use rcu_dereference_bh() instead of rcu_access_pointer() where the pointer is actually dereferenced * ensure TCP global variables are initialized before they can be accessed via netlink (e.g. when attaching a TCP socket) * actually disable IPv4 redirects on multipeer interfaces (the previous attempt was a no-op and did not survive netns moves) * hash a floated peer by its transport identity only, consistently with the add and lookup paths * zero the sockaddr padding before learning a floated endpoint so it does not leak into the by_transp_addr hash key * ensure the socket is owned by ovpn before dereferencing sk_user_data * rehash a peer in the by_transp_addr table when its remote endpoint is updated via CMD_PEER_SET * avoid re-adding to the hashtables a peer that was concurrently removed (use-after-free) * limit keepalive values to one day to avoid overflowing the delayed-work delay on 32-bit systems * add the missing rtnl_link_ops->get_size callback so link messages account for the nested mode attribute * tag 'ovpn-net-20260730' of https://github.com/OpenVPN/ovpn-net-next: ovpn: fix incorrect use of rcu_access_pointer() ovpn: ensure TCP vars are initialized first ovpn: disable IPv4 redirects on MP interfaces ovpn: hash floated peer by transport identity only ovpn: zero-initialize sockaddr before learning a floated endpoint ovpn: ensure socket is owned by ovpn before deref sk_user_data ovpn: rehash peer in by_transp_addr table on CMD_PEER_SET ovpn: skip rehash for peers already removed from by_id ovpn: limit keepalive values to one day ovpn: add missing rtnl_link_ops->get_size callback ==================== Link: https://patch.msgid.link/20260730094624.4102963-1-antonio@openvpn.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: dsa: realtek: rtl8366rb: Fix up port isolationLinus Walleij
Sashiko reports that we incorrectly disable isolation in the setup loop while what we want to do is to enable it. Enable it by unconditionally setting the enable bit 0 in rtl8366rb_port_set_isolation() so a mask of 0 when passed in will enable isolation and isolate from ALL ports. Fix up the comments so it is clear what is going on, including a missing word in the helper function. Reported-by: Paolo Abeni <pabeni@redhat.com> Closes: https://sashiko.dev/#/patchset/20260630-rtl8366rb-improvements-v2-0-05eb9d6a37f5%40kernel.org Signed-off-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260731-rtl8366rb-fixes-v4-1-fbf0c95b829a@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: airoha: fix ARRAY_SIZE() division by zero on UP buildsLorenzo Bianconi
airoha_alloc_gdm_device() initializes the txq_lock[] array iterating over ARRAY_SIZE(dev->txq_lock). ARRAY_SIZE() expands to sizeof(dev->txq_lock) / sizeof((dev->txq_lock)[0]), but on UP builds (CONFIG_SMP unset, CONFIG_DEBUG_SPINLOCK unset) arch_spinlock_t is an empty struct, so sizeof(spinlock_t) is zero and the expression is a compile-time division by zero (undefined behavior), reported by clang as "division by zero is undefined [-Wdivision-by-zero]". Since the array is statically sized with AIROHA_NUM_NETDEV_TX_RINGS, use the named constant as loop bound instead of ARRAY_SIZE(). Fixes: 78a35725e533 ("net: airoha: defer GDM3/GDM4 WAN mode and GDM2 loopback to QoS offload") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202607311850.6p0ZUVq4-lkp@intel.com/ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://patch.msgid.link/20260731-airoha-spinlock-array-fix-v1-1-863a7e239a5f@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04macvlan: require init-userns CAP_NET_ADMIN to raise bc_queue_lenXiang Mei (Microsoft)
IFLA_MACVLAN_BC_QUEUE_LEN accepts any u32 and becomes port->bc_queue_len_used, the only bound on port->bc_queue. rtnetlink checks CAP_NET_ADMIN against the target netns only, so a user who unshares a user+net namespace, creates a veth and puts a macvlan on it can set the backlog to 0xffffffff and flood broadcast frames until the host dies: Out of memory: Killed process 141 (su) UID:0 Kernel panic - not syncing: System is deadlocked on memory Call Trace: vpanic (kernel/panic.c:650) panic (kernel/panic.c:787) out_of_memory (mm/oom_kill.c:1166) __alloc_frozen_pages_noprof (mm/page_alloc.c:4914) alloc_pages_mpol (mm/mempolicy.c:2490) folio_alloc_noprof (mm/mempolicy.c:2591) filemap_fault (mm/filemap.c:3565) A fixed upper bound does not work. Deployments carrying 600-800 real-time audio streams run bc_queue_len=100000, and no constant serves both cases: the queue counts skbs, not bytes, and the frame size is attacker-chosen too (up to ETH_MAX_MTU on a veth the caller creates). Gate the elevated range on CAP_NET_ADMIN in the initial user namespace instead. A backlog of that size is a host-wide tuning decision, and an unprivileged owner of a namespace it created itself should not be able to make it; privileged configurations keep working unchanged.. Cc: stable+noautosel@kernel.org # local DoS by userns are a dime a dozen Reported-by: AutonomousCodeSecurity@microsoft.com Link: https://lore.kernel.org/r/20260706212556.3199234-1-xmei5@asu.edu Signed-off-by: Xiang Mei (Microsoft) <xmei5@asu.edu> Link: https://patch.msgid.link/20260729200621.2521588-1-xmei5@asu.edu Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04net: stmmac: remove ptpaddr/mmcaddr/estaddr "safe" initializationJisheng Zhang
These so called "safe" initializations aren't needed any more from sometime, but the unnecessaries are obvious after recent clean up by Russell. The code will correctly initialize them after getting the correct stmmac_hwif_entry by calling stmmac_hwif_find(). Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20260803135745.12600-1-jszhang@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-04Merge tag 'qcom-drivers-for-7.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v7.3 Add Maili platform bindings for SCM, IMEM, AOSS, and PMIC GLINK. Add Shikra IMEM, RPM SMD, LLCC, and UBWC support, including handling for firmware-configured LLCC ECC interrupts. Add the generic Peripheral Authentication Service with SCM and OP-TEE backends, and migrate the MSM DRM and IPA drivers to it. Add SCM SMC-call tracepoints and configurable minidump delivery through always-on SRAM. Correct SCM download-mode pointer ordering and improve download-mode probe diagnostics. Rework the UBWC configuration database and add Milos and Shikra configuration. Add protection-domain mappings for SA8775P and QCS8300, support newer ICE versions, Hawi subsystem statistics, and SDM850 identification. Simplify Qualcomm SoC Kconfig selection and architecture dependencies. Use managed resources in EBI2 and RPMh RSC probe paths to correct cleanup on failures. * tag 'qcom-drivers-for-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (44 commits) soc: qcom: llcc: Skip ECC interrupt setup on Shikra, pre-configured by DSF dt-bindings: sram: Document qcom,shikra-imem compatible net: ipa: Switch to generic PAS TZ APIs firmware: qcom: scm: Add minidump SRAM support firmware: qcom: scm: use dev_err_probe() for dload address failure firmware: qcom: scm: Fix missing smp_load_acquire() dt-bindings: firmware: qcom,scm: Add minidump SRAM property drm/msm: Switch to generic PAS TZ APIs bus: qcom-ebi2: use managed resources for clocks and children soc: qcom: rpmh-rsc: manage PM notifiers with devres firmware: qcom: scm: Allow QSEECOM on Honor Magicbook Art 14 firmware: qcom: scm: instrument SMC call path with tracepoints firmware: qcom: scm: add trace events for the SMC call interface soc: qcom: Avoid SCM and SPM for cpuidle drivers soc: qcom: Make important drivers default soc: qcom: Restrict drivers per ARM/ARM64 soc: qcom: Hide all drivers behind selectable menu MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service firmware: qcom: Add a PAS TEE service firmware: qcom_scm: Migrate to generic PAS service ... Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-04geneve: Support per-netns netdev unregistration.Kuniyuki Iwashima
geneve_exit_rtnl_net() iterates geneve devices whose sockets are in the dying netns and queues them for destruction. So the devices may reside in different netns. Let's use unregister_netdevice_queue_net() to support per-netns device unregistration. list_del() is changed to list_del_init() to avoid queueing the same device twice. Even after geneve_exit_rtnl_net() queues a cross-netns geneve device, geneve_dellink() can be called concurrently for it. In such a case, __rtnl_net_unlock() will perform the unregistration. Note that geneve uses register_pernet_subsys() instead of _device(), so default_device_exit_batch() guarantees that the async per-netns works are flushed before ->exit(). Tested: 1. Create geneve device across two netns. # ip netns add ns1 # ip netns add ns2 # ip -n ns1 link add geneve0 link-netns ns2 type geneve external 2. Run bpftrace to check that geneve_uninit() is called between ->exit_rtnl() and ->exit(). # bpftrace -e '#include <linux/netdevice.h> kprobe:geneve_uninit { $dev = (struct net_device *)arg0; printf("PID: %d | DEV: %s%s\n", pid, $dev->name, kstack()); } kprobe:geneve_exit_rtnl_net, kprobe:geneve_exit_net { printf("PID: %d%s\n", pid, kstack()); }' 3. Remove the netns where the geneve socket resides # ip netns del ns2 Now, we can see geneve0 is unregistered by per-netns work instead of cleanup_net() and it finishes before ->exit() to avoid WARN_ON_ONCE(!list_empty(&gn->sock_list)) there. PID: 571 geneve_exit_rtnl_net+5 ops_undo_list+702 cleanup_net+1122 process_scheduled_works+2538 ... PID: 1047 | DEV: geneve0 geneve_uninit+5 unregister_netdevice_many_notify+7129 unregister_netdevice_many_net+1050 rtnl_net_work_func+136 process_scheduled_works+2538 ... PID: 571 geneve_exit_net+5 ops_undo_list+1064 cleanup_net+1122 process_scheduled_works+2538 ... Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260731164612.2148830-4-kuniyu@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-04geneve: Protect geneve_net and geneve_sock with per-netns mutex.Kuniyuki Iwashima
struct geneve_dev.net is the netns where the backend geneve socket resides. struct geneve_dev is linked to the geneve_net.geneve_list of the socket's netns. During netns dismantle or module unload, geneve_exit_rtnl_net() iterates the list and queues devices for destruction regardless of devices' netns. Moreover, a socket can be shared by multiple geneve devices in different netns, and geneve_open() and geneve_stop() modify geneve_sock.vni_list and geneve_net.sock_list. Thus, once RTNL is removed, the three lists can be modified concurrently from different netns due to device removal and link-up/down. Let's protect them with per-netns mutex. geneve_newlink() is still protected by rtnl_net_lock()s, so acquiring gn->lock twice in geneve_find_dev() and geneve_configure() is not a problem. Note that udp_tunnel_notify_add_rx_port() is moved outside of the mutex, otherwise gn->lock -> utn->lock ordering would trigger AB-BA deadlock in geneve_offload_rx_ports(), which acquires gn->lock under utn->lock. Even without gn->lock, geneve_sock_add() and geneve_offload_rx_ports() are still serialised with (per-netns) RTNL, so there is no race. Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260731164612.2148830-3-kuniyu@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-04geneve: Unlink geneve->sock[46].hlist[46].hlist in __geneve_sock_release().Kuniyuki Iwashima
Currently, geneve->sock[46].hlist[46] is unliked from geneve_sock.vni_list in geneve_stop() and geneve_sock.refcnt is decremented for each socket later in __geneve_sock_release(). The following patch will introduce a mutex in geneve_net to protect geneve_sock.{refcnt,vni_list}. However, udp_tunnel_notify_del_rx_port() must be outside of the lock to avoid AB-BA deadlock. To make the change cleaner, let's move hlist_del_init_rcu() from geneve_stop() to __geneve_sock_release(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260731164612.2148830-2-kuniyu@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-03net: mana: force full-page RX buffers via ethtool private flagDipayaan Roy
On some ARM64 platforms with 4K PAGE_SIZE, page_pool fragment allocation in the RX refill path can cause 15-20% throughput regression under high connection counts (>16 TCP streams). Add an ethtool private flag "full-page-rx" that allows the user to force one RX buffer per page, bypassing the page_pool fragment path. This restores line-rate (180+ Gbps) performance on affected platforms. Usage: ethtool --set-priv-flags eth0 full-page-rx on There is no behavioral change by default. The flag must be explicitly enabled by the user or udev rule. The existing single-buffer-per-page logic for XDP and jumbo frames is consolidated into a new helper mana_use_single_rxbuf_per_page() which is now the single decision point for both the automatic and user-controlled paths. Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com> Link: https://patch.msgid.link/20260729063347.3388035-3-dipayanroy@linux.microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: mana: refactor mana_get_strings() and mana_get_sset_count() to use switchDipayaan Roy
Refactor mana_get_strings() and mana_get_sset_count() from if/else to switch statements in preparation for adding ethtool private flags support which requires handling ETH_SS_PRIV_FLAGS. No functional change. Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com> Link: https://patch.msgid.link/20260729063347.3388035-2-dipayanroy@linux.microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: stmmac: ethtool: Address off-by-one when reading the coal rx-usecsMaxime Chevallier
When reading the rx-usecs coalescing parameters on a dwmac variant that uses the RIWT for RX interrupt coalescing, we convert the riwt value to usecs : - One riwt cycle is 256 clock ticks, we compute how many ticks in $riwt cycles - divide that by how many ticks in a microsecond, and we get the rx-usecs. The opposite computation is done when setting the rx-usecs param. Because of the 256 ratio, we're subjected to off-by-one errors in the value read-back, which can be reliably measured on i.mx8MP : $ ethtool -C eth1 rx-usecs 102 $ ethtool -c eth1 Coalesce parameters for eth1: [...] rx-usecs: 101 Let's be more explicit about the rounding for the riwt to usec computations by using DIV_ROUND_CLOSEST, which solves the off-by-one. This does change the boundaries of accepted rx-usecs parameters, as the previously accepted values were in the 16-246 us range, and now fall into the 15-245 range on imx8mp. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260802114015.214212-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: stmmac: ethtool: Comment the magic numbers in RIWT computationMaxime Chevallier
Receive Interrupt Watchdog Timer is an RX interrupt coalescing mechanism used by some variants of dwmac. It allows waiting a bit before triggering the rx interrupts, allowing for batch processing. The RIWT is configured with a granularity of 256 stmmac clk ticks. Let's add a comment for that and wrap the raw "1000000" into USEC_PER_SEC, as we're computing "how many clock cycles in one microsec" with that step. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260802114015.214212-2-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03bnge: Fix NULL pointer dereference in aux device releaseAlok Tiwari
If allocation of auxr_dev fails during auxiliary device setup, the error path calls auxiliary_device_uninit(), which eventually invokes bnge_aux_dev_release(). The release callback unconditionally dereferences aux_priv->auxr_dev->pdev to retrieve the parent bnge_dev. Since auxr_dev has not yet been allocated on this failure path, the dereference results in a NULL pointer exception Retrieve the parent bnge_dev from the auxiliary device's parent instead of auxr_dev, and free auxr_dev only when it was successfully allocated. This allows the release callback to correctly clean up partially initialized auxiliary devices. Fixes: 8ac050ec3b1c ("bng_en: Add RoCE aux device support") Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Bhargava Marreddy <bhargava.marreddy@broadcom.com> Link: https://patch.msgid.link/20260731192301.1427645-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: usb: ax88179_178a: fix skb leak in ax88179_tx_fixup()Yi Cong
When the interface has NETIF_F_SG enabled and skb_linearize() fails in ax88179_tx_fixup(), the function returns NULL without freeing the skb. usbnet_start_xmit() treats a NULL return from tx_fixup() as a drop (info->flags does not set FLAG_MULTI_PACKET for this driver), jumping to the "drop" label where it does `if (skb) dev_kfree_skb_any(skb)`. Because tx_fixup() returned NULL, the local skb variable in usbnet_start_xmit() is NULL, so the original skb is never freed — a memory leak on every TX frame whose linearization fails (i.e. under memory pressure). Free the skb before returning, matching the error handling already used for the pskb_expand_head() failure path in the same function. Fixes: 16b1c4e01c89 ("net: usb: ax88179_178a: add TSO feature") Cc: stable@vger.kernel.org Signed-off-by: Yi Cong <yicong@kylinos.cn> Link: https://patch.msgid.link/20260729030436.3420477-1-cong.yi@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: phy: motorcomm: enable the reference clock for YT8521Jiaxing Hu
Commit 42310a24389c ("net: phy: motorcomm: Enable optional clock for YT8531") enables the SoC-provided reference clock for the YT8531 in its probe. The YT8521 has the same need on crystal-less boards but goes through yt8521_probe(), so enable it there too. The clock is optional, so crystal-clocked boards are unaffected. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Gavin Gao <attinagaoxu@gmail.com> Signed-off-by: Jiaxing Hu <gahing@gahingwoo.com> Link: https://patch.msgid.link/20260731013807.1488843-1-gahing@gahingwoo.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: stmmac: Don't rely on the PHY for flow-control testingMaxime Chevallier
For flow-control testing in loopback mode, we don't need to ask what the PHY is currently using as pause/asym settings. The PHY is no longer involved in selftest, we rely strictly on MAC loopback. We therefore only need to know if the MAC supports Symmetric pause for the test, as we exercise both TX and RX pause support in the selftest. Remove phydev requirement for flowcontrol selftest as well as the AsymPause requirement. With that, we can also drop the linux/phy.h include. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20260728155728.1193169-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: stmmac: Don't use PHY loopback for selftestsMaxime Chevallier
Stmmac selftests validate the internal behaviour of the various IPs, using local loopback. The current logic is relies on PHY-side local loopback if a PHY is attached, with a fallback to MAC loopback otherwise. However, PHY loopback is currently fragile especially for stmmac that may require RXC to be provided from the PHY. Some PHYs shutdown RXC while in loopback, while others will report carrier off when in local loopback. This also fails when using SFP setup with a module that embeds a PHY, that may also fail to enter loopback. MAC loopback is done at the GMII level on dwmac, allowing the internal to be just as meaningful as PHY-loopback testing. Let's simplify stmmac selftests by only relying on MAC-side local loopback, which makes the selftests runnable on a wider HW variety. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20260728155728.1193169-2-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: phylink: allow PHYs to be attached in 802.3z inband modeRussell King (Oracle)
Now that we have proper decision making for inband mode support which makes it a "best efforts" feature based on the capabilities of the PHY and PCS, we can relax whether we expect and permit a PHY to be attached. This is especially true for the 2500BASE-X case which some PHYs use without inband on their host side interface for 2.5G speeds, but use inband for slower speeds switching to SGMII on their host side interface. We already have such a case for some qcom-ethqos setups, although qcom-ethqos overrides phylink's inband settings by accessing the PCS directly at the moment. This should allow qcom-ethqos to transition to defaulting to inband when 2500BASE-X or SGMII is specified in its DTS. Allow PHYs to be attached when inband mode has been specified, which will be necessary to allow inband mode to be used on qcom-ethqos. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Zxyan Zhu <zxyan0222@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20260729074237.2624940-3-zxyan0222@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: stmmac: Skip PHY attach if custom PCS is in useZxyan Zhu
When a platform provides a custom PCS via the pcs_init callback, the MAC's phylink_pcs is already configured. In this case, no traditional PHY device is needed. Without this, stmmac_init_phy() falls through to the no-phy-node path and errors out with "no phy found" when the DT has no phy-handle for such interfaces. Skip the PHY attach when priv->hw->phylink_pcs is set and phy_addr is invalid. Fixes: f0ef433fc264 ("net: stmmac: introduce pcs_init/pcs_exit stmmac operations") Signed-off-by: Zxyan Zhu <zxyan0222@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20260729074237.2624940-2-zxyan0222@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03xsk: validate metadata when processing requestsStanislav Fomichev
The zero-copy path validates TX metadata while obtaining the descriptor context, then reads it again later when preparing the hardware request. User space can change the metadata between those operations and bypass the original validation. Validate the metadata in xsk_tx_metadata_request() and use the resulting flags snapshot for every feature check. Read request fields once so all zero-copy drivers process only values observed after successful validation. Fixes: ca4419f15abd ("xsk: Add launch time hardware offload support to XDP Tx metadata") Cc: Cen Zhang (Microsoft) <blbllhy@gmail.com> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20260727161959.885642-7-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03xsk: pass TX metadata pointer by referenceStanislav Fomichev
Completion handling needs to know whether a timestamp was requested when the metadata was processed. Let xsk_tx_metadata_request() update the caller's metadata pointer so that decision can be carried forward without rereading user-controlled flags. This only changes the interface; behavior remains unchanged. Fixes: ca4419f15abd ("xsk: Add launch time hardware offload support to XDP Tx metadata") Cc: Cen Zhang (Microsoft) <blbllhy@gmail.com> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20260727161959.885642-3-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03ppp: use netdev_from_priv()Qingfang Deng
Use the new netdev_from_priv() helper to access the net device from struct ppp. Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev> Reviewed-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20260730100654.745-1-qingfang.deng@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03netxen: unregister notifiers if PCI registration failsCan Peng
netxen_init_module() registers the netdevice and inetaddr notifiers before registering the PCI driver. If pci_register_driver() fails, the function returns the error directly and leaves both notifiers registered. That leaves notifier callbacks installed for a module that failed to load. Mirror the module exit path on this failure and unregister the notifiers before returning the error. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Can Peng <pengcan@kylinos.cn> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260728032046.121631-2-pengcan@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03bnxt: fix memory leak in bnxt_queue_mem_alloc error casesWill Chen
There is a small memory leak in bnxt_queue_mem_alloc: when bnxt_alloc_rx_agg_bmap() succeeds but bnxt_alloc_one_tpa_info() later fails, the rx_agg_bmap allocated by bnxt_alloc_rx_agg_bmap() is not freed in the fallthrough cleanup cases. Free the rx_agg_bmap in the err_free_rx_agg_ring case and initialize clone->rx_agg_bmap = NULL earlier in the function to allow for safe fallthrough. Fixes: bd649c5cc958 ("bnxt_en: handle tpa_info in queue API implementation") Signed-off-by: Will Chen <will.chen.tty@gmail.com> Reviewed-by: Joe Damato <joe@dama.to> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20260729220132.1256924-1-will.chen.tty@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-03net: ngbe: correct misleading interrupt commentJiawen Wu
In ngbe_irq_enable(), the code subsequently calls wx_intr_enable() to enable interrupts. However, the preceding comment incorrectly stated "mask interrupt", which means disabling or blocking interrupts. This patch corrects the comment to "unmask interrupt" to accurately reflect the actual behavior of the code. No functional changes are introduced. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Link: https://patch.msgid.link/147244C2750FF990+20260730065409.50807-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-02wifi: brcmfmac: fix P2P action frame handling without device vifJason Huang
Some P2P action frame paths assume the P2P device vif is always available. That is not true when userspace sends non-P2P public action frames through the primary interface, or when action-frame abort runs after the P2P device vif has not been created. Fall back to the primary vif when aborting an action frame without a P2P device vif, and guard P2P device saved IE access before using it for peer channel search. Fixes: 30fb1b272909 ("brcmfmac: use actframe_abort to cancel ongoing action frame") Fixes: 6eda4e2c5425 ("brcmfmac: Add tx p2p off-channel support.") Signed-off-by: Jason Huang <jason.huang2@infineon.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20260722082608.412472-1-Jason.Huang2@infineon.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02wifi: brcmfmac: Set DMA direction for msgbuf packet IDsCan Peng
brcmf_msgbuf_init_pktids() takes the DMA direction from its callers, but never stores it in the packet ID state. Since the state is zeroed, pktids->direction remains DMA_BIDIRECTIONAL for both the TX and RX packet ID pools. All msgbuf packet ID map and unmap paths use pktids->direction. As a result, TX buffers requested with DMA_TO_DEVICE and RX buffers requested with DMA_FROM_DEVICE are mapped and unmapped as DMA_BIDIRECTIONAL instead. Store the caller-provided direction when initializing the packet ID state. Signed-off-by: Can Peng <pengcan@kylinos.cn> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20260724092530.674624-1-pengcan@kylinos.cn Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02wifi: brcmfmac: validate msgbuf flowring IDs before useCan Peng
Firmware messages carry flow_ring_id values which brcmfmac converts to an internal flowid by subtracting BRCMF_H2D_MSGRING_FLOWRING_IDSTART. The resulting value is used as a bit index in txstatus_done_map and as an array index into msgbuf->flowrings and the flowring state. Validate the firmware supplied flow_ring_id before using it. This prevents flow_ring_id values below BRCMF_H2D_MSGRING_FLOWRING_IDSTART from underflowing and rejects values outside msgbuf->max_flowrings. In the tx status path, complete the packet with an error after removing a valid packet id so the skb is not leaked when the flow ring id is invalid. Signed-off-by: Can Peng <pengcan@kylinos.cn> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20260723055618.550834-1-pengcan@kylinos.cn Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02Merge tag 'rtw-next-2026-08-02' of https://github.com/pkshih/rtwJohannes Berg
Ping-Ke Shih says: ================== rtw-next patches for v7.3 Some random cleanups and fixes on rtlwifi, rtw88 and rtw89. The major features added to rtw89 are listed: rtw89: - add LED support - update BT-coexistence mechanism to support dual Bluetooth for RTL8922D - support WiFi 7 chip RTL8922DE ================== Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02Merge tag 'mt76-next-2026-08-01' of https://github.com/nbd168/wirelessJohannes Berg
Felix Fietkau says: =================== mt76 patches for 7.3 - fixes - mt7925 NAN support - mt7928 support - mt7996 AP powersave improvements =================== Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02Merge tag 'mm81x-next-2026-07-31' of ↵Johannes Berg
https://github.com/MorseMicroLabs/linux-wireless Lachlan Hodges says: ==================== - Just a single fix for synchronously shutting down timers to prevent a UaF. ==================== Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02wifi: wilc1000: validate monitor transmit frame headersMariano Baragiola
wilc_wfi_mon_xmit() reads the radiotap length before ensuring that the fixed header is present. After stripping that header, it reads the frame type and all three 802.11 addresses without checking how much frame data remains. A truncated monitor injection can therefore cause out-of-bounds reads. Validate the radiotap header first, use the common 802.11 helper to check the variable header length, and require a complete three-address header before using the addresses. This covers QoS and four-address data headers while rejecting short control headers that this path cannot classify. Signed-off-by: Mariano Baragiola <mbaragiola@linux.com> Link: https://patch.msgid.link/20260728192610.2236361-1-mbaragiola@linux.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02wifi: zd1211rw: reject secondary interfaces to prevent conflictsSlawomir Stepien
The zd1211rw driver is designed for single-function Wi-Fi dongles and hardcodes its USB endpoints. When a malformed USB device exposes multiple interfaces that match the driver's device ID, the driver blindly binds to all of them. During probe(), the driver calls usb_reset_device(), which iterates over all interfaces and invokes the pre_reset() callback for each bound interface. Since multiple interfaces are bound to zd1211rw, pre_reset() is called sequentially for each instance, acquiring their respective &mac->chip.mutex. Because all instances initialize their mutexes with the same lock class, lockdep detects a task acquiring a lock of the same class it already holds and flags it as a possible recursive deadlock: WARNING: possible recursive locking detected kworker/0:1/11 is trying to acquire lock: ffff88810371dde0 (&chip->mutex){+.+.}-{4:4}, at: zd_chip_disable_rxtx+0x20/0x50 drivers/net/wireless/zydas/zd1211rw/zd_chip.c:1465 but task is already holding lock: ffff8881138ddde0 (&chip->mutex){+.+.}-{4:4}, at: pre_reset+0x28c/0x380 drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1505 Fix this by explicitly rejecting secondary interfaces (bInterfaceNumber != 0) during probe(). This ensures that only a single instance of the driver binds to the device, eliminating the recursive locking scenario. Fixes: e85d0918b54f ("[PATCH] ZyDAS ZD1211 USB-WLAN driver") Assisted-by: Gemini:gemini-3.5-flash Gemini:gemini-3.1-pro-preview syzbot Reported-by: syzbot+0ec3d1a6cf1fbe79c153@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=0ec3d1a6cf1fbe79c153 Link: https://syzkaller.appspot.com/ai_job?id=00724ef7-fd77-4cde-9779-895b8f63c2f6 Signed-off-by: Slawomir Stepien <sst@poczta.fm> Link: https://patch.msgid.link/20260730065231.1644030-1-sst@poczta.fm Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02wifi: nxpwifi: embed rx_reorder_ptrRosen Penev
rx_reorder_ptr is a dynamically allocated array which is done near the main struct allocation. Combine the two to avoid freeing separately. Also fix the type to what it actually is. void is normally used to avoid casting but there's no need here. Signed-off-by: Rosen Penev <rosenp@gmail.com> Tested-by: Jeff Chen <jeff.chen_1@nxp.com> Reviewed-by: Jeff Chen <jeff.chen_1@nxp.com> Link: https://patch.msgid.link/20260729183715.691287-1-rosenp@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02wifi: cfg80211: convert cookie output to input parameterArend van Spriel
The remain_on_channel, mgmt_tx, and probe_peer ops previously used a u64 *cookie output parameter. Now that cfg80211 pre-assigns the cookie value before invoking drivers, the parameter conveys a value from caller to driver, not the other way around. Convert it to a plain u64 input parameter across the ops struct (cfg80211.h), rdev-ops.h wrappers, nl80211.c/mlme.c call sites, mac80211, and all driver implementations. The tx_control_port op is excluded: its cookie pointer is nullable (passed as NULL when dont_wait_for_ack is set), so the nullable pointer semantics are still required. Internal mac80211 helpers ieee80211_start_roc_work() and ieee80211_attach_ack_skb() still take u64 *cookie because they assign to the pointee; their callers now pass &cookie to take the address of the local value parameter. wil6210's internal wil_p2p_listen() is also updated to take u64 cookie since it is called directly from the remain_on_channel callback. Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20260731123509.1975281-12-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-08-02wifi: qtnfmac: use pre-assigned cookie for mgmt_txArend van Spriel
Stop overwriting *cookie with a random value in qtnf_mgmt_tx(). The internal firmware frame identifier (short_cookie) is unchanged. Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://patch.msgid.link/20260731123509.1975281-10-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>