AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/11/18 12:48 flow patch-triage
20m Args:
null

Results:
{
  "EnableConfigs": [
    "ATH10K",
    "ATH10K_USB",
    "MAC80211",
    "USB",
    "NL80211_TESTMODE"
  ],
  "FocusSymbols": [
    "ath10k_usb_probe",
    "ath10k_usb_reset_target",
    "ath10k_usb_hif_power_down",
    "ath10k_core_restart",
    "ath10k_core_start",
    "ath10k_core_stop",
    "ath10k_core_stop_once",
    "ath10k_halt",
    "ath10k_start",
    "ath10k_tm_cmd_utf_start",
    "ath10k_wmi_event_vdev_install_key_complete"
  ],
  "KMSANReasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver, introduces a `start_once` bus parameter to keep the firmware running across interface stop/start cycles, adds target cold reset routines on USB power-down/shutdown, and handles WMI key installation completion for USB.\n\n1. Uninitialized memory analysis:\n- All new stack variables (such as `val` in `ath10k_usb_reset_target` and `bus_params` in probe functions) are fully initialized before use.\n- The patch does not introduce or alter any copying of data to user space (no `copy_to_user`, `put_user`, netlink attributes, or ioctl outputs).\n- No changes alter buffer sizing, allocation routines, or packet parsing logic in ways that could expose uninitialized stack, heap, or page bytes.\n\n2. KASAN vs KMSAN applicability:\n- Potential risks in this change revolve around device state transitions, concurrency/synchronization (`conf_mutex`, `udev-\u003estate`), and lifecycle/cleanup during disconnect or shutdown. These failure modes (use-after-free, double free, locking deadlocks) are already covered by KASAN and LOCKDEP in standard test runs.\n- KMSAN is not required as there are no uninitialized memory reads or information leak risks introduced.",
  "NeedsKMSAN": false,
  "Reasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver and implements a single-start lifecycle ('start_once') across core, mac, USB HIF, testmode, and WMI components. This code is reachable and fuzzable in standard virtualized environments via USB emulation (such as syzkaller's Raw Gadget engine) along with mac80211 and nl80211 interfaces.",
  "WorthFuzzing": true
}

1/1 2026/11/18 12:48 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 8981388d3c244eef773c57eec7a1a4e19654bbc3\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Wed Nov 18 12:48:05 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig\nindex efb9f022d8c662..a727cd73ec098c 100644\n--- a/drivers/net/wireless/ath/ath10k/Kconfig\n+++ b/drivers/net/wireless/ath/ath10k/Kconfig\n@@ -34,11 +34,10 @@ config ATH10K_SDIO\n \t  This module adds support for SDIO/MMC bus.\n \n config ATH10K_USB\n-\ttristate \"Atheros ath10k USB support (EXPERIMENTAL)\"\n+\ttristate \"Atheros ath10k USB support\"\n \tdepends on ATH10K \u0026\u0026 USB\n \thelp\n-\t  This module adds experimental support for USB bus. Currently\n-\t  work in progress and will not fully work.\n+\t  This module adds support for USB bus.\n \n config ATH10K_SNOC\n \ttristate \"Qualcomm ath10k SNOC support\"\ndiff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c\nindex 7c2939cbde5f05..b7a84980a0885d 100644\n--- a/drivers/net/wireless/ath/ath10k/core.c\n+++ b/drivers/net/wireless/ath/ath10k/core.c\n@@ -628,6 +628,48 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {\n \t\t.delay_unmap_buffer = false,\n \t\t.mcast_frame_registration = false,\n \t},\n+\t{\n+\t\t.id = QCA9377_HW_1_1_DEV_VERSION,\n+\t\t.dev_id = 0x9378,\n+\t\t.bus = ATH10K_BUS_USB,\n+\t\t.name = \"qca9377 hw1.1 usb\",\n+\t\t.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,\n+\t\t.uart_pin = 6,\n+\t\t.otp_exe_param = 0,\n+\t\t.channel_counters_freq_hz = 88000,\n+\t\t.max_probe_resp_desc_thres = 0,\n+\t\t.cal_data_len = 8124,\n+\t\t.fw = {\n+\t\t\t.dir = QCA9377_HW_1_0_FW_DIR,\n+\t\t\t.board_size = QCA9377_BOARD_DATA_SZ,\n+\t\t\t.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,\n+\t\t},\n+\t\t.rx_desc_ops = \u0026qca988x_rx_desc_ops,\n+\t\t.hw_ops = \u0026qca6174_ops,\n+\t\t.hw_clk = qca6174_clk,\n+\t\t.target_cpu_freq = 176000000,\n+\t\t.decap_align_bytes = 4,\n+\t\t.spectral_bin_discard = 0,\n+\t\t.spectral_bin_offset = 0,\n+\t\t.vht160_mcs_rx_highest = 0,\n+\t\t.vht160_mcs_tx_highest = 0,\n+\t\t.n_cipher_suites = 8,\n+\t\t.ast_skid_limit = 0x10,\n+\t\t.num_wds_entries = 0x20,\n+\t\t.target_64bit = false,\n+\t\t.rx_ring_fill_level = HTT_RX_RING_FILL_LEVEL,\n+\t\t.shadow_reg_support = false,\n+\t\t.rri_on_ddr = false,\n+\t\t.hw_filter_reset_required = true,\n+\t\t.fw_diag_ce_download = false,\n+\t\t.credit_size_workaround = false,\n+\t\t.tx_stats_over_pktlog = false,\n+\t\t.dynamic_sar_support = false,\n+\t\t.hw_restart_disconnect = false,\n+\t\t.use_fw_tx_credits = true,\n+\t\t.delay_unmap_buffer = false,\n+\t\t.mcast_frame_registration = false,\n+\t},\n \t{\n \t\t.id = QCA9377_HW_1_1_DEV_VERSION,\n \t\t.dev_id = QCA9377_1_0_DEVICE_ID,\n@@ -2603,6 +2645,12 @@ static void ath10k_core_restart(struct work_struct *work)\n \n \tswitch (ar-\u003estate) {\n \tcase ATH10K_STATE_ON:\n+\t\tif (ar-\u003ebus_param.start_once) {\n+\t\t\tar-\u003estate = ATH10K_STATE_WEDGED;\n+\t\t\tath10k_warn(ar, \"firmware cannot be restarted, resetting the target\\n\");\n+\t\t\tath10k_hif_power_down(ar);\n+\t\t\tbreak;\n+\t\t}\n \t\tar-\u003estate = ATH10K_STATE_RESTARTING;\n \t\tath10k_halt(ar);\n \t\tath10k_scan_finish(ar);\n@@ -2982,6 +3030,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,\n \n \tlockdep_assert_held(\u0026ar-\u003econf_mutex);\n \n+\t/* the firmware started during the registration is still running */\n+\tif (ar-\u003ebus_param.start_once \u0026\u0026 ar-\u003estate != ATH10K_STATE_OFF)\n+\t\treturn 0;\n+\n \tclear_bit(ATH10K_FLAG_CRASH_FLUSH, \u0026ar-\u003edev_flags);\n \n \tar-\u003erunning_fw = fw;\n@@ -3333,7 +3385,8 @@ void ath10k_core_stop(struct ath10k *ar)\n \n \t/* try to suspend target */\n \tif (ar-\u003estate != ATH10K_STATE_RESTARTING \u0026\u0026\n-\t    ar-\u003estate != ATH10K_STATE_UTF)\n+\t    ar-\u003estate != ATH10K_STATE_UTF \u0026\u0026\n+\t    !ar-\u003ebus_param.start_once)\n \t\tath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR);\n \n \tath10k_hif_stop(ar);\n@@ -3345,6 +3398,18 @@ void ath10k_core_stop(struct ath10k *ar)\n }\n EXPORT_SYMBOL(ath10k_core_stop);\n \n+static void ath10k_core_stop_once(struct ath10k *ar)\n+{\n+\tif (!ar-\u003ebus_param.start_once)\n+\t\treturn;\n+\n+\tmutex_lock(\u0026ar-\u003econf_mutex);\n+\tath10k_core_stop(ar);\n+\tmutex_unlock(\u0026ar-\u003econf_mutex);\n+\n+\tath10k_hif_power_down(ar);\n+}\n+\n /* mac80211 manages fw/hw initialization through start/stop hooks. However in\n  * order to know what hw capabilities should be advertised to mac80211 it is\n  * necessary to load the firmware (and tear it down immediately since start\n@@ -3479,6 +3544,13 @@ static int ath10k_core_probe_fw(struct ath10k *ar)\n \t}\n \n \tath10k_debug_print_boot_info(ar);\n+\n+\t/* keep the firmware running if it cannot be started a second time */\n+\tif (ar-\u003ebus_param.start_once) {\n+\t\tmutex_unlock(\u0026ar-\u003econf_mutex);\n+\t\treturn 0;\n+\t}\n+\n \tath10k_core_stop(ar);\n \n \tmutex_unlock(\u0026ar-\u003econf_mutex);\n@@ -3564,6 +3636,7 @@ static void ath10k_core_register_work(struct work_struct *work)\n err_unregister_mac:\n \tath10k_mac_unregister(ar);\n err_release_fw:\n+\tath10k_core_stop_once(ar);\n \tath10k_core_free_firmware_files(ar);\n err:\n \t/* TODO: It's probably a good idea to release device from the driver\n@@ -3605,6 +3678,8 @@ void ath10k_core_unregister(struct ath10k *ar)\n \t */\n \tath10k_mac_unregister(ar);\n \n+\tath10k_core_stop_once(ar);\n+\n \tath10k_testmode_destroy(ar);\n \n \tath10k_core_free_firmware_files(ar);\ndiff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h\nindex dfee432615ebff..7a09244bb3f2f3 100644\n--- a/drivers/net/wireless/ath/ath10k/core.h\n+++ b/drivers/net/wireless/ath/ath10k/core.h\n@@ -1006,6 +1006,11 @@ struct ath10k_bus_params {\n \tenum ath10k_dev_type dev_type;\n \tbool link_can_suspend;\n \tbool hl_msdu_ids;\n+\n+\t/* The target cannot be reset without leaving the bus, so the firmware\n+\t * is kept running from the registration to the unregistration.\n+\t */\n+\tbool start_once;\n };\n \n struct ath10k {\ndiff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h\nindex cd468b24bd3333..6196a11b77d173 100644\n--- a/drivers/net/wireless/ath/ath10k/hw.h\n+++ b/drivers/net/wireless/ath/ath10k/hw.h\n@@ -900,6 +900,7 @@ ath10k_is_rssi_enable(struct ath10k_hw_params *hw,\n #define SOC_RESET_CONTROL_SI0_RST_MASK\t\tar-\u003eregs-\u003esoc_reset_control_si0_rst_mask\n #define SOC_RESET_CONTROL_CE_RST_MASK\t\tar-\u003eregs-\u003esoc_reset_control_ce_rst_mask\n #define SOC_RESET_CONTROL_CPU_WARM_RST_MASK\t0x00000040\n+#define SOC_RESET_CONTROL_COLD_RST_MASK\t\t0x00000100\n #define SOC_CPU_CLOCK_OFFSET\t\t\t0x00000020\n #define SOC_CPU_CLOCK_STANDARD_LSB\t\t0\n #define SOC_CPU_CLOCK_STANDARD_MASK\t\t0x00000003\ndiff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c\nindex 8e604697d6c20d..65452eb258b55e 100644\n--- a/drivers/net/wireless/ath/ath10k/mac.c\n+++ b/drivers/net/wireless/ath/ath10k/mac.c\n@@ -4819,8 +4819,12 @@ void ath10k_halt(struct ath10k *ar)\n \tath10k_scan_finish(ar);\n \tath10k_peer_cleanup_all(ar);\n \tath10k_stop_radar_confirmation(ar);\n-\tath10k_core_stop(ar);\n-\tath10k_hif_power_down(ar);\n+\n+\t/* stop the firmware unless it can be started only once */\n+\tif (!ar-\u003ebus_param.start_once) {\n+\t\tath10k_core_stop(ar);\n+\t\tath10k_hif_power_down(ar);\n+\t}\n \n \tspin_lock_bh(\u0026ar-\u003edata_lock);\n \tlist_for_each_entry(arvif, \u0026ar-\u003earvifs, list)\n@@ -5381,7 +5385,9 @@ static int ath10k_start(struct ieee80211_hw *hw)\n \treturn 0;\n \n err_core_stop:\n-\tath10k_core_stop(ar);\n+\t/* stop the firmware unless it can be started only once */\n+\tif (!ar-\u003ebus_param.start_once)\n+\t\tath10k_core_stop(ar);\n \n err_power_down:\n \tath10k_hif_power_down(ar);\ndiff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c\nindex 282ae6e20c8eff..10ebf3c1ccbd7e 100644\n--- a/drivers/net/wireless/ath/ath10k/testmode.c\n+++ b/drivers/net/wireless/ath/ath10k/testmode.c\n@@ -353,6 +353,12 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[])\n \t\tgoto err;\n \t}\n \n+\t/* the running firmware cannot be replaced by the UTF firmware */\n+\tif (ar-\u003ebus_param.start_once) {\n+\t\tret = -EOPNOTSUPP;\n+\t\tgoto err;\n+\t}\n+\n \tif (WARN_ON(ar-\u003etestmode.utf_mode_fw.fw_file.firmware != NULL)) {\n \t\t/* utf image is already downloaded, it shouldn't be */\n \t\tret = -EEXIST;\ndiff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c\nindex 987d57a01ddfa7..e23d87c84069f5 100644\n--- a/drivers/net/wireless/ath/ath10k/usb.c\n+++ b/drivers/net/wireless/ath/ath10k/usb.c\n@@ -707,9 +707,46 @@ static int ath10k_usb_hif_power_up(struct ath10k *ar,\n \treturn 0;\n }\n \n+/* The running firmware does not accept BMI commands, so the target has to\n+ * be cold reset before it can be probed again. The reset makes it leave\n+ * the bus and enumerate as a new device.\n+ */\n+static void ath10k_usb_reset_target(struct ath10k *ar, bool wait)\n+{\n+\tstruct ath10k_usb *ar_usb = ath10k_usb_priv(ar);\n+\t__le32 val = cpu_to_le32(SOC_RESET_CONTROL_COLD_RST_MASK);\n+\tunsigned long timeout;\n+\tint ret;\n+\n+\tif (!ar-\u003ebmi.done_sent || ar_usb-\u003eudev-\u003estate == USB_STATE_NOTATTACHED)\n+\t\treturn;\n+\n+\tret = ath10k_usb_hif_diag_write(ar, RTC_SOC_BASE_ADDRESS +\n+\t\t\t\t\tSOC_RESET_CONTROL_ADDRESS,\n+\t\t\t\t\t\u0026val, sizeof(val));\n+\tif (ret) {\n+\t\tath10k_warn(ar, \"failed to reset the target: %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tif (!wait)\n+\t\treturn;\n+\n+\t/* wait for the disconnect, the stale device must not be probed again */\n+\ttimeout = jiffies + msecs_to_jiffies(ATH10K_USB_RESET_TIMEOUT_MS);\n+\twhile (ar_usb-\u003eudev-\u003estate != USB_STATE_NOTATTACHED) {\n+\t\tif (time_after(jiffies, timeout)) {\n+\t\t\tath10k_warn(ar, \"target did not leave the bus after the reset\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tmsleep(20);\n+\t}\n+}\n+\n static void ath10k_usb_hif_power_down(struct ath10k *ar)\n {\n \tath10k_usb_flush_all(ar);\n+\tath10k_usb_reset_target(ar, true);\n }\n \n #ifdef CONFIG_PM\n@@ -1037,15 +1074,13 @@ static int ath10k_usb_probe(struct usb_interface *interface,\n \t/* TODO: don't know yet how to get chip_id with USB */\n \tbus_params.chip_id = 0;\n \tbus_params.hl_msdu_ids = true;\n+\tbus_params.start_once = true;\n \tret = ath10k_core_register(ar, \u0026bus_params);\n \tif (ret) {\n \t\tath10k_warn(ar, \"failed to register driver core: %d\\n\", ret);\n \t\tgoto err_usb_destroy;\n \t}\n \n-\t/* TODO: remove this once USB support is fully implemented */\n-\tath10k_warn(ar, \"Warning: ath10k USB support is incomplete, don't expect anything to work!\\n\");\n-\n \treturn 0;\n \n err_usb_destroy:\n@@ -1071,6 +1106,22 @@ static void ath10k_usb_disconnect(struct usb_interface *interface)\n \tath10k_core_destroy(ar_usb-\u003ear);\n }\n \n+static void ath10k_usb_shutdown(struct usb_interface *interface)\n+{\n+\tstruct ath10k_usb *ar_usb = usb_get_intfdata(interface);\n+\tstruct ath10k *ar;\n+\n+\tif (!ar_usb)\n+\t\treturn;\n+\n+\tar = ar_usb-\u003ear;\n+\n+\t/* a firmware left running would fail the probe after the reboot */\n+\tmutex_lock(\u0026ar-\u003econf_mutex);\n+\tath10k_usb_reset_target(ar, false);\n+\tmutex_unlock(\u0026ar-\u003econf_mutex);\n+}\n+\n #ifdef CONFIG_PM\n \n static int ath10k_usb_pm_suspend(struct usb_interface *interface,\n@@ -1102,6 +1153,7 @@ static int ath10k_usb_pm_resume(struct usb_interface *interface)\n \n /* table of devices that work with this driver */\n static struct usb_device_id ath10k_usb_ids[] = {\n+\t{USB_DEVICE(0x0cf3, 0x9378)}, /* Atheros QCA9377-7 */\n \t{USB_DEVICE(0x13b1, 0x0042)}, /* Linksys WUSB6100M */\n \t{ /* Terminating entry */ },\n };\n@@ -1114,8 +1166,10 @@ static struct usb_driver ath10k_usb_driver = {\n \t.suspend = ath10k_usb_pm_suspend,\n \t.resume = ath10k_usb_pm_resume,\n \t.disconnect = ath10k_usb_disconnect,\n+\t.shutdown = ath10k_usb_shutdown,\n \t.id_table = ath10k_usb_ids,\n \t.supports_autosuspend = true,\n+\t.soft_unbind = 1,\n \t.disable_hub_initiated_lpm = 1,\n };\n \ndiff --git a/drivers/net/wireless/ath/ath10k/usb.h b/drivers/net/wireless/ath/ath10k/usb.h\nindex 517afbd7376432..47ed1bad81a6d1 100644\n--- a/drivers/net/wireless/ath/ath10k/usb.h\n+++ b/drivers/net/wireless/ath/ath10k/usb.h\n@@ -13,6 +13,7 @@\n #define TX_URB_COUNT               32\n #define RX_URB_COUNT               32\n #define ATH10K_USB_RX_BUFFER_SIZE  4096\n+#define ATH10K_USB_RESET_TIMEOUT_MS 3000\n \n #define ATH10K_USB_PIPE_INVALID ATH10K_USB_PIPE_MAX\n \ndiff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c\nindex e57588c19c800c..7d43a23017aa06 100644\n--- a/drivers/net/wireless/ath/ath10k/wmi.c\n+++ b/drivers/net/wireless/ath/ath10k/wmi.c\n@@ -5339,6 +5339,10 @@ void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,\n \t\t\t\t\t\tstruct sk_buff *skb)\n {\n \tath10k_dbg(ar, ATH10K_DBG_WMI, \"WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID\\n\");\n+\n+\t/* the USB firmware sends no HTT security indication for group keys */\n+\tif (ar-\u003ehif.bus == ATH10K_BUS_USB)\n+\t\tcomplete(\u0026ar-\u003einstall_key_done);\n }\n \n void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb)\n"
}

2/1 2026/11/18 12:48 agent patch-evaluator
14m Model:
core

Args:
null

Results:
{
  "EnableConfigs": [
    "ATH10K",
    "ATH10K_USB",
    "MAC80211",
    "USB",
    "NL80211_TESTMODE"
  ],
  "FocusSymbols": [
    "ath10k_usb_probe",
    "ath10k_usb_reset_target",
    "ath10k_usb_hif_power_down",
    "ath10k_core_restart",
    "ath10k_core_start",
    "ath10k_core_stop",
    "ath10k_core_stop_once",
    "ath10k_halt",
    "ath10k_start",
    "ath10k_tm_cmd_utf_start",
    "ath10k_wmi_event_vdev_install_key_complete"
  ],
  "Reasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver and implements a single-start lifecycle ('start_once') across core, mac, USB HIF, testmode, and WMI components. This code is reachable and fuzzable in standard virtualized environments via USB emulation (such as syzkaller's Raw Gadget engine) along with mac80211 and nl80211 interfaces.",
  "WorthFuzzing": true
}

Instruction:
You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.

================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.

- REACHABILITY IS THE PRIMARY GATE:
  Fuzzing can only discover bugs in code that can actually execute in standard virtualized
  environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
  If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
  regardless of whether it adds assertions or complex logic.

- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
  Patch authors routinely label changes as "cleanups", "refactorings", or state
  "No functional change intended". Do NOT take these claims at face value.
  Code refactorings that rearrange logic, introduce helper functions, or alter state management
  in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
  If reachable executable code is modified or refactored, it MUST be fuzzed.

- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
  When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
  BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
  Even if the author believes the invariant always holds, fuzzing is essential to verify whether
  an unusual sequence of operations can violate it.

================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:

- Non-kernel and non-executable changes:
  * Modifications to Documentation/, comments, or spelling fixes.
  * User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
    that do not affect the compiled kernel image (vmlinux) or kernel modules.
  * Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
    that do not alter control flow or data structures.
  * Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
  * Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
    ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
  * Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
    physical PCI hot-unplug or manual sysfs driver unbinding.
  * Code paths exclusive to architectures other than the target architecture.

================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
  * Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
    BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
  * Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
  * Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
  * Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).

================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:

- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
  Do NOT list generic, ubiquitous functions called by almost every program in the corpus
  (including, but not limited to: general memory allocators and deallocators, page fault
  and trap handlers, or core synchronization primitives; this is not an exhaustive list).
  Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
  which severely dilutes fuzzing effort away from the actual changes.

- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
  List functions that specifically implement the logic being added or altered, or direct API entrypoints
  for the subsystem feature under review.

- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
  Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
  distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
  If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
  functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).

================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Target architecture: amd64

For your convenience, here is the diff of the changes:
commit 8981388d3c244eef773c57eec7a1a4e19654bbc3
Author: syz-cluster <triage@syzkaller.com>
Date:   Wed Nov 18 12:48:05 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
index efb9f022d8c662..a727cd73ec098c 100644
--- a/drivers/net/wireless/ath/ath10k/Kconfig
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
@@ -34,11 +34,10 @@ config ATH10K_SDIO
 	  This module adds support for SDIO/MMC bus.
 
 config ATH10K_USB
-	tristate "Atheros ath10k USB support (EXPERIMENTAL)"
+	tristate "Atheros ath10k USB support"
 	depends on ATH10K && USB
 	help
-	  This module adds experimental support for USB bus. Currently
-	  work in progress and will not fully work.
+	  This module adds support for USB bus.
 
 config ATH10K_SNOC
 	tristate "Qualcomm ath10k SNOC support"
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 7c2939cbde5f05..b7a84980a0885d 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -628,6 +628,48 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.delay_unmap_buffer = false,
 		.mcast_frame_registration = false,
 	},
+	{
+		.id = QCA9377_HW_1_1_DEV_VERSION,
+		.dev_id = 0x9378,
+		.bus = ATH10K_BUS_USB,
+		.name = "qca9377 hw1.1 usb",
+		.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
+		.uart_pin = 6,
+		.otp_exe_param = 0,
+		.channel_counters_freq_hz = 88000,
+		.max_probe_resp_desc_thres = 0,
+		.cal_data_len = 8124,
+		.fw = {
+			.dir = QCA9377_HW_1_0_FW_DIR,
+			.board_size = QCA9377_BOARD_DATA_SZ,
+			.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,
+		},
+		.rx_desc_ops = &qca988x_rx_desc_ops,
+		.hw_ops = &qca6174_ops,
+		.hw_clk = qca6174_clk,
+		.target_cpu_freq = 176000000,
+		.decap_align_bytes = 4,
+		.spectral_bin_discard = 0,
+		.spectral_bin_offset = 0,
+		.vht160_mcs_rx_highest = 0,
+		.vht160_mcs_tx_highest = 0,
+		.n_cipher_suites = 8,
+		.ast_skid_limit = 0x10,
+		.num_wds_entries = 0x20,
+		.target_64bit = false,
+		.rx_ring_fill_level = HTT_RX_RING_FILL_LEVEL,
+		.shadow_reg_support = false,
+		.rri_on_ddr = false,
+		.hw_filter_reset_required = true,
+		.fw_diag_ce_download = false,
+		.credit_size_workaround = false,
+		.tx_stats_over_pktlog = false,
+		.dynamic_sar_support = false,
+		.hw_restart_disconnect = false,
+		.use_fw_tx_credits = true,
+		.delay_unmap_buffer = false,
+		.mcast_frame_registration = false,
+	},
 	{
 		.id = QCA9377_HW_1_1_DEV_VERSION,
 		.dev_id = QCA9377_1_0_DEVICE_ID,
@@ -2603,6 +2645,12 @@ static void ath10k_core_restart(struct work_struct *work)
 
 	switch (ar->state) {
 	case ATH10K_STATE_ON:
+		if (ar->bus_param.start_once) {
+			ar->state = ATH10K_STATE_WEDGED;
+			ath10k_warn(ar, "firmware cannot be restarted, resetting the target\n");
+			ath10k_hif_power_down(ar);
+			break;
+		}
 		ar->state = ATH10K_STATE_RESTARTING;
 		ath10k_halt(ar);
 		ath10k_scan_finish(ar);
@@ -2982,6 +3030,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
 
 	lockdep_assert_held(&ar->conf_mutex);
 
+	/* the firmware started during the registration is still running */
+	if (ar->bus_param.start_once && ar->state != ATH10K_STATE_OFF)
+		return 0;
+
 	clear_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags);
 
 	ar->running_fw = fw;
@@ -3333,7 +3385,8 @@ void ath10k_core_stop(struct ath10k *ar)
 
 	/* try to suspend target */
 	if (ar->state != ATH10K_STATE_RESTARTING &&
-	    ar->state != ATH10K_STATE_UTF)
+	    ar->state != ATH10K_STATE_UTF &&
+	    !ar->bus_param.start_once)
 		ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR);
 
 	ath10k_hif_stop(ar);
@@ -3345,6 +3398,18 @@ void ath10k_core_stop(struct ath10k *ar)
 }
 EXPORT_SYMBOL(ath10k_core_stop);
 
+static void ath10k_core_stop_once(struct ath10k *ar)
+{
+	if (!ar->bus_param.start_once)
+		return;
+
+	mutex_lock(&ar->conf_mutex);
+	ath10k_core_stop(ar);
+	mutex_unlock(&ar->conf_mutex);
+
+	ath10k_hif_power_down(ar);
+}
+
 /* mac80211 manages fw/hw initialization through start/stop hooks. However in
  * order to know what hw capabilities should be advertised to mac80211 it is
  * necessary to load the firmware (and tear it down immediately since start
@@ -3479,6 +3544,13 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
 	}
 
 	ath10k_debug_print_boot_info(ar);
+
+	/* keep the firmware running if it cannot be started a second time */
+	if (ar->bus_param.start_once) {
+		mutex_unlock(&ar->conf_mutex);
+		return 0;
+	}
+
 	ath10k_core_stop(ar);
 
 	mutex_unlock(&ar->conf_mutex);
@@ -3564,6 +3636,7 @@ static void ath10k_core_register_work(struct work_struct *work)
 err_unregister_mac:
 	ath10k_mac_unregister(ar);
 err_release_fw:
+	ath10k_core_stop_once(ar);
 	ath10k_core_free_firmware_files(ar);
 err:
 	/* TODO: It's probably a good idea to release device from the driver
@@ -3605,6 +3678,8 @@ void ath10k_core_unregister(struct ath10k *ar)
 	 */
 	ath10k_mac_unregister(ar);
 
+	ath10k_core_stop_once(ar);
+
 	ath10k_testmode_destroy(ar);
 
 	ath10k_core_free_firmware_files(ar);
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index dfee432615ebff..7a09244bb3f2f3 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -1006,6 +1006,11 @@ struct ath10k_bus_params {
 	enum ath10k_dev_type dev_type;
 	bool link_can_suspend;
 	bool hl_msdu_ids;
+
+	/* The target cannot be reset without leaving the bus, so the firmware
+	 * is kept running from the registration to the unregistration.
+	 */
+	bool start_once;
 };
 
 struct ath10k {
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index cd468b24bd3333..6196a11b77d173 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -900,6 +900,7 @@ ath10k_is_rssi_enable(struct ath10k_hw_params *hw,
 #define SOC_RESET_CONTROL_SI0_RST_MASK		ar->regs->soc_reset_control_si0_rst_mask
 #define SOC_RESET_CONTROL_CE_RST_MASK		ar->regs->soc_reset_control_ce_rst_mask
 #define SOC_RESET_CONTROL_CPU_WARM_RST_MASK	0x00000040
+#define SOC_RESET_CONTROL_COLD_RST_MASK		0x00000100
 #define SOC_CPU_CLOCK_OFFSET			0x00000020
 #define SOC_CPU_CLOCK_STANDARD_LSB		0
 #define SOC_CPU_CLOCK_STANDARD_MASK		0x00000003
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 8e604697d6c20d..65452eb258b55e 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4819,8 +4819,12 @@ void ath10k_halt(struct ath10k *ar)
 	ath10k_scan_finish(ar);
 	ath10k_peer_cleanup_all(ar);
 	ath10k_stop_radar_confirmation(ar);
-	ath10k_core_stop(ar);
-	ath10k_hif_power_down(ar);
+
+	/* stop the firmware unless it can be started only once */
+	if (!ar->bus_param.start_once) {
+		ath10k_core_stop(ar);
+		ath10k_hif_power_down(ar);
+	}
 
 	spin_lock_bh(&ar->data_lock);
 	list_for_each_entry(arvif, &ar->arvifs, list)
@@ -5381,7 +5385,9 @@ static int ath10k_start(struct ieee80211_hw *hw)
 	return 0;
 
 err_core_stop:
-	ath10k_core_stop(ar);
+	/* stop the firmware unless it can be started only once */
+	if (!ar->bus_param.start_once)
+		ath10k_core_stop(ar);
 
 err_power_down:
 	ath10k_hif_power_down(ar);
diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c
index 282ae6e20c8eff..10ebf3c1ccbd7e 100644
--- a/drivers/net/wireless/ath/ath10k/testmode.c
+++ b/drivers/net/wireless/ath/ath10k/testmode.c
@@ -353,6 +353,12 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[])
 		goto err;
 	}
 
+	/* the running firmware cannot be replaced by the UTF firmware */
+	if (ar->bus_param.start_once) {
+		ret = -EOPNOTSUPP;
+		goto err;
+	}
+
 	if (WARN_ON(ar->testmode.utf_mode_fw.fw_file.firmware != NULL)) {
 		/* utf image is already downloaded, it shouldn't be */
 		ret = -EEXIST;
diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c
index 987d57a01ddfa7..e23d87c84069f5 100644
--- a/drivers/net/wireless/ath/ath10k/usb.c
+++ b/drivers/net/wireless/ath/ath10k/usb.c
@@ -707,9 +707,46 @@ static int ath10k_usb_hif_power_up(struct ath10k *ar,
 	return 0;
 }
 
+/* The running firmware does not accept BMI commands, so the target has to
+ * be cold reset before it can be probed again. The reset makes it leave
+ * the bus and enumerate as a new device.
+ */
+static void ath10k_usb_reset_target(struct ath10k *ar, bool wait)
+{
+	struct ath10k_usb *ar_usb = ath10k_usb_priv(ar);
+	__le32 val = cpu_to_le32(SOC_RESET_CONTROL_COLD_RST_MASK);
+	unsigned long timeout;
+	int ret;
+
+	if (!ar->bmi.done_sent || ar_usb->udev->state == USB_STATE_NOTATTACHED)
+		return;
+
+	ret = ath10k_usb_hif_diag_write(ar, RTC_SOC_BASE_ADDRESS +
+					SOC_RESET_CONTROL_ADDRESS,
+					&val, sizeof(val));
+	if (ret) {
+		ath10k_warn(ar, "failed to reset the target: %d\n", ret);
+		return;
+	}
+
+	if (!wait)
+		return;
+
+	/* wait for the disconnect, the stale device must not be probed again */
+	timeout = jiffies + msecs_to_jiffies(ATH10K_USB_RESET_TIMEOUT_MS);
+	while (ar_usb->udev->state != USB_STATE_NOTATTACHED) {
+		if (time_after(jiffies, timeout)) {
+			ath10k_warn(ar, "target did not leave the bus after the reset\n");
+			return;
+		}
+		msleep(20);
+	}
+}
+
 static void ath10k_usb_hif_power_down(struct ath10k *ar)
 {
 	ath10k_usb_flush_all(ar);
+	ath10k_usb_reset_target(ar, true);
 }
 
 #ifdef CONFIG_PM
@@ -1037,15 +1074,13 @@ static int ath10k_usb_probe(struct usb_interface *interface,
 	/* TODO: don't know yet how to get chip_id with USB */
 	bus_params.chip_id = 0;
 	bus_params.hl_msdu_ids = true;
+	bus_params.start_once = true;
 	ret = ath10k_core_register(ar, &bus_params);
 	if (ret) {
 		ath10k_warn(ar, "failed to register driver core: %d\n", ret);
 		goto err_usb_destroy;
 	}
 
-	/* TODO: remove this once USB support is fully implemented */
-	ath10k_warn(ar, "Warning: ath10k USB support is incomplete, don't expect anything to work!\n");
-
 	return 0;
 
 err_usb_destroy:
@@ -1071,6 +1106,22 @@ static void ath10k_usb_disconnect(struct usb_interface *interface)
 	ath10k_core_destroy(ar_usb->ar);
 }
 
+static void ath10k_usb_shutdown(struct usb_interface *interface)
+{
+	struct ath10k_usb *ar_usb = usb_get_intfdata(interface);
+	struct ath10k *ar;
+
+	if (!ar_usb)
+		return;
+
+	ar = ar_usb->ar;
+
+	/* a firmware left running would fail the probe after the reboot */
+	mutex_lock(&ar->conf_mutex);
+	ath10k_usb_reset_target(ar, false);
+	mutex_unlock(&ar->conf_mutex);
+}
+
 #ifdef CONFIG_PM
 
 static int ath10k_usb_pm_suspend(struct usb_interface *interface,
@@ -1102,6 +1153,7 @@ static int ath10k_usb_pm_resume(struct usb_interface *interface)
 
 /* table of devices that work with this driver */
 static struct usb_device_id ath10k_usb_ids[] = {
+	{USB_DEVICE(0x0cf3, 0x9378)}, /* Atheros QCA9377-7 */
 	{USB_DEVICE(0x13b1, 0x0042)}, /* Linksys WUSB6100M */
 	{ /* Terminating entry */ },
 };
@@ -1114,8 +1166,10 @@ static struct usb_driver ath10k_usb_driver = {
 	.suspend = ath10k_usb_pm_suspend,
 	.resume = ath10k_usb_pm_resume,
 	.disconnect = ath10k_usb_disconnect,
+	.shutdown = ath10k_usb_shutdown,
 	.id_table = ath10k_usb_ids,
 	.supports_autosuspend = true,
+	.soft_unbind = 1,
 	.disable_hub_initiated_lpm = 1,
 };
 
diff --git a/drivers/net/wireless/ath/ath10k/usb.h b/drivers/net/wireless/ath/ath10k/usb.h
index 517afbd7376432..47ed1bad81a6d1 100644
--- a/drivers/net/wireless/ath/ath10k/usb.h
+++ b/drivers/net/wireless/ath/ath10k/usb.h
@@ -13,6 +13,7 @@
 #define TX_URB_COUNT               32
 #define RX_URB_COUNT               32
 #define ATH10K_USB_RX_BUFFER_SIZE  4096
+#define ATH10K_USB_RESET_TIMEOUT_MS 3000
 
 #define ATH10K_USB_PIPE_INVALID ATH10K_USB_PIPE_MAX
 
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index e57588c19c800c..7d43a23017aa06 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5339,6 +5339,10 @@ void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
 						struct sk_buff *skb)
 {
 	ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID\n");
+
+	/* the USB firmware sends no HTT security indication for group keys */
+	if (ar->hif.bus == ATH10K_BUS_USB)
+		complete(&ar->install_key_done);
 }
 
 void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb)

3/2 2026/11/18 12:48 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 8406
							output: 42
							thoughts: 1936
						

Thoughts:
**Analyzing the Implications of This ath10k USB Patch for Fuzzing**

Okay, let's break this down. The patch focuses on improving ath10k USB support, particularly for the QCA9377 USB device. I see changes in the Kconfig, core, header, MAC, testmode, USB, and WMI files, which tells me this is a pretty comprehensive update.

The Kconfig change removes experimental markers from ATH10K_USB, which is good. That likely means the USB support is considered more stable now. The core changes are interesting: adding the QCA9377 USB entry to the hardware parameter list and, more importantly, implementing a `start_once` flag within the `ath10k_bus_params` struct. This flag appears to control whether the firmware can be restarted. The added functions `ath10k_core_stop_once` and modifications to existing functions like `ath10k_core_restart`, `ath10k_core_start`, and `ath10k_core_stop` strongly suggest that the driver is being hardened against repeated firmware restarts, likely a consequence of dealing with USB devices' reset behavior. The changes to core, MAC, testmode, and WMI clearly suggest that this "start_once" mechanism is propagated throughout the driver and impacts core functionality such as halting, starting, and test mode entry.

The USB-specific changes are the key here. We have the addition of a `ath10k_usb_reset_target` function and new functions `ath10k_usb_shutdown`, new USB ID, and setting `.shutdown` and `.soft_unbind` in the `usb_driver`. The USB probe sets `bus_params.start_once = true`, suggesting USB devices should only start the firmware once, potentially because of USB device reset or firmware constraints. The WMI change related to group key handling is a bit of a detail, but it indicates that USB firmware may differ in how it signals HTT security information.

Now, from a fuzzing perspective, this is where it gets exciting. My immediate thought is, "Can this be reached with syzkaller?" I recall reading that syzkaller can indeed fuzz USB devices through raw-gadget, which is critical. Syzkaller leverages software-emulated devices like USB gadgets within QEMU, so the fact that changes span across core, MAC, testmode, and USB driver code is crucial. Furthermore, the explicit addition of the QCA9377 USB device ID and the USB-specific shutdown/reset code means the driver is specifically targeting USB-based ath10k devices. This is a solid sign that this is reachable. The changes to the `start_once` flag are particularly interesting from a fuzzing perspective. It suggests that there are now code paths specifically designed to handle scenarios where the firmware can't be restarted multiple times, possibly due to USB-related issues. This is a prime target for fuzzing because errors here could lead to device hangs or other instability.

I need to quickly verify that syzkaller can probe this with the new USB device ID, or even without firmware, given the `start_once` mechanism. I'm going to quickly check `drivers/net/wireless/ath/ath10k/usb.c` and `core.c` to see how `ath10k_usb_probe` and firmware loading works. I'm particularly interested in seeing how the `start_once` flag affects the probe sequence. If the probe *can* succeed without firmware, and the `start_once` prevents restarts, this opens the door to discover potential issues with the initial setup or the handling of USB-specific errors during the device's lifecycle.



4/2 2026/11/18 12:48 tool grepper
0m Args:
{
  "Expression": "ath10k_usb_probe",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/usb.c=1014=static int ath10k_usb_napi_poll(struct napi_struct *ctx, int budget)\n--\ndrivers/net/wireless/ath/ath10k/usb.c-1028-/* ath10k usb driver registered functions */\ndrivers/net/wireless/ath/ath10k/usb.c:1029:static int ath10k_usb_probe(struct usb_interface *interface,\ndrivers/net/wireless/ath/ath10k/usb.c-1030-\t\t\t    const struct usb_device_id *id)\n--\ndrivers/net/wireless/ath/ath10k/usb.c=1163=static struct usb_driver ath10k_usb_driver = {\ndrivers/net/wireless/ath/ath10k/usb.c-1164-\t.name = \"ath10k_usb\",\ndrivers/net/wireless/ath/ath10k/usb.c:1165:\t.probe = ath10k_usb_probe,\ndrivers/net/wireless/ath/ath10k/usb.c-1166-\t.suspend = ath10k_usb_pm_suspend,\n"
}

5/2 2026/11/18 12:48 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 11498
							output: 45
							thoughts: 33
						

Thoughts:
Here's my analysis of the provided thought process, tailored for an expert audience:

**Diving into the Atheros USB Driver**

Okay, so the thought process begins, and my brain immediately zeroes in on a very specific area: `drivers/net/wireless/ath/ath10k/usb.c`, specifically around the `ath10k_usb_probe` function. That instantly tells me we're dealing with the Atheros (now Qualcomm Atheros) wireless driver stack, version 10k, for devices connected via USB. The `probe` function is, of course, the initial entry point, the first place the kernel hits when a compatible USB device is plugged in. This likely represents an interest in troubleshooting a USB-connected ath10k device, perhaps debugging a connection issue, analyzing driver behavior during initialization, or maybe even preparing to patch or modify this specific part of the code. The precision of targeting `ath10k_usb_probe` strongly suggests this isn't a casual exploration; there's a particular problem or aspect of this driver under investigation. I'm keen to see what the next thought is!



6/2 2026/11/18 12:49 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/usb.c",
  "FirstLine": 1025,
  "LineCount": 60
}

Results:
{
  "Contents": "1025:\t\treturn done;\n1026:\t}\n1027:\t\n1028:\t/* ath10k usb driver registered functions */\n1029:\tstatic int ath10k_usb_probe(struct usb_interface *interface,\n1030:\t\t\t\t    const struct usb_device_id *id)\n1031:\t{\n1032:\t\tstruct ath10k *ar;\n1033:\t\tstruct ath10k_usb *ar_usb;\n1034:\t\tstruct usb_device *dev = interface_to_usbdev(interface);\n1035:\t\tint ret, vendor_id, product_id;\n1036:\t\tenum ath10k_hw_rev hw_rev;\n1037:\t\tstruct ath10k_bus_params bus_params = {};\n1038:\t\n1039:\t\t/* Assumption: All USB based chipsets (so far) are QCA9377 based.\n1040:\t\t * If there will be newer chipsets that does not use the hw reg\n1041:\t\t * setup as defined in qca6174_regs and qca6174_values, this\n1042:\t\t * assumption is no longer valid and hw_rev must be setup differently\n1043:\t\t * depending on chipset.\n1044:\t\t */\n1045:\t\thw_rev = ATH10K_HW_QCA9377;\n1046:\t\n1047:\t\tar = ath10k_core_create(sizeof(*ar_usb), \u0026dev-\u003edev, ATH10K_BUS_USB,\n1048:\t\t\t\t\thw_rev, \u0026ath10k_usb_hif_ops);\n1049:\t\tif (!ar) {\n1050:\t\t\tdev_err(\u0026dev-\u003edev, \"failed to allocate core\\n\");\n1051:\t\t\treturn -ENOMEM;\n1052:\t\t}\n1053:\t\n1054:\t\tnetif_napi_add(ar-\u003enapi_dev, \u0026ar-\u003enapi, ath10k_usb_napi_poll);\n1055:\t\n1056:\t\tvendor_id = le16_to_cpu(dev-\u003edescriptor.idVendor);\n1057:\t\tproduct_id = le16_to_cpu(dev-\u003edescriptor.idProduct);\n1058:\t\n1059:\t\tath10k_dbg(ar, ATH10K_DBG_BOOT,\n1060:\t\t\t   \"usb new func vendor 0x%04x product 0x%04x\\n\",\n1061:\t\t\t   vendor_id, product_id);\n1062:\t\n1063:\t\tar_usb = ath10k_usb_priv(ar);\n1064:\t\tret = ath10k_usb_create(ar, interface);\n1065:\t\tif (ret)\n1066:\t\t\tgoto err;\n1067:\t\tar_usb-\u003ear = ar;\n1068:\t\n1069:\t\tar-\u003edev_id = product_id;\n1070:\t\tar-\u003eid.vendor = vendor_id;\n1071:\t\tar-\u003eid.device = product_id;\n1072:\t\n1073:\t\tbus_params.dev_type = ATH10K_DEV_TYPE_HL;\n1074:\t\t/* TODO: don't know yet how to get chip_id with USB */\n1075:\t\tbus_params.chip_id = 0;\n1076:\t\tbus_params.hl_msdu_ids = true;\n1077:\t\tbus_params.start_once = true;\n1078:\t\tret = ath10k_core_register(ar, \u0026bus_params);\n1079:\t\tif (ret) {\n1080:\t\t\tath10k_warn(ar, \"failed to register driver core: %d\\n\", ret);\n1081:\t\t\tgoto err_usb_destroy;\n1082:\t\t}\n1083:\t\n1084:\t\treturn 0;\n"
}

7/2 2026/11/18 12:49 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 12867
							output: 43
							thoughts: 35
						

Thoughts:
Okay, let's dive into this. Here's my thought process as I approach understanding `ath10k_core_register` in `drivers/net/wireless/ath/ath10k/core.c`:

**Initial Exploration of ath10k_core_register**

Alright, so the first step is always to understand the purpose of this function, `ath10k_core_register`. Given the naming, it's pretty clear it's some sort of registration function within the ath10k driver's core component. My experience tells me registration functions are typically responsible for setting up and making the various parts of the driver available to the kernel, managing initialization, and maybe even integrating with the overall network stack. Specifically, since it's `ath10k`, I expect this to be about initializing or linking the core driver components to the specific hardware. I want to see how this function might interact with the other parts of the ath10k system. Does it register something with the mac80211 layer? Does it set up the communication with the firmware? What devices is it making available to the kernel?



8/2 2026/11/18 12:49 tool grepper
0m Args:
{
  "Expression": "int ath10k_core_register",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/core.c=3573=static void ath10k_core_register_work(struct work_struct *work)\n--\ndrivers/net/wireless/ath/ath10k/core.c-3647-\ndrivers/net/wireless/ath/ath10k/core.c:3648:int ath10k_core_register(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/core.c-3649-\t\t\t const struct ath10k_bus_params *bus_params)\n--\ndrivers/net/wireless/ath/ath10k/core.h=1364=void ath10k_core_start_recovery(struct ath10k *ar);\ndrivers/net/wireless/ath/ath10k/core.h:1365:int ath10k_core_register(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/core.h-1366-\t\t\t const struct ath10k_bus_params *bus_params);\n"
}

9/2 2026/11/18 12:49 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 13472
							output: 45
							thoughts: 34
						

Thoughts:
Here's a summary of my mental walkthrough, tailored for an expert like yourself:

**Diving into ath10k's Core Functionality**

Okay, let's zero in on `drivers/net/wireless/ath/ath10k/core.c`, specifically the section around lines 3570 to 3660. My internal roadmap guides me to examine that section closely. I expect this code likely deals with some core operational aspect. Given the context (core.c within the ath10k driver), I'm betting we're in the heart of how the driver interacts with the hardware. Perhaps there is a vital function here to initialize the ath10k hardware, or a critical link between the core driver and specific features or commands the hardware needs to receive. This could include, but isn't limited to: device initialization, power management sequencing, interrupt handling, or command/response processing related to a basic functionality. I'm prepared to evaluate the code for concurrency issues, race conditions, memory management pitfalls, and potential performance bottlenecks, knowing what I'm looking for. Let's see what interesting tidbits and gotchas are in there.



10/2 2026/11/18 12:50 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/core.c",
  "FirstLine": 3570,
  "LineCount": 85
}

Results:
{
  "Contents": "3570:\t\treturn ret;\n3571:\t}\n3572:\t\n3573:\tstatic void ath10k_core_register_work(struct work_struct *work)\n3574:\t{\n3575:\t\tstruct ath10k *ar = container_of(work, struct ath10k, register_work);\n3576:\t\tint status;\n3577:\t\n3578:\t\t/* peer stats are enabled by default */\n3579:\t\tset_bit(ATH10K_FLAG_PEER_STATS, \u0026ar-\u003edev_flags);\n3580:\t\n3581:\t\tstatus = ath10k_core_probe_fw(ar);\n3582:\t\tif (status) {\n3583:\t\t\tath10k_err(ar, \"could not probe fw (%d)\\n\", status);\n3584:\t\t\tgoto err;\n3585:\t\t}\n3586:\t\n3587:\t\tstatus = ath10k_mac_register(ar);\n3588:\t\tif (status) {\n3589:\t\t\tath10k_err(ar, \"could not register to mac80211 (%d)\\n\", status);\n3590:\t\t\tgoto err_release_fw;\n3591:\t\t}\n3592:\t\n3593:\t\tstatus = ath10k_coredump_register(ar);\n3594:\t\tif (status) {\n3595:\t\t\tath10k_err(ar, \"unable to register coredump\\n\");\n3596:\t\t\tgoto err_unregister_mac;\n3597:\t\t}\n3598:\t\n3599:\t\tstatus = ath10k_debug_register(ar);\n3600:\t\tif (status) {\n3601:\t\t\tath10k_err(ar, \"unable to initialize debugfs\\n\");\n3602:\t\t\tgoto err_unregister_coredump;\n3603:\t\t}\n3604:\t\n3605:\t\tstatus = ath10k_spectral_create(ar);\n3606:\t\tif (status) {\n3607:\t\t\tath10k_err(ar, \"failed to initialize spectral\\n\");\n3608:\t\t\tgoto err_debug_destroy;\n3609:\t\t}\n3610:\t\n3611:\t\tstatus = ath10k_thermal_register(ar);\n3612:\t\tif (status) {\n3613:\t\t\tath10k_err(ar, \"could not register thermal device: %d\\n\",\n3614:\t\t\t\t   status);\n3615:\t\t\tgoto err_spectral_destroy;\n3616:\t\t}\n3617:\t\n3618:\t\tstatus = ath10k_leds_register(ar);\n3619:\t\tif (status) {\n3620:\t\t\tath10k_err(ar, \"could not register leds: %d\\n\",\n3621:\t\t\t\t   status);\n3622:\t\t\tgoto err_thermal_unregister;\n3623:\t\t}\n3624:\t\n3625:\t\tset_bit(ATH10K_FLAG_CORE_REGISTERED, \u0026ar-\u003edev_flags);\n3626:\t\treturn;\n3627:\t\n3628:\terr_thermal_unregister:\n3629:\t\tath10k_thermal_unregister(ar);\n3630:\terr_spectral_destroy:\n3631:\t\tath10k_spectral_destroy(ar);\n3632:\terr_debug_destroy:\n3633:\t\tath10k_debug_destroy(ar);\n3634:\terr_unregister_coredump:\n3635:\t\tath10k_coredump_unregister(ar);\n3636:\terr_unregister_mac:\n3637:\t\tath10k_mac_unregister(ar);\n3638:\terr_release_fw:\n3639:\t\tath10k_core_stop_once(ar);\n3640:\t\tath10k_core_free_firmware_files(ar);\n3641:\terr:\n3642:\t\t/* TODO: It's probably a good idea to release device from the driver\n3643:\t\t * but calling device_release_driver() here will cause a deadlock.\n3644:\t\t */\n3645:\t\treturn;\n3646:\t}\n3647:\t\n3648:\tint ath10k_core_register(struct ath10k *ar,\n3649:\t\t\t\t const struct ath10k_bus_params *bus_params)\n3650:\t{\n3651:\t\tar-\u003ebus_param = *bus_params;\n3652:\t\n3653:\t\tqueue_work(ar-\u003eworkqueue, \u0026ar-\u003eregister_work);\n3654:\t\n"
}

11/2 2026/11/18 12:50 llm patch-evaluator
1m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 15068
							output: 45
							thoughts: 94
						

Thoughts:
Here's my breakdown of what's happening, keeping in mind my expertise:

**Diving into the ath10k Driver Registration Process**

Okay, so the `ath10k_core_register` function is the initial trigger, and I see it schedules a work item – `register_work`. That's standard practice, a deferred execution approach. Now, that `register_work` calls `ath10k_core_register_work`, which is where the real interesting stuff begins. My primary concern here is how the driver finds and loads the firmware.

Specifically, inside `ath10k_core_register_work`, the critical call is `ath10k_core_probe_fw(ar)`. This is where the core of firmware interaction must be happening.  My assumption is this is where the device searches for and probes the firmware. I'm going to jump straight to the source and examine around lines 3470-3560 of the `ath10k_core_probe_fw` function. This should give me the details on how the driver handles firmware detection, loading and any error handling in this critical phase. That is where I expect the meat of the firmware handling lies.



12/2 2026/11/18 12:51 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/core.c",
  "FirstLine": 3470,
  "LineCount": 85
}

Results:
{
  "Contents": "3470:\t\tif (ret) {\n3471:\t\t\tath10k_err(ar, \"could not fetch firmware files (%d)\\n\", ret);\n3472:\t\t\tgoto err_power_down;\n3473:\t\t}\n3474:\t\n3475:\t\tBUILD_BUG_ON(sizeof(ar-\u003ehw-\u003ewiphy-\u003efw_version) !=\n3476:\t\t\t     sizeof(ar-\u003enormal_mode_fw.fw_file.fw_version));\n3477:\t\tmemcpy(ar-\u003ehw-\u003ewiphy-\u003efw_version, ar-\u003enormal_mode_fw.fw_file.fw_version,\n3478:\t\t       sizeof(ar-\u003ehw-\u003ewiphy-\u003efw_version));\n3479:\t\n3480:\t\tath10k_debug_print_hwfw_info(ar);\n3481:\t\n3482:\t\tif (!test_bit(ATH10K_FW_FEATURE_NON_BMI,\n3483:\t\t\t      ar-\u003enormal_mode_fw.fw_file.fw_features)) {\n3484:\t\t\tret = ath10k_core_pre_cal_download(ar);\n3485:\t\t\tif (ret) {\n3486:\t\t\t\t/* pre calibration data download is not necessary\n3487:\t\t\t\t * for all the chipsets. Ignore failures and continue.\n3488:\t\t\t\t */\n3489:\t\t\t\tath10k_dbg(ar, ATH10K_DBG_BOOT,\n3490:\t\t\t\t\t   \"could not load pre cal data: %d\\n\", ret);\n3491:\t\t\t}\n3492:\t\n3493:\t\t\tret = ath10k_core_get_board_id_from_otp(ar);\n3494:\t\t\tif (ret \u0026\u0026 ret != -EOPNOTSUPP) {\n3495:\t\t\t\tath10k_err(ar, \"failed to get board id from otp: %d\\n\",\n3496:\t\t\t\t\t   ret);\n3497:\t\t\t\tgoto err_free_firmware_files;\n3498:\t\t\t}\n3499:\t\n3500:\t\t\tret = ath10k_core_check_smbios(ar);\n3501:\t\t\tif (ret)\n3502:\t\t\t\tath10k_dbg(ar, ATH10K_DBG_BOOT, \"SMBIOS bdf variant name not set.\\n\");\n3503:\t\n3504:\t\t\tret = ath10k_core_check_dt(ar);\n3505:\t\t\tif (ret)\n3506:\t\t\t\tath10k_dbg(ar, ATH10K_DBG_BOOT, \"DT bdf variant name not set.\\n\");\n3507:\t\n3508:\t\t\tret = ath10k_core_fetch_board_file(ar, ATH10K_BD_IE_BOARD);\n3509:\t\t\tif (ret) {\n3510:\t\t\t\tath10k_err(ar, \"failed to fetch board file: %d\\n\", ret);\n3511:\t\t\t\tgoto err_free_firmware_files;\n3512:\t\t\t}\n3513:\t\n3514:\t\t\tath10k_debug_print_board_info(ar);\n3515:\t\t}\n3516:\t\n3517:\t\tdevice_get_mac_address(ar-\u003edev, ar-\u003emac_addr);\n3518:\t\n3519:\t\tret = ath10k_core_init_firmware_features(ar);\n3520:\t\tif (ret) {\n3521:\t\t\tath10k_err(ar, \"fatal problem with firmware features: %d\\n\",\n3522:\t\t\t\t   ret);\n3523:\t\t\tgoto err_free_firmware_files;\n3524:\t\t}\n3525:\t\n3526:\t\tif (!test_bit(ATH10K_FW_FEATURE_NON_BMI,\n3527:\t\t\t      ar-\u003enormal_mode_fw.fw_file.fw_features)) {\n3528:\t\t\tret = ath10k_swap_code_seg_init(ar,\n3529:\t\t\t\t\t\t\t\u0026ar-\u003enormal_mode_fw.fw_file);\n3530:\t\t\tif (ret) {\n3531:\t\t\t\tath10k_err(ar, \"failed to initialize code swap segment: %d\\n\",\n3532:\t\t\t\t\t   ret);\n3533:\t\t\t\tgoto err_free_firmware_files;\n3534:\t\t\t}\n3535:\t\t}\n3536:\t\n3537:\t\tmutex_lock(\u0026ar-\u003econf_mutex);\n3538:\t\n3539:\t\tret = ath10k_core_start(ar, ATH10K_FIRMWARE_MODE_NORMAL,\n3540:\t\t\t\t\t\u0026ar-\u003enormal_mode_fw);\n3541:\t\tif (ret) {\n3542:\t\t\tath10k_err(ar, \"could not init core (%d)\\n\", ret);\n3543:\t\t\tgoto err_unlock;\n3544:\t\t}\n3545:\t\n3546:\t\tath10k_debug_print_boot_info(ar);\n3547:\t\n3548:\t\t/* keep the firmware running if it cannot be started a second time */\n3549:\t\tif (ar-\u003ebus_param.start_once) {\n3550:\t\t\tmutex_unlock(\u0026ar-\u003econf_mutex);\n3551:\t\t\treturn 0;\n3552:\t\t}\n3553:\t\n3554:\t\tath10k_core_stop(ar);\n"
}

13/2 2026/11/18 12:51 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 16908
							output: 42
							thoughts: 690
						

Thoughts:
**Analyzing the ath10k Firmware Lifecycle and USB Interaction**

Okay, so I'm digging into how the ath10k driver handles firmware loading, unloading, and potential restarts, and I'm seeing a clear pattern emerging around this `start_once` flag in `ath10k_core_probe_fw`. That flag seems to be the key to whether the firmware persists after initial loading. If it's set to true, the firmware is essentially locked in and won't be stopped.

Now, looking at `ath10k_core_stop_once`, that function is called when a core registration fails or when the core is unregistered. This hints at a control flow that’s contingent on whether that firmware is configured to start only once or can be restarted. Digging deeper into `ath10k_mac.c` really illuminates the picture. Functions like `ath10k_halt` and `ath10k_start` explicitly check `!ar->bus_param.start_once` before calling `ath10k_core_stop`, which means the firmware is *not* stopped if `start_once` is true. `ath10k_core_restart` even flags a warning if the firmware is 'start once', which is a pretty clear indicator that it's meant to be a permanent state. This is starting to look like a potential area for interesting interaction.

`ath10k_core_start` further reinforces this. If `start_once` is set and the firmware isn't in an 'off' state, the function bails out. Similarly, `ath10k_tm_cmd_utf_start` throws an error if `start_once` is true, indicating the firmware cannot be replaced in that situation.

Okay, let's circle back to USB, because something is nagging me. The presence of `ath10k_usb_shutdown` is intriguing, especially with the mention of USB firmware not sending HTT security indications in `ath10k_wmi_event_vdev_install_key_complete`. The fact that there's specific handling for USB indicates a different control path. The call to `complete(&ar->install_key_done)` for USB devices during key install is also noteworthy.

I'm starting to wonder if a USB device could potentially trigger an interesting state in this driver, perhaps via a `syzkaller` probe. I'm going to quickly check what happens during the USB probe, specifically looking at `ath10k_usb_create` in `usb.c` to see if there's any nuance to how USB devices are initialized, because that could be the key to exploit the `start_once` flag.



14/2 2026/11/18 12:52 tool grepper
0m Args:
{
  "Expression": "ath10k_usb_create",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/usb.c=860=static int ath10k_usb_setup_pipe_resources(struct ath10k *ar,\n--\ndrivers/net/wireless/ath/ath10k/usb.c-969-\ndrivers/net/wireless/ath/ath10k/usb.c:970:static int ath10k_usb_create(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/usb.c-971-\t\t\t     struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath10k/usb.c=1029=static int ath10k_usb_probe(struct usb_interface *interface,\n--\ndrivers/net/wireless/ath/ath10k/usb.c-1063-\tar_usb = ath10k_usb_priv(ar);\ndrivers/net/wireless/ath/ath10k/usb.c:1064:\tret = ath10k_usb_create(ar, interface);\ndrivers/net/wireless/ath/ath10k/usb.c-1065-\tif (ret)\n"
}

15/2 2026/11/18 12:52 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 18525
							output: 44
							thoughts: 21
						

Thoughts:
Okay, let's dive into this. Here's my take on those lines of code, specifically around `ath10k_usb_create` near line 970.

**Diving into ath10k_usb_create**

Alright, so I'm thinking about the process of bringing up a new ath10k USB device and I'm homing in on where the core device initialization happens. I figure `ath10k_usb_create` is a pretty good place to start, probably setting up a lot of the initial hardware state and USB communication pathways. I'm imagining it's taking a USB device descriptor as input, and probably doing all the necessary setup to prepare the device driver for communicating with the ath10k chipset. I'm expecting this is where things like allocating resources, establishing endpoints, and possibly even some initial hardware probing or reset sequences would be handled. Knowing ath10k's architecture, I anticipate it will also set up the control and data transfers that form the backbone of getting data flowing from the device. There’s a good chance this is where the initial firmware loading sequence is triggered, or at least prepared for. Need to check for error codes, of course, and handle the unexpected situations... Gotta make sure everything is clean and ready. So, I need to get down into that code and really see how they are setting the stage for everything else.



16/2 2026/11/18 12:53 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/usb.c",
  "FirstLine": 970,
  "LineCount": 45
}

Results:
{
  "Contents": " 970:\tstatic int ath10k_usb_create(struct ath10k *ar,\n 971:\t\t\t\t     struct usb_interface *interface)\n 972:\t{\n 973:\t\tstruct ath10k_usb *ar_usb = ath10k_usb_priv(ar);\n 974:\t\tstruct usb_device *dev = interface_to_usbdev(interface);\n 975:\t\tstruct ath10k_usb_pipe *pipe;\n 976:\t\tint ret, i;\n 977:\t\n 978:\t\tusb_set_intfdata(interface, ar_usb);\n 979:\t\tspin_lock_init(\u0026ar_usb-\u003ecs_lock);\n 980:\t\tar_usb-\u003eudev = dev;\n 981:\t\tar_usb-\u003einterface = interface;\n 982:\t\n 983:\t\tfor (i = 0; i \u003c ATH10K_USB_PIPE_MAX; i++) {\n 984:\t\t\tpipe = \u0026ar_usb-\u003epipes[i];\n 985:\t\t\tINIT_WORK(\u0026pipe-\u003eio_complete_work,\n 986:\t\t\t\t  ath10k_usb_io_comp_work);\n 987:\t\t\tskb_queue_head_init(\u0026pipe-\u003eio_comp_queue);\n 988:\t\t}\n 989:\t\n 990:\t\tar_usb-\u003ediag_cmd_buffer = kzalloc(ATH10K_USB_MAX_DIAG_CMD, GFP_KERNEL);\n 991:\t\tif (!ar_usb-\u003ediag_cmd_buffer) {\n 992:\t\t\tret = -ENOMEM;\n 993:\t\t\tgoto err;\n 994:\t\t}\n 995:\t\n 996:\t\tar_usb-\u003ediag_resp_buffer = kzalloc(ATH10K_USB_MAX_DIAG_RESP,\n 997:\t\t\t\t\t\t   GFP_KERNEL);\n 998:\t\tif (!ar_usb-\u003ediag_resp_buffer) {\n 999:\t\t\tret = -ENOMEM;\n1000:\t\t\tgoto err;\n1001:\t\t}\n1002:\t\n1003:\t\tret = ath10k_usb_setup_pipe_resources(ar, interface);\n1004:\t\tif (ret)\n1005:\t\t\tgoto err;\n1006:\t\n1007:\t\treturn 0;\n1008:\t\n1009:\terr:\n1010:\t\tath10k_usb_destroy(ar);\n1011:\t\treturn ret;\n1012:\t}\n1013:\t\n1014:\tstatic int ath10k_usb_napi_poll(struct napi_struct *ctx, int budget)\n"
}

17/2 2026/11/18 12:53 llm patch-evaluator
1m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 19601
							output: 46
							thoughts: 707
						

Thoughts:
**Analyzing the ath10k USB Driver's Lifecycle for Potential Vulnerabilities**

Okay, let's break down the `ath10k` USB driver's probe and disconnect flow. My focus is on potential flaws, especially given the power of tools like syzkaller.

During the probe (`ath10k_usb_probe`), I see the following sequence: core creation, USB-specific setup, and then core registration which schedules a work item. The `ath10k_usb_hif_power_down` function piques my interest immediately. It performs a flush and resets the target, which is typical for power management but always a place to scrutinize closely.

Now, what happens if things go wrong during probe, or if a disconnect occurs? The `ath10k_usb_disconnect` function provides the answer. It unregisters the core, tears down USB-specific structures, and finally destroys the core. The unregistration involves stopping the core and freeing firmware files. The core stop routine contains a mutex lock and a subsequent call to `ath10k_hif_power_down`, which, as we saw earlier, calls `ath10k_usb_reset_target(ar, true)`.

The crucial question is whether USB gadget emulation can trigger this entire power-down sequence and, more importantly, whether there are race conditions or other issues in the interactions. Syzkaller is a fantastic tool for this. It has a robust USB emulation engine via `sys_raw_gadget` and `/dev/raw-gadget`. It can create, interact with, and disconnect USB devices. This includes sending packets, triggering network device syscalls, nl80211, mac80211 operations, and testmode commands. This comprehensive coverage makes it a prime candidate for finding subtle bugs.

The next thing I'm looking at is if the nl80211 or testmode functionality can reach `ath10k_tm_cmd_utf_start`. My immediate thought is to check what calls this function. A quick `grep` will be needed.



18/2 2026/11/18 12:54 tool grepper
0m Args:
{
  "Expression": "ath10k_tm_cmd_utf_start",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/testmode.c=283=static int ath10k_tm_fetch_firmware(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/testmode.c-335-\ndrivers/net/wireless/ath/ath10k/testmode.c:336:static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[])\ndrivers/net/wireless/ath/ath10k/testmode.c-337-{\n--\ndrivers/net/wireless/ath/ath10k/testmode.c=635=int ath10k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/ath/ath10k/testmode.c-658-\tcase ATH10K_TM_CMD_UTF_START:\ndrivers/net/wireless/ath/ath10k/testmode.c:659:\t\treturn ath10k_tm_cmd_utf_start(ar, tb);\ndrivers/net/wireless/ath/ath10k/testmode.c-660-\tcase ATH10K_TM_CMD_UTF_STOP:\n"
}

19/2 2026/11/18 12:54 llm patch-evaluator
1m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 21138
							output: 42
							thoughts: 274
						

Thoughts:
**My Analysis of the ath10k Testmode and Interface Lifecycle**

Okay, so `ath10k_tm_cmd` is directly hooked into the `nl80211` testmode command, `NL80211_CMD_TESTMODE`. That means userspace can initiate things via `NL80211_CMD_TESTMODE` and, specifically, the `ATH10K_TM_CMD_UTF_START` command. That's good to know, but I need to understand the full picture. I'm wondering how this interacts with the standard network interface start and stop operations, handled through mac80211.

When an interface is brought up, either using the old `SIOCSIFFLAGS` method or the newer netlink mechanisms like `RTM_SETLINK` or `NL80211_CMD_START_AP`, mac80211 calls `ath10k_start`. That, in turn, calls `ath10k_core_start` and so on. Similarly, when the interface goes down, mac80211 calls `ath10k_halt`, which leads to `ath10k_core_stop`. I need to remember that `ath10k_start` and `ath10k_halt` also check the `ar->bus_param.start_once` flag. That's a key detail to watch for.

Now, what about firmware crashes or restarts? These are important to consider. I know `ath10k_core_restart` handles those scenarios, but I need to figure out the exact triggers for this function. Let's see what calls into it, to get a complete understanding of the system behavior.



20/2 2026/11/18 12:56 tool grepper
0m Args:
{
  "Expression": "ath10k_core_restart",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/core.c=2606=EXPORT_SYMBOL(ath10k_core_napi_sync_disable);\ndrivers/net/wireless/ath/ath10k/core.c-2607-\ndrivers/net/wireless/ath/ath10k/core.c:2608:static void ath10k_core_restart(struct work_struct *work)\ndrivers/net/wireless/ath/ath10k/core.c-2609-{\n--\ndrivers/net/wireless/ath/ath10k/core.c=3692=struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,\n--\ndrivers/net/wireless/ath/ath10k/core.c-3803-\tINIT_WORK(\u0026ar-\u003eregister_work, ath10k_core_register_work);\ndrivers/net/wireless/ath/ath10k/core.c:3804:\tINIT_WORK(\u0026ar-\u003erestart_work, ath10k_core_restart);\ndrivers/net/wireless/ath/ath10k/core.c-3805-\tINIT_WORK(\u0026ar-\u003erecovery_check_work, ath10k_core_recovery_check_work);\n--\ndrivers/net/wireless/ath/ath10k/core.h=707=enum ath10k_state {\n--\ndrivers/net/wireless/ath/ath10k/core.h-714-\t * mac80211 can wait on conf_mutex in stop() while the device is\ndrivers/net/wireless/ath/ath10k/core.h:715:\t * stopped in ath10k_core_restart() work holding conf_mutex. The state\ndrivers/net/wireless/ath/ath10k/core.h-716-\t * RESTARTED means that the device is up and mac80211 has started hw\n--\ndrivers/net/wireless/ath/ath10k/mac.c=5403=static void ath10k_stop(struct ieee80211_hw *hw, bool suspend)\n--\ndrivers/net/wireless/ath/ath10k/mac.c-5415-\t\t\t * then ath10k_halt() is already called via\ndrivers/net/wireless/ath/ath10k/mac.c:5416:\t\t\t * ath10k_core_restart() and should not be called here.\ndrivers/net/wireless/ath/ath10k/mac.c-5417-\t\t\t */\n"
}

21/2 2026/11/18 12:56 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 22478
							output: 37
							thoughts: 13
						

Thoughts:
Here's a summary of my thought process:

**Investigating the `restart_work` Queue Time**

Okay, so I need to figure out precisely *when* the `restart_work` operation is being added to the queue. I'm going to start by tracing the calls, looking for the code that actually schedules or enqueues this function or task. I'll need to use debugging tools, or possibly delve into the logging if I'm trying to track down a more specific or historical time. This requires understanding the system's architecture and message queueing system, so I'll need to be aware of what I'm looking for given the queue type. The goal is pinpointing the *trigger*, which will provide valuable insights into the overall workflow. From there, I'll analyse the preceding steps to fully determine the context.



22/2 2026/11/18 12:56 tool grepper
0m Args:
{
  "Expression": "restart_work",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/core.c=2536=static void ath10k_core_recovery_check_work(struct work_struct *work)\n--\ndrivers/net/wireless/ath/ath10k/core.c-2572-\tatomic_inc(\u0026ar-\u003epending_recovery);\ndrivers/net/wireless/ath/ath10k/core.c:2573:\tqueue_work(ar-\u003eworkqueue, \u0026ar-\u003erestart_work);\ndrivers/net/wireless/ath/ath10k/core.c-2574-}\n--\ndrivers/net/wireless/ath/ath10k/core.c=2608=static void ath10k_core_restart(struct work_struct *work)\ndrivers/net/wireless/ath/ath10k/core.c-2609-{\ndrivers/net/wireless/ath/ath10k/core.c:2610:\tstruct ath10k *ar = container_of(work, struct ath10k, restart_work);\ndrivers/net/wireless/ath/ath10k/core.c-2611-\tint ret;\n--\ndrivers/net/wireless/ath/ath10k/core.c=3692=struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,\n--\ndrivers/net/wireless/ath/ath10k/core.c-3803-\tINIT_WORK(\u0026ar-\u003eregister_work, ath10k_core_register_work);\ndrivers/net/wireless/ath/ath10k/core.c:3804:\tINIT_WORK(\u0026ar-\u003erestart_work, ath10k_core_restart);\ndrivers/net/wireless/ath/ath10k/core.c-3805-\tINIT_WORK(\u0026ar-\u003erecovery_check_work, ath10k_core_recovery_check_work);\n--\ndrivers/net/wireless/ath/ath10k/core.h=1016=struct ath10k {\n--\ndrivers/net/wireless/ath/ath10k/core.h-1213-\tstruct work_struct register_work;\ndrivers/net/wireless/ath/ath10k/core.h:1214:\tstruct work_struct restart_work;\ndrivers/net/wireless/ath/ath10k/core.h-1215-\tstruct work_struct recovery_check_work;\n--\ndrivers/net/wireless/ath/ath10k/mac.c=5403=static void ath10k_stop(struct ieee80211_hw *hw, bool suspend)\n--\ndrivers/net/wireless/ath/ath10k/mac.c-5434-\tcancel_delayed_work_sync(\u0026ar-\u003escan.timeout);\ndrivers/net/wireless/ath/ath10k/mac.c:5435:\tcancel_work_sync(\u0026ar-\u003erestart_work);\ndrivers/net/wireless/ath/ath10k/mac.c-5436-\tcancel_work_sync(\u0026ar-\u003erecovery_check_work);\n"
}

23/2 2026/11/18 12:56 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 23488
							output: 45
							thoughts: 1919
						

Thoughts:
**Fuzzing Analysis: Ath10k USB Driver Recovery**

Okay, so I need to assess whether this patch modifying the ath10k USB driver is suitable for fuzzing. I see `queue_work` calls in `ath10k_core_start_recovery`, which indicates some kind of recovery mechanism. The first question is always reachability: Can this driver be fuzzed in standard virtualized environments? Thankfully, yes, USB gadget emulation is well-supported in QEMU and syzkaller.

Now, the crucial step: `WorthFuzzing=true`? Absolutely. This patch is touching reachable code because it's a USB driver, accessible via USB gadget. The changes involve driver state management, including `start_once`, `ATH10K_STATE_WEDGED`, firmware flow, reset handling, and core wireless/mac80211 interactions. It adds a USB device ID, touches `ath10k_halt`, `ath10k_start`, and handles WMI events. So, definitely `WorthFuzzing=true`.

Now, the important part: defining `FocusSymbols` to guide the fuzzer. I need to avoid ubiquitous lifecycle functions and instead focus on entrypoints and the specific logic altered by this patch.

I've got a list of the modified functions: `ath10k_core_restart`, `ath10k_core_start`, `ath10k_core_stop`, `ath10k_core_stop_once`, `ath10k_core_probe_fw`, `ath10k_core_register_work`, `ath10k_core_unregister`, `ath10k_halt`, `ath10k_start`, `ath10k_tm_cmd_utf_start` (or `ath10k_tm_cmd`), `ath10k_usb_reset_target`, `ath10k_usb_hif_power_down`, `ath10k_usb_probe`, `ath10k_wmi_event_vdev_install_key_complete`, and `ath10k_usb_shutdown`.

I also have to verify if `ath10k_usb_shutdown` is reachable during fuzzing, since shutdown callbacks can be tricky, but from the analysis of the code, that seems to not be the primary call chain, and `ath10k_usb_hif_power_down` *is* reached through `ath10k_halt`, `ath10k_core_restart` and `ath10k_core_stop_once`.

So, from my analysis I have to determine:
1.  Are there any static inline functions that can't be targeted? No, these are static functions in .c files, and can be targeted, unless small.
2.  Are the functions reachable? It looks like those related to shutdown are indirectly reached.
3.  Are these functions specific to this feature? Yes, most seem to be.



24/2 2026/11/18 12:57 tool grepper
0m Args:
{
  "Expression": "ath10k_usb_hif_ops",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/usb.c=759=static int ath10k_usb_hif_resume(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/usb.c-764-\ndrivers/net/wireless/ath/ath10k/usb.c:765:static const struct ath10k_hif_ops ath10k_usb_hif_ops = {\ndrivers/net/wireless/ath/ath10k/usb.c-766-\t.tx_sg\t\t\t= ath10k_usb_hif_tx_sg,\n--\ndrivers/net/wireless/ath/ath10k/usb.c=1029=static int ath10k_usb_probe(struct usb_interface *interface,\n--\ndrivers/net/wireless/ath/ath10k/usb.c-1047-\tar = ath10k_core_create(sizeof(*ar_usb), \u0026dev-\u003edev, ATH10K_BUS_USB,\ndrivers/net/wireless/ath/ath10k/usb.c:1048:\t\t\t\thw_rev, \u0026ath10k_usb_hif_ops);\ndrivers/net/wireless/ath/ath10k/usb.c-1049-\tif (!ar) {\n"
}

25/2 2026/11/18 12:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 26447
							output: 44
							thoughts: 23
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Diving into the ath10k USB HIF Operations**

Alright, let's get down to brass tacks. I need to refresh my memory on the specifics of the `ath10k_usb_hif_ops` structure. My instincts tell me it's defined within `usb.c`, but a quick confirmation is always the best approach. I need to understand exactly how the Host Interface (HIF) operations are structured for the USB variant of the ath10k driver. Specifically, I'm thinking about how the driver interacts with the USB bus itself – the data transfer mechanisms, interrupt handling, and any specific quirks or optimizations implemented for USB-based ath10k devices. Time to dig in and re-familiarize myself with the relevant function pointers and data structures. It's time to refresh and analyze the HIF function pointers defined within the USB context. I need to ensure there are no surprises with the flow and that I'm clear with the operations being performed. I need to be ready to work with this again.



26/2 2026/11/18 12:57 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/usb.c",
  "FirstLine": 765,
  "LineCount": 25
}

Results:
{
  "Contents": " 765:\tstatic const struct ath10k_hif_ops ath10k_usb_hif_ops = {\n 766:\t\t.tx_sg\t\t\t= ath10k_usb_hif_tx_sg,\n 767:\t\t.diag_read\t\t= ath10k_usb_hif_diag_read,\n 768:\t\t.diag_write\t\t= ath10k_usb_hif_diag_write,\n 769:\t\t.exchange_bmi_msg\t= ath10k_usb_bmi_exchange_msg,\n 770:\t\t.start\t\t\t= ath10k_usb_hif_start,\n 771:\t\t.stop\t\t\t= ath10k_usb_hif_stop,\n 772:\t\t.map_service_to_pipe\t= ath10k_usb_hif_map_service_to_pipe,\n 773:\t\t.get_default_pipe\t= ath10k_usb_hif_get_default_pipe,\n 774:\t\t.get_free_queue_number\t= ath10k_usb_hif_get_free_queue_number,\n 775:\t\t.power_up\t\t= ath10k_usb_hif_power_up,\n 776:\t\t.power_down\t\t= ath10k_usb_hif_power_down,\n 777:\t#ifdef CONFIG_PM\n 778:\t\t.suspend\t\t= ath10k_usb_hif_suspend,\n 779:\t\t.resume\t\t\t= ath10k_usb_hif_resume,\n 780:\t#endif\n 781:\t};\n 782:\t\n 783:\tstatic u8 ath10k_usb_get_logical_pipe_num(u8 ep_address, int *urb_count)\n 784:\t{\n 785:\t\tu8 pipe_num = ATH10K_USB_PIPE_INVALID;\n 786:\t\n 787:\t\tswitch (ep_address) {\n 788:\t\tcase ATH10K_USB_EP_ADDR_APP_CTRL_IN:\n 789:\t\t\tpipe_num = ATH10K_USB_PIPE_RX_CTRL;\n"
}

27/2 2026/11/18 12:57 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 27328
							output: 41
							thoughts: 173
						

Thoughts:
**Analyzing the Power Down Sequence in ath10k USB Driver**

Okay, so I'm digging into this `ath10k` driver code, specifically the power-down sequence. The current implementation uses `power_down`, which, as I see it, boils down to `ath10k_usb_hif_power_down`. That then calls `ath10k_usb_reset_target` with the `true` argument. Got it. Now, `ath10k_hif_power_down` is the key function that's called in several important places: the modified `ath10k_core_restart`, `ath10k_halt` (also modified), an error path within `ath10k_start` (another mod), and crucially, `ath10k_core_stop_once`, which appears to be *new* with this patch. This has implications for the overall driver restart and shutdown behavior which I need to fully understand.

Now, I'm going to shift gears slightly and check the Kconfig dependencies. I need to figure out what configuration options are required to enable `ATH10K_USB` and, more importantly, the specific pieces of code that were modified by this patch. Time to pull up `drivers/net/wireless/ath/ath10k/Kconfig` and cross-reference. I need to make sure this code is built correctly, and these options must be correctly set for the functionality to be enabled.



28/2 2026/11/18 12:58 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/Kconfig",
  "FirstLine": 1,
  "LineCount": 70
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: ISC\n   2:\tconfig ATH10K\n   3:\t\ttristate \"Atheros 802.11ac wireless cards support\"\n   4:\t\tdepends on MAC80211 \u0026\u0026 HAS_DMA\n   5:\t\tselect ATH_COMMON\n   6:\t\tselect CRC32\n   7:\t\tselect WANT_DEV_COREDUMP\n   8:\t\tselect ATH10K_CE\n   9:\t\thelp\n  10:\t\t  This module adds support for wireless adapters based on\n  11:\t\t  Atheros IEEE 802.11ac family of chipsets.\n  12:\t\n  13:\t\t  If you choose to build a module, it'll be called ath10k.\n  14:\t\n  15:\tconfig ATH10K_CE\n  16:\t\tbool\n  17:\t\n  18:\tconfig ATH10K_PCI\n  19:\t\ttristate \"Atheros ath10k PCI support\"\n  20:\t\tdepends on ATH10K \u0026\u0026 PCI\n  21:\t\thelp\n  22:\t\t  This module adds support for PCIE bus\n  23:\t\n  24:\tconfig ATH10K_AHB\n  25:\t\tbool \"Atheros ath10k AHB support\"\n  26:\t\tdepends on ATH10K_PCI \u0026\u0026 OF \u0026\u0026 RESET_CONTROLLER\n  27:\t\thelp\n  28:\t\t  This module adds support for AHB bus\n  29:\t\n  30:\tconfig ATH10K_SDIO\n  31:\t\ttristate \"Atheros ath10k SDIO support\"\n  32:\t\tdepends on ATH10K \u0026\u0026 MMC\n  33:\t\thelp\n  34:\t\t  This module adds support for SDIO/MMC bus.\n  35:\t\n  36:\tconfig ATH10K_USB\n  37:\t\ttristate \"Atheros ath10k USB support\"\n  38:\t\tdepends on ATH10K \u0026\u0026 USB\n  39:\t\thelp\n  40:\t\t  This module adds support for USB bus.\n  41:\t\n  42:\tconfig ATH10K_SNOC\n  43:\t\ttristate \"Qualcomm ath10k SNOC support\"\n  44:\t\tdepends on ATH10K\n  45:\t\tdepends on ARCH_QCOM || COMPILE_TEST\n  46:\t\tdepends on QCOM_SMEM\n  47:\t\tdepends on QCOM_RPROC_COMMON || QCOM_RPROC_COMMON=n\n  48:\t\tselect POWER_SEQUENCING\n  49:\t\tselect QCOM_SCM\n  50:\t\tselect QCOM_QMI_HELPERS\n  51:\t\thelp\n  52:\t\t  This module adds support for integrated WCN3990 chip connected\n  53:\t\t  to system NOC(SNOC).\n  54:\t\n  55:\tconfig ATH10K_DEBUG\n  56:\t\tbool \"Atheros ath10k debugging\"\n  57:\t\tdepends on ATH10K\n  58:\t\thelp\n  59:\t\t  Enables debug support\n  60:\t\n  61:\t\t  If unsure, say Y to make it easier to debug problems.\n  62:\t\n  63:\tconfig ATH10K_DEBUGFS\n  64:\t\tbool \"Atheros ath10k debugfs support\"\n  65:\t\tdepends on ATH10K \u0026\u0026 DEBUG_FS\n  66:\t\thelp\n  67:\t\t  Enabled debugfs support\n  68:\t\n  69:\t\t  If unsure, say Y to make it easier to debug problems.\n  70:\t\n"
}

29/2 2026/11/18 12:58 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 28779
							output: 42
							thoughts: 24
						

Thoughts:
Okay, let's dive into this. Here's my thought process summarized, assuming I'm already well-versed in kernel configuration and networking drivers:

**Analyzing the Kconfig file within ath10k**

Right, let's get into this. I need to take a look at the rest of `drivers/net/wireless/ath/ath10k/Kconfig`. I already know the area this covers, so I am interested in how this is configured. What are the dependencies? Are there new options? Are there any obvious red flags I need to watch out for as I review the driver? Understanding the configuration options is crucial for getting this wireless driver integrated and working correctly within different kernel builds and hardware configurations. Let's see what interesting configurations or options we'll find within that Kconfig file. I'll need to figure out what's enabled, disabled, and what might be the rationale behind each setting. This is the first step toward effective troubleshooting and optimization.



30/2 2026/11/18 12:58 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/Kconfig",
  "FirstLine": 70,
  "LineCount": 40
}

Results:
{
  "Contents": "  70:\t\n  71:\tconfig ATH10K_LEDS\n  72:\t\tbool\n  73:\t\tdepends on ATH10K\n  74:\t\tdepends on LEDS_CLASS=y || LEDS_CLASS=MAC80211\n  75:\t\tdefault y\n  76:\t\n  77:\tconfig ATH10K_SPECTRAL\n  78:\t\tbool \"Atheros ath10k spectral scan support\"\n  79:\t\tdepends on ATH10K_DEBUGFS\n  80:\t\tselect RELAY\n  81:\t\tdefault n\n  82:\t\thelp\n  83:\t\t  Say Y to enable access to the FFT/spectral data via debugfs.\n  84:\t\n  85:\tconfig ATH10K_TRACING\n  86:\t\tbool \"Atheros ath10k tracing support\"\n  87:\t\tdepends on ATH10K\n  88:\t\tdepends on EVENT_TRACING\n  89:\t\thelp\n  90:\t\t  Select this to ath10k use tracing infrastructure.\n  91:\t\n  92:\tconfig ATH10K_DFS_CERTIFIED\n  93:\t\tbool \"Atheros DFS support for certified platforms\"\n  94:\t\tdepends on ATH10K \u0026\u0026 CFG80211_CERTIFICATION_ONUS\n  95:\t\tdefault n\n  96:\t\thelp\n  97:\t\tThis option enables DFS support for initiating radiation on\n  98:\t\tath10k.\n"
}

31/2 2026/11/18 12:58 llm patch-evaluator
1m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 29429
							output: 40
							thoughts: 30
						

Thoughts:
Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person:

**Diving into the Ath10k Build Process**

Right, let's get down to brass tacks. I'm thinking I should start digging into the build process for the ath10k driver. Specifically, I need to understand how the kernel compiles the files within the `drivers/net/wireless/ath/ath10k/` directory. The obvious starting point, as always with any kernel module, is the `Makefile`. That's where all the magic happens – where I should find the dependency definitions, compiler flags, object file generation rules, and ultimately, how those object files get linked into a module. I expect to see all of the pieces of this module. It is a large and complex one, so I will have to look at how the `Makefile` handles the different sub-directories as well. This should give me a solid handle on the overall structure and provide a roadmap for more detailed investigations later on if there are specific files or sub-systems of interest.



32/2 2026/11/18 12:59 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/Makefile",
  "FirstLine": 1,
  "LineCount": 40
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: ISC\n   2:\tobj-$(CONFIG_ATH10K) += ath10k_core.o\n   3:\tath10k_core-y += mac.o \\\n   4:\t\t\t debug.o \\\n   5:\t\t\t core.o \\\n   6:\t\t\t htc.o \\\n   7:\t\t\t htt.o \\\n   8:\t\t\t htt_rx.o \\\n   9:\t\t\t htt_tx.o \\\n  10:\t\t\t txrx.o \\\n  11:\t\t\t wmi.o \\\n  12:\t\t\t wmi-tlv.o \\\n  13:\t\t\t bmi.o \\\n  14:\t\t\t hw.o \\\n  15:\t\t\t p2p.o \\\n  16:\t\t\t swap.o\n  17:\t\n  18:\tath10k_core-$(CONFIG_ATH10K_SPECTRAL) += spectral.o\n  19:\tath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o\n  20:\tath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o\n  21:\tath10k_core-$(CONFIG_THERMAL) += thermal.o\n  22:\tath10k_core-$(CONFIG_ATH10K_LEDS) += leds.o\n  23:\tath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o\n  24:\tath10k_core-$(CONFIG_PM) += wow.o\n  25:\tath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o\n  26:\tath10k_core-$(CONFIG_ATH10K_CE) += ce.o\n  27:\t\n  28:\tobj-$(CONFIG_ATH10K_PCI) += ath10k_pci.o\n  29:\tath10k_pci-y += pci.o\n  30:\t\n  31:\tath10k_pci-$(CONFIG_ATH10K_AHB) += ahb.o\n  32:\t\n  33:\tobj-$(CONFIG_ATH10K_SDIO) += ath10k_sdio.o\n  34:\tath10k_sdio-y += sdio.o\n  35:\t\n  36:\tobj-$(CONFIG_ATH10K_USB) += ath10k_usb.o\n  37:\tath10k_usb-y += usb.o\n  38:\t\n  39:\tobj-$(CONFIG_ATH10K_SNOC) += ath10k_snoc.o\n  40:\tath10k_snoc-y += qmi.o \\\n"
}

33/2 2026/11/18 12:59 llm patch-evaluator
1m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 30441
							output: 35
							thoughts: 292
						

Thoughts:
**Analyzing the ath10k Build Configuration**

Okay, let's break this down. Seeing those lines, specifically the makefile syntax:

`obj-$(CONFIG_ATH10K) += ath10k_core.o`

and the subsequent assignments, immediately my brain jumps to the implications for build configuration. It's all about conditional object inclusion.  `CONFIG_ATH10K` controls whether `ath10k_core.o` and its associated source files, like `mac.o`, `debug.o`, `core.o`, `wmi.o` are included. Similarly, `CONFIG_ATH10K_USB` brings in `ath10k_usb.o` and `usb.o`. The testmode addition depends on `CONFIG_NL80211_TESTMODE`. That's where the change to `ath10k_tm_cmd_utf_start` matters.

I know I'll need to double check the dependencies. `CONFIG_USB` has to be enabled for `CONFIG_ATH10K_USB` to make sense, and `CONFIG_MAC80211` is probably a prerequisite for `CONFIG_ATH10K`. Let's confirm that quickly.

Checking `ath10k/Kconfig`, I can see my assumptions were right. `ATH10K` requires `MAC80211` and `HAS_DMA`, and `ATH10K_USB` has a dependency on both `ATH10K` and `USB`. It's all pretty standard stuff. Gotta check where `NL80211_TESTMODE` is actually *defined* in the Kconfig tree, though. Time to grep that. I need to understand its scope in relation to the code.



34/2 2026/11/18 13:01 tool grepper
0m Args:
{
  "Expression": "config NL80211_TESTMODE",
  "PathPrefixes": [
    "net/wireless/"
  ]
}

Results:
{
  "Output": "net/wireless/Kconfig=36=if CFG80211\nnet/wireless/Kconfig-37-\nnet/wireless/Kconfig:38:config NL80211_TESTMODE\nnet/wireless/Kconfig-39-\tbool \"nl80211 testmode command\"\n"
}

35/2 2026/11/18 13:01 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 31242
							output: 52
							thoughts: 1354
						

Thoughts:
**Analyzing the Impact of These Changes**

Okay, so I'm diving into this ath10k driver modification, and I need to understand its scope. First things first: `NL80211_TESTMODE` depends on `CFG80211`, and `MAC80211` also needs `CFG80211`. Therefore, I need to make sure I've got these configs enabled: `ATH10K`, `ATH10K_USB`, `MAC80211`, `USB`, and of course, `NL80211_TESTMODE`. I'll keep an eye on `USB_RAW_GADGET` and `USB_DUMMY_HCD` if necessary, but the core driver configs are: `ATH10K`, `ATH10K_USB`, `MAC80211`, `USB`, and `NL80211_TESTMODE`.

Now, let's zoom in on the specific functions being touched by this patch. I identified the key symbols that are being modified: `ath10k_usb_probe`, `ath10k_usb_reset_target`, `ath10k_usb_hif_power_down`, `ath10k_core_restart`, `ath10k_core_start`, `ath10k_core_stop`, `ath10k_core_stop_once`, `ath10k_core_probe_fw`, `ath10k_halt`, `ath10k_start`, `ath10k_tm_cmd_utf_start`, and `ath10k_wmi_event_vdev_install_key_complete`.

Alright, let's dig deeper. I want to know the visibility of these symbols, so I’m going to go through them one by one. I can see the following:
*   In `usb.c`: `ath10k_usb_reset_target`, `ath10k_usb_hif_power_down`, and `ath10k_usb_probe` and `ath10k_usb_shutdown` are `static` (internal to the file).
*   In `core.c`: `ath10k_core_restart`, `ath10k_core_probe_fw`, and `ath10k_core_stop_once` are `static`. `ath10k_core_start` and `ath10k_core_unregister` are `global` while `ath10k_core_stop` and `ath10k_core_unregister` are `EXPORT_SYMBOL`.
*   In `mac.c`: `ath10k_halt` is `EXPORT_SYMBOL`, `ath10k_start` is `static`.
*   In `testmode.c`: `ath10k_tm_cmd_utf_start` is `static`, `ath10k_tm_cmd` is `global`.
*   In `wmi.c`: `ath10k_wmi_event_vdev_install_key_complete` is `global`.

Okay, are any of these functions *critical* to the overall system, or are they specific to this driver? The answer is clear: These functions are not general memory allocators, page fault handlers, or synchronization primitives. They are all specific to the ath10k driver's interaction with USB and mac80211.

So, I’ll refine my focus to the most relevant of these: `ath10k_usb_probe`, `ath10k_usb_reset_target`, `ath10k_usb_hif_power_down`, `ath10k_core_restart`, `ath10k_core_start`, `ath10k_core_stop`, `ath10k_core_stop_once`, `ath10k_halt`, `ath10k_start`, `ath10k_tm_cmd_utf_start`, and `ath10k_wmi_event_vdev_install_key_complete`.

One last thing, let me just check what's calling `ath10k_wmi_event_vdev_install_key_complete` to make sure I haven't missed anything. I'll search `drivers/net/wireless/ath/ath10k/wmi.c` for callers.



36/2 2026/11/18 13:02 tool grepper
0m Args:
{
  "Expression": "ath10k_wmi_event_vdev_install_key_complete",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/wmi-tlv.c=639=static void ath10k_wmi_tlv_op_rx(struct ath10k *ar, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath10k/wmi-tlv.c-757-\tcase WMI_TLV_VDEV_INSTALL_KEY_COMPLETE_EVENTID:\ndrivers/net/wireless/ath/ath10k/wmi-tlv.c:758:\t\tath10k_wmi_event_vdev_install_key_complete(ar, skb);\ndrivers/net/wireless/ath/ath10k/wmi-tlv.c-759-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath10k/wmi.c=5333=void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath10k/wmi.c-5337-\ndrivers/net/wireless/ath/ath10k/wmi.c:5338:void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/wmi.c-5339-\t\t\t\t\t\tstruct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath10k/wmi.c=5880=static void ath10k_wmi_op_rx(struct ath10k *ar, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath10k/wmi.c-5985-\tcase WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID:\ndrivers/net/wireless/ath/ath10k/wmi.c:5986:\t\tath10k_wmi_event_vdev_install_key_complete(ar, skb);\ndrivers/net/wireless/ath/ath10k/wmi.c-5987-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath10k/wmi.h=7515=void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);\ndrivers/net/wireless/ath/ath10k/wmi.h:7516:void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/wmi.h-7517-\t\t\t\t\t\tstruct sk_buff *skb);\n"
}

37/2 2026/11/18 13:02 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 34314
							output: 303
							thoughts: 537
						

Thoughts:
**My Evaluation of the ath10k USB Driver for Fuzzing**

Okay, so we're looking at the ath10k USB driver, specifically focusing on handling WMI rx packets. I've broken down my evaluation into a few key areas to make sure we're on the right track for fuzzing.

First, **WorthFuzzing**:  Yes, absolutely. The modified code is reachable. We can hit the ath10k USB support through USB gadget device emulation, like using syzkaller's USB fuzzer with `dummy_hcd` or `raw-gadget`.  More importantly, the *core* driver logic has been altered.  We're talking about changes to how the firmware starts and stops (`start_once`), how it handles wedged states, target resets over USB diag writes, and even the prohibition of testmode UTF start and WMI key install completion.  Given these significant changes, it's definitely worth our time to fuzz this.

Next, **FocusSymbols**: I've zeroed in on the specific, non-ubiquitous kernel functions that demand our attention for fuzzing. These include:

*   `ath10k_usb_probe`
*   `ath10k_usb_reset_target`
*   `ath10k_usb_hif_power_down`
*   `ath10k_core_restart`
*   `ath10k_core_start`
*   `ath10k_core_stop`
*   `ath10k_core_stop_once`
*   `ath10k_halt`
*   `ath10k_start`
*   `ath10k_tm_cmd_utf_start`
*   `ath10k_wmi_event_vdev_install_key_complete`

These are the critical entry points and control flows that are likely to expose vulnerabilities.

Finally, the **EnableConfigs**: I've confirmed the necessary configurations. We need `ATH10K`, `ATH10K_USB`, `MAC80211`, `USB`, and `NL80211_TESTMODE`. I've double-checked in the `ath10k/Kconfig` file, `ATH10K` depends on `MAC80211 && HAS_DMA`. `HAS_DMA` is standard on amd64. `ATH10K_USB` depends on `ATH10K && USB`, and `ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o`, confirming that these configurations are all we need.

I'm confident in my assessment. The logic is sound, the necessary conditions are met, and it all adheres perfectly to the evaluation criteria. Ready to call `set-results`.



38/2 2026/11/18 13:02 tool set-results
0m Args:
{
  "EnableConfigs": [
    "ATH10K",
    "ATH10K_USB",
    "MAC80211",
    "USB",
    "NL80211_TESTMODE"
  ],
  "FocusSymbols": [
    "ath10k_usb_probe",
    "ath10k_usb_reset_target",
    "ath10k_usb_hif_power_down",
    "ath10k_core_restart",
    "ath10k_core_start",
    "ath10k_core_stop",
    "ath10k_core_stop_once",
    "ath10k_halt",
    "ath10k_start",
    "ath10k_tm_cmd_utf_start",
    "ath10k_wmi_event_vdev_install_key_complete"
  ],
  "Reasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver and implements a single-start lifecycle ('start_once') across core, mac, USB HIF, testmode, and WMI components. This code is reachable and fuzzable in standard virtualized environments via USB emulation (such as syzkaller's Raw Gadget engine) along with mac80211 and nl80211 interfaces.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "ATH10K",
    "ATH10K_USB",
    "MAC80211",
    "USB",
    "NL80211_TESTMODE"
  ],
  "FocusSymbols": [
    "ath10k_usb_probe",
    "ath10k_usb_reset_target",
    "ath10k_usb_hif_power_down",
    "ath10k_core_restart",
    "ath10k_core_start",
    "ath10k_core_stop",
    "ath10k_core_stop_once",
    "ath10k_halt",
    "ath10k_start",
    "ath10k_tm_cmd_utf_start",
    "ath10k_wmi_event_vdev_install_key_complete"
  ],
  "Reasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver and implements a single-start lifecycle ('start_once') across core, mac, USB HIF, testmode, and WMI components. This code is reachable and fuzzable in standard virtualized environments via USB emulation (such as syzkaller's Raw Gadget engine) along with mac80211 and nl80211 interfaces.",
  "WorthFuzzing": true
}

39/1 2026/11/18 13:02 action If
5m Args:
{
  "WorthFuzzing": true
}

Results:
null

40/2 2026/11/18 13:02 agent kmsan-evaluator
5m Model:
core

Args:
null

Results:
{
  "KMSANReasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver, introduces a `start_once` bus parameter to keep the firmware running across interface stop/start cycles, adds target cold reset routines on USB power-down/shutdown, and handles WMI key installation completion for USB.\n\n1. Uninitialized memory analysis:\n- All new stack variables (such as `val` in `ath10k_usb_reset_target` and `bus_params` in probe functions) are fully initialized before use.\n- The patch does not introduce or alter any copying of data to user space (no `copy_to_user`, `put_user`, netlink attributes, or ioctl outputs).\n- No changes alter buffer sizing, allocation routines, or packet parsing logic in ways that could expose uninitialized stack, heap, or page bytes.\n\n2. KASAN vs KMSAN applicability:\n- Potential risks in this change revolve around device state transitions, concurrency/synchronization (`conf_mutex`, `udev-\u003estate`), and lifecycle/cleanup during disconnect or shutdown. These failure modes (use-after-free, double free, locking deadlocks) are already covered by KASAN and LOCKDEP in standard test runs.\n- KMSAN is not required as there are no uninitialized memory reads or information leak risks introduced.",
  "NeedsKMSAN": false
}

Instruction:
You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.

CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
  a comprehensive suite of debugging tools and sanitizers, including KASAN
  (out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
  (locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
  or page allocations) and kernel-to-user memory info-leaks.

Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.

Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.

Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
   attributes, ioctl output arguments, socket options, or BPF buffers) where fields
   or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
   or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
   could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
   uninitialized bytes of existing buffers.

Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
  dereferences, locking deadlocks, or use-after-free bugs (these are already caught
  by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
  or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.

Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Target architecture: amd64

For your convenience, here is the diff of the changes:
commit 8981388d3c244eef773c57eec7a1a4e19654bbc3
Author: syz-cluster <triage@syzkaller.com>
Date:   Wed Nov 18 12:48:05 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
index efb9f022d8c662..a727cd73ec098c 100644
--- a/drivers/net/wireless/ath/ath10k/Kconfig
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
@@ -34,11 +34,10 @@ config ATH10K_SDIO
 	  This module adds support for SDIO/MMC bus.
 
 config ATH10K_USB
-	tristate "Atheros ath10k USB support (EXPERIMENTAL)"
+	tristate "Atheros ath10k USB support"
 	depends on ATH10K && USB
 	help
-	  This module adds experimental support for USB bus. Currently
-	  work in progress and will not fully work.
+	  This module adds support for USB bus.
 
 config ATH10K_SNOC
 	tristate "Qualcomm ath10k SNOC support"
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 7c2939cbde5f05..b7a84980a0885d 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -628,6 +628,48 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.delay_unmap_buffer = false,
 		.mcast_frame_registration = false,
 	},
+	{
+		.id = QCA9377_HW_1_1_DEV_VERSION,
+		.dev_id = 0x9378,
+		.bus = ATH10K_BUS_USB,
+		.name = "qca9377 hw1.1 usb",
+		.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
+		.uart_pin = 6,
+		.otp_exe_param = 0,
+		.channel_counters_freq_hz = 88000,
+		.max_probe_resp_desc_thres = 0,
+		.cal_data_len = 8124,
+		.fw = {
+			.dir = QCA9377_HW_1_0_FW_DIR,
+			.board_size = QCA9377_BOARD_DATA_SZ,
+			.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,
+		},
+		.rx_desc_ops = &qca988x_rx_desc_ops,
+		.hw_ops = &qca6174_ops,
+		.hw_clk = qca6174_clk,
+		.target_cpu_freq = 176000000,
+		.decap_align_bytes = 4,
+		.spectral_bin_discard = 0,
+		.spectral_bin_offset = 0,
+		.vht160_mcs_rx_highest = 0,
+		.vht160_mcs_tx_highest = 0,
+		.n_cipher_suites = 8,
+		.ast_skid_limit = 0x10,
+		.num_wds_entries = 0x20,
+		.target_64bit = false,
+		.rx_ring_fill_level = HTT_RX_RING_FILL_LEVEL,
+		.shadow_reg_support = false,
+		.rri_on_ddr = false,
+		.hw_filter_reset_required = true,
+		.fw_diag_ce_download = false,
+		.credit_size_workaround = false,
+		.tx_stats_over_pktlog = false,
+		.dynamic_sar_support = false,
+		.hw_restart_disconnect = false,
+		.use_fw_tx_credits = true,
+		.delay_unmap_buffer = false,
+		.mcast_frame_registration = false,
+	},
 	{
 		.id = QCA9377_HW_1_1_DEV_VERSION,
 		.dev_id = QCA9377_1_0_DEVICE_ID,
@@ -2603,6 +2645,12 @@ static void ath10k_core_restart(struct work_struct *work)
 
 	switch (ar->state) {
 	case ATH10K_STATE_ON:
+		if (ar->bus_param.start_once) {
+			ar->state = ATH10K_STATE_WEDGED;
+			ath10k_warn(ar, "firmware cannot be restarted, resetting the target\n");
+			ath10k_hif_power_down(ar);
+			break;
+		}
 		ar->state = ATH10K_STATE_RESTARTING;
 		ath10k_halt(ar);
 		ath10k_scan_finish(ar);
@@ -2982,6 +3030,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
 
 	lockdep_assert_held(&ar->conf_mutex);
 
+	/* the firmware started during the registration is still running */
+	if (ar->bus_param.start_once && ar->state != ATH10K_STATE_OFF)
+		return 0;
+
 	clear_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags);
 
 	ar->running_fw = fw;
@@ -3333,7 +3385,8 @@ void ath10k_core_stop(struct ath10k *ar)
 
 	/* try to suspend target */
 	if (ar->state != ATH10K_STATE_RESTARTING &&
-	    ar->state != ATH10K_STATE_UTF)
+	    ar->state != ATH10K_STATE_UTF &&
+	    !ar->bus_param.start_once)
 		ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR);
 
 	ath10k_hif_stop(ar);
@@ -3345,6 +3398,18 @@ void ath10k_core_stop(struct ath10k *ar)
 }
 EXPORT_SYMBOL(ath10k_core_stop);
 
+static void ath10k_core_stop_once(struct ath10k *ar)
+{
+	if (!ar->bus_param.start_once)
+		return;
+
+	mutex_lock(&ar->conf_mutex);
+	ath10k_core_stop(ar);
+	mutex_unlock(&ar->conf_mutex);
+
+	ath10k_hif_power_down(ar);
+}
+
 /* mac80211 manages fw/hw initialization through start/stop hooks. However in
  * order to know what hw capabilities should be advertised to mac80211 it is
  * necessary to load the firmware (and tear it down immediately since start
@@ -3479,6 +3544,13 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
 	}
 
 	ath10k_debug_print_boot_info(ar);
+
+	/* keep the firmware running if it cannot be started a second time */
+	if (ar->bus_param.start_once) {
+		mutex_unlock(&ar->conf_mutex);
+		return 0;
+	}
+
 	ath10k_core_stop(ar);
 
 	mutex_unlock(&ar->conf_mutex);
@@ -3564,6 +3636,7 @@ static void ath10k_core_register_work(struct work_struct *work)
 err_unregister_mac:
 	ath10k_mac_unregister(ar);
 err_release_fw:
+	ath10k_core_stop_once(ar);
 	ath10k_core_free_firmware_files(ar);
 err:
 	/* TODO: It's probably a good idea to release device from the driver
@@ -3605,6 +3678,8 @@ void ath10k_core_unregister(struct ath10k *ar)
 	 */
 	ath10k_mac_unregister(ar);
 
+	ath10k_core_stop_once(ar);
+
 	ath10k_testmode_destroy(ar);
 
 	ath10k_core_free_firmware_files(ar);
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index dfee432615ebff..7a09244bb3f2f3 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -1006,6 +1006,11 @@ struct ath10k_bus_params {
 	enum ath10k_dev_type dev_type;
 	bool link_can_suspend;
 	bool hl_msdu_ids;
+
+	/* The target cannot be reset without leaving the bus, so the firmware
+	 * is kept running from the registration to the unregistration.
+	 */
+	bool start_once;
 };
 
 struct ath10k {
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index cd468b24bd3333..6196a11b77d173 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -900,6 +900,7 @@ ath10k_is_rssi_enable(struct ath10k_hw_params *hw,
 #define SOC_RESET_CONTROL_SI0_RST_MASK		ar->regs->soc_reset_control_si0_rst_mask
 #define SOC_RESET_CONTROL_CE_RST_MASK		ar->regs->soc_reset_control_ce_rst_mask
 #define SOC_RESET_CONTROL_CPU_WARM_RST_MASK	0x00000040
+#define SOC_RESET_CONTROL_COLD_RST_MASK		0x00000100
 #define SOC_CPU_CLOCK_OFFSET			0x00000020
 #define SOC_CPU_CLOCK_STANDARD_LSB		0
 #define SOC_CPU_CLOCK_STANDARD_MASK		0x00000003
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 8e604697d6c20d..65452eb258b55e 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4819,8 +4819,12 @@ void ath10k_halt(struct ath10k *ar)
 	ath10k_scan_finish(ar);
 	ath10k_peer_cleanup_all(ar);
 	ath10k_stop_radar_confirmation(ar);
-	ath10k_core_stop(ar);
-	ath10k_hif_power_down(ar);
+
+	/* stop the firmware unless it can be started only once */
+	if (!ar->bus_param.start_once) {
+		ath10k_core_stop(ar);
+		ath10k_hif_power_down(ar);
+	}
 
 	spin_lock_bh(&ar->data_lock);
 	list_for_each_entry(arvif, &ar->arvifs, list)
@@ -5381,7 +5385,9 @@ static int ath10k_start(struct ieee80211_hw *hw)
 	return 0;
 
 err_core_stop:
-	ath10k_core_stop(ar);
+	/* stop the firmware unless it can be started only once */
+	if (!ar->bus_param.start_once)
+		ath10k_core_stop(ar);
 
 err_power_down:
 	ath10k_hif_power_down(ar);
diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c
index 282ae6e20c8eff..10ebf3c1ccbd7e 100644
--- a/drivers/net/wireless/ath/ath10k/testmode.c
+++ b/drivers/net/wireless/ath/ath10k/testmode.c
@@ -353,6 +353,12 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[])
 		goto err;
 	}
 
+	/* the running firmware cannot be replaced by the UTF firmware */
+	if (ar->bus_param.start_once) {
+		ret = -EOPNOTSUPP;
+		goto err;
+	}
+
 	if (WARN_ON(ar->testmode.utf_mode_fw.fw_file.firmware != NULL)) {
 		/* utf image is already downloaded, it shouldn't be */
 		ret = -EEXIST;
diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c
index 987d57a01ddfa7..e23d87c84069f5 100644
--- a/drivers/net/wireless/ath/ath10k/usb.c
+++ b/drivers/net/wireless/ath/ath10k/usb.c
@@ -707,9 +707,46 @@ static int ath10k_usb_hif_power_up(struct ath10k *ar,
 	return 0;
 }
 
+/* The running firmware does not accept BMI commands, so the target has to
+ * be cold reset before it can be probed again. The reset makes it leave
+ * the bus and enumerate as a new device.
+ */
+static void ath10k_usb_reset_target(struct ath10k *ar, bool wait)
+{
+	struct ath10k_usb *ar_usb = ath10k_usb_priv(ar);
+	__le32 val = cpu_to_le32(SOC_RESET_CONTROL_COLD_RST_MASK);
+	unsigned long timeout;
+	int ret;
+
+	if (!ar->bmi.done_sent || ar_usb->udev->state == USB_STATE_NOTATTACHED)
+		return;
+
+	ret = ath10k_usb_hif_diag_write(ar, RTC_SOC_BASE_ADDRESS +
+					SOC_RESET_CONTROL_ADDRESS,
+					&val, sizeof(val));
+	if (ret) {
+		ath10k_warn(ar, "failed to reset the target: %d\n", ret);
+		return;
+	}
+
+	if (!wait)
+		return;
+
+	/* wait for the disconnect, the stale device must not be probed again */
+	timeout = jiffies + msecs_to_jiffies(ATH10K_USB_RESET_TIMEOUT_MS);
+	while (ar_usb->udev->state != USB_STATE_NOTATTACHED) {
+		if (time_after(jiffies, timeout)) {
+			ath10k_warn(ar, "target did not leave the bus after the reset\n");
+			return;
+		}
+		msleep(20);
+	}
+}
+
 static void ath10k_usb_hif_power_down(struct ath10k *ar)
 {
 	ath10k_usb_flush_all(ar);
+	ath10k_usb_reset_target(ar, true);
 }
 
 #ifdef CONFIG_PM
@@ -1037,15 +1074,13 @@ static int ath10k_usb_probe(struct usb_interface *interface,
 	/* TODO: don't know yet how to get chip_id with USB */
 	bus_params.chip_id = 0;
 	bus_params.hl_msdu_ids = true;
+	bus_params.start_once = true;
 	ret = ath10k_core_register(ar, &bus_params);
 	if (ret) {
 		ath10k_warn(ar, "failed to register driver core: %d\n", ret);
 		goto err_usb_destroy;
 	}
 
-	/* TODO: remove this once USB support is fully implemented */
-	ath10k_warn(ar, "Warning: ath10k USB support is incomplete, don't expect anything to work!\n");
-
 	return 0;
 
 err_usb_destroy:
@@ -1071,6 +1106,22 @@ static void ath10k_usb_disconnect(struct usb_interface *interface)
 	ath10k_core_destroy(ar_usb->ar);
 }
 
+static void ath10k_usb_shutdown(struct usb_interface *interface)
+{
+	struct ath10k_usb *ar_usb = usb_get_intfdata(interface);
+	struct ath10k *ar;
+
+	if (!ar_usb)
+		return;
+
+	ar = ar_usb->ar;
+
+	/* a firmware left running would fail the probe after the reboot */
+	mutex_lock(&ar->conf_mutex);
+	ath10k_usb_reset_target(ar, false);
+	mutex_unlock(&ar->conf_mutex);
+}
+
 #ifdef CONFIG_PM
 
 static int ath10k_usb_pm_suspend(struct usb_interface *interface,
@@ -1102,6 +1153,7 @@ static int ath10k_usb_pm_resume(struct usb_interface *interface)
 
 /* table of devices that work with this driver */
 static struct usb_device_id ath10k_usb_ids[] = {
+	{USB_DEVICE(0x0cf3, 0x9378)}, /* Atheros QCA9377-7 */
 	{USB_DEVICE(0x13b1, 0x0042)}, /* Linksys WUSB6100M */
 	{ /* Terminating entry */ },
 };
@@ -1114,8 +1166,10 @@ static struct usb_driver ath10k_usb_driver = {
 	.suspend = ath10k_usb_pm_suspend,
 	.resume = ath10k_usb_pm_resume,
 	.disconnect = ath10k_usb_disconnect,
+	.shutdown = ath10k_usb_shutdown,
 	.id_table = ath10k_usb_ids,
 	.supports_autosuspend = true,
+	.soft_unbind = 1,
 	.disable_hub_initiated_lpm = 1,
 };
 
diff --git a/drivers/net/wireless/ath/ath10k/usb.h b/drivers/net/wireless/ath/ath10k/usb.h
index 517afbd7376432..47ed1bad81a6d1 100644
--- a/drivers/net/wireless/ath/ath10k/usb.h
+++ b/drivers/net/wireless/ath/ath10k/usb.h
@@ -13,6 +13,7 @@
 #define TX_URB_COUNT               32
 #define RX_URB_COUNT               32
 #define ATH10K_USB_RX_BUFFER_SIZE  4096
+#define ATH10K_USB_RESET_TIMEOUT_MS 3000
 
 #define ATH10K_USB_PIPE_INVALID ATH10K_USB_PIPE_MAX
 
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index e57588c19c800c..7d43a23017aa06 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5339,6 +5339,10 @@ void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
 						struct sk_buff *skb)
 {
 	ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID\n");
+
+	/* the USB firmware sends no HTT security indication for group keys */
+	if (ar->hif.bus == ATH10K_BUS_USB)
+		complete(&ar->install_key_done);
 }
 
 void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb)

41/3 2026/11/18 13:02 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 7618
							output: 45
							thoughts: 1108
						

Thoughts:
**KMSAN Fuzzing Evaluation for ath10k Patch Series**

Okay, let's break this down. The question is: do these changes warrant a dedicated KMSAN fuzzing session?  My initial gut feeling is that they *might*, but we need to be systematic. This patch introduces support for a new QCA9377 USB device, and the changes center around a `start_once` flag in the `ath10k_bus_params` structure. This `start_once` functionality, and its interaction with reset routines, is the crux of my concern.

The most relevant code seems to be in `drivers/net/wireless/ath/ath10k/usb.c`.  Specifically, the `ath10k_usb_probe` function now sets `bus_params.start_once = true;`.  This is important because of how this flag interacts with core functions like `ath10k_core_restart`, `ath10k_core_start`, `ath10k_core_stop`, and so on. The logic around these functions gets very conditional based on `start_once`, and the fuzzing should target areas where `start_once` is used.

I also see new functions like `ath10k_usb_reset_target`, which directly manipulates the SOC reset control via USB. This is a potential area of concern. It could be possible to trigger a reset where we don't expect it, or where the reset sequence is not properly handled in all of the other core code paths. The addition of `ath10k_usb_shutdown` also calls `ath10k_usb_reset_target(ar, false)`. It means that the driver is now *actively* trying to reset something. This makes me suspect the potential for uninitialized memory usage, info leaks, or uninitialized variables. We need to focus here.

My immediate focus is on whether the `bus_params` struct is properly initialized and if there are any race conditions based on the new logic. The code added to `ath10k_wmi_event_vdev_install_key_complete` looks innocent enough, a call to `complete()` based on `ATH10K_BUS_USB`, but `wmi` events are another touch-point of concern when dealing with potentially mis-used parameters. We're dealing with USB interaction, a new device ID, and the `ath10k_usb_reset_target` function. I *definitely* want to check how those variables in `ath10k_usb_reset_target` are being handled.

Therefore, yes. Given that we're adding a *reset* function, dealing with a new USB device, and altering core initialization/shutdown sequences, this patch series warrants a targeted KMSAN fuzzing session. The fuzzing campaign should specifically exercise the new code paths related to `start_once` in `ath10k_usb_probe`, `ath10k_usb_reset_target`, `ath10k_usb_shutdown`, and the core functions that now consider the `start_once` flag (e.g., `ath10k_core_restart`, `ath10k_core_start`). We need to make sure the reset is performed properly under stress, and that no uninitialized memory issues exist.



42/3 2026/11/18 13:03 tool grepper
0m Args:
{
  "Expression": "ath10k_usb_probe",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/usb.c"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/usb.c=1014=static int ath10k_usb_napi_poll(struct napi_struct *ctx, int budget)\n--\ndrivers/net/wireless/ath/ath10k/usb.c-1028-/* ath10k usb driver registered functions */\ndrivers/net/wireless/ath/ath10k/usb.c:1029:static int ath10k_usb_probe(struct usb_interface *interface,\ndrivers/net/wireless/ath/ath10k/usb.c-1030-\t\t\t    const struct usb_device_id *id)\n--\ndrivers/net/wireless/ath/ath10k/usb.c=1163=static struct usb_driver ath10k_usb_driver = {\ndrivers/net/wireless/ath/ath10k/usb.c-1164-\t.name = \"ath10k_usb\",\ndrivers/net/wireless/ath/ath10k/usb.c:1165:\t.probe = ath10k_usb_probe,\ndrivers/net/wireless/ath/ath10k/usb.c-1166-\t.suspend = ath10k_usb_pm_suspend,\n"
}

43/3 2026/11/18 13:03 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 9808
							output: 45
							thoughts: 30
						

Thoughts:
Okay, let's dive into this. I'm going to pull up `drivers/net/wireless/ath/ath10k/usb.c`, specifically around line 1029. I need to understand what's happening in this section of the code. This is likely related to the USB interface of the ath10k driver, so I need to refresh my memory on the data structures and control flows involved in the USB communication with the Qualcomm Atheros chipset. My guess is that line 1029 will probably be related to an endpoint configuration, an interrupt handling routine, or maybe even a data transfer. I'll need to analyze the surrounding lines for context, of course, to get the full picture, but this should be a good starting point for a deeper dive.



44/3 2026/11/18 13:04 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath10k/usb.c",
  "FirstLine": 1028,
  "LineCount": 60
}

Results:
{
  "Contents": "1028:\t/* ath10k usb driver registered functions */\n1029:\tstatic int ath10k_usb_probe(struct usb_interface *interface,\n1030:\t\t\t\t    const struct usb_device_id *id)\n1031:\t{\n1032:\t\tstruct ath10k *ar;\n1033:\t\tstruct ath10k_usb *ar_usb;\n1034:\t\tstruct usb_device *dev = interface_to_usbdev(interface);\n1035:\t\tint ret, vendor_id, product_id;\n1036:\t\tenum ath10k_hw_rev hw_rev;\n1037:\t\tstruct ath10k_bus_params bus_params = {};\n1038:\t\n1039:\t\t/* Assumption: All USB based chipsets (so far) are QCA9377 based.\n1040:\t\t * If there will be newer chipsets that does not use the hw reg\n1041:\t\t * setup as defined in qca6174_regs and qca6174_values, this\n1042:\t\t * assumption is no longer valid and hw_rev must be setup differently\n1043:\t\t * depending on chipset.\n1044:\t\t */\n1045:\t\thw_rev = ATH10K_HW_QCA9377;\n1046:\t\n1047:\t\tar = ath10k_core_create(sizeof(*ar_usb), \u0026dev-\u003edev, ATH10K_BUS_USB,\n1048:\t\t\t\t\thw_rev, \u0026ath10k_usb_hif_ops);\n1049:\t\tif (!ar) {\n1050:\t\t\tdev_err(\u0026dev-\u003edev, \"failed to allocate core\\n\");\n1051:\t\t\treturn -ENOMEM;\n1052:\t\t}\n1053:\t\n1054:\t\tnetif_napi_add(ar-\u003enapi_dev, \u0026ar-\u003enapi, ath10k_usb_napi_poll);\n1055:\t\n1056:\t\tvendor_id = le16_to_cpu(dev-\u003edescriptor.idVendor);\n1057:\t\tproduct_id = le16_to_cpu(dev-\u003edescriptor.idProduct);\n1058:\t\n1059:\t\tath10k_dbg(ar, ATH10K_DBG_BOOT,\n1060:\t\t\t   \"usb new func vendor 0x%04x product 0x%04x\\n\",\n1061:\t\t\t   vendor_id, product_id);\n1062:\t\n1063:\t\tar_usb = ath10k_usb_priv(ar);\n1064:\t\tret = ath10k_usb_create(ar, interface);\n1065:\t\tif (ret)\n1066:\t\t\tgoto err;\n1067:\t\tar_usb-\u003ear = ar;\n1068:\t\n1069:\t\tar-\u003edev_id = product_id;\n1070:\t\tar-\u003eid.vendor = vendor_id;\n1071:\t\tar-\u003eid.device = product_id;\n1072:\t\n1073:\t\tbus_params.dev_type = ATH10K_DEV_TYPE_HL;\n1074:\t\t/* TODO: don't know yet how to get chip_id with USB */\n1075:\t\tbus_params.chip_id = 0;\n1076:\t\tbus_params.hl_msdu_ids = true;\n1077:\t\tbus_params.start_once = true;\n1078:\t\tret = ath10k_core_register(ar, \u0026bus_params);\n1079:\t\tif (ret) {\n1080:\t\t\tath10k_warn(ar, \"failed to register driver core: %d\\n\", ret);\n1081:\t\t\tgoto err_usb_destroy;\n1082:\t\t}\n1083:\t\n1084:\t\treturn 0;\n1085:\t\n1086:\terr_usb_destroy:\n1087:\t\tath10k_usb_destroy(ar);\n"
}

45/3 2026/11/18 13:04 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 11112
							output: 43
							thoughts: 72
						

Thoughts:
Here's my analysis of the provided code snippet:

**Initialization and Potential Redundancy in `ath10k` Driver**

Okay, so I'm digging into this `ath10k` driver code, and my eye immediately lands on line 1037. Specifically, I see `struct ath10k_bus_params bus_params = {};`. That's a standard, zero-initialization of `bus_params` right there on the stack. Now, that's good practice for ensuring a known starting state, preventing garbage data from messing things up. But then... there's an explicit setting of `bus_params.start_once = true;` following that line. 

This triggers a thought: is this explicit setting redundant? Or, is there a specific, critical reason we're doing it this way instead of relying on the zero-initialization? Perhaps there are compiler optimization concerns? Or, even more subtly, is there a potential compiler issue where a zero-initialization might be optimized away in some scenarios if the variable isn't explicitly used, and that explicit assignment is for clarity or robustness? It makes me want to dig deeper into the contexts where `bus_params` is used and how `start_once` impacts the driver's operation.

The next thing I need to do is jump into `ath10k_core_register` and see how `bus_params` is actually used. That's where the real answer lies. We need to trace this variable's usage to understand if this initialization method serves a specific purpose or could be refactored.



46/3 2026/11/18 13:04 tool grepper
0m Args:
{
  "Expression": "ath10k_core_register\\(",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/ahb.c=726=static int ath10k_ahb_probe(struct platform_device *pdev)\n--\ndrivers/net/wireless/ath/ath10k/ahb.c-795-\ndrivers/net/wireless/ath/ath10k/ahb.c:796:\tret = ath10k_core_register(ar, \u0026bus_params);\ndrivers/net/wireless/ath/ath10k/ahb.c-797-\tif (ret) {\n--\ndrivers/net/wireless/ath/ath10k/core.c=3573=static void ath10k_core_register_work(struct work_struct *work)\n--\ndrivers/net/wireless/ath/ath10k/core.c-3647-\ndrivers/net/wireless/ath/ath10k/core.c:3648:int ath10k_core_register(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/core.c-3649-\t\t\t const struct ath10k_bus_params *bus_params)\n--\ndrivers/net/wireless/ath/ath10k/core.h=1364=void ath10k_core_start_recovery(struct ath10k *ar);\ndrivers/net/wireless/ath/ath10k/core.h:1365:int ath10k_core_register(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/core.h-1366-\t\t\t const struct ath10k_bus_params *bus_params);\n--\ndrivers/net/wireless/ath/ath10k/pci.c=3530=static int ath10k_pci_probe(struct pci_dev *pdev,\n--\ndrivers/net/wireless/ath/ath10k/pci.c-3702-\ndrivers/net/wireless/ath/ath10k/pci.c:3703:\tret = ath10k_core_register(ar, \u0026bus_params);\ndrivers/net/wireless/ath/ath10k/pci.c-3704-\tif (ret) {\n--\ndrivers/net/wireless/ath/ath10k/sdio.c=2517=static int ath10k_sdio_probe(struct sdio_func *func,\n--\ndrivers/net/wireless/ath/ath10k/sdio.c-2626-\ndrivers/net/wireless/ath/ath10k/sdio.c:2627:\tret = ath10k_core_register(ar, \u0026bus_params);\ndrivers/net/wireless/ath/ath10k/sdio.c-2628-\tif (ret) {\n--\ndrivers/net/wireless/ath/ath10k/snoc.c=1371=int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type)\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-1388-\t\tbus_params.chip_id = ar_snoc-\u003etarget_info.soc_version;\ndrivers/net/wireless/ath/ath10k/snoc.c:1389:\t\tret = ath10k_core_register(ar, \u0026bus_params);\ndrivers/net/wireless/ath/ath10k/snoc.c-1390-\t\tif (ret) {\n--\ndrivers/net/wireless/ath/ath10k/usb.c=1029=static int ath10k_usb_probe(struct usb_interface *interface,\n--\ndrivers/net/wireless/ath/ath10k/usb.c-1077-\tbus_params.start_once = true;\ndrivers/net/wireless/ath/ath10k/usb.c:1078:\tret = ath10k_core_register(ar, \u0026bus_params);\ndrivers/net/wireless/ath/ath10k/usb.c-1079-\tif (ret) {\n"
}

47/3 2026/11/18 13:04 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 12608
							output: 46
							thoughts: 142
						

Thoughts:
Okay, let's dissect this `ath10k_core_register` usage. My initial concern is how the `bus_params` struct is being initialized across different bus types. The goal is to ensure consistency and prevent any unexpected behavior due to uninitialized data or incorrect defaults.

So, let me quickly check the initialization strategy in each of the caller modules: `ahb.c`, `pci.c`, `sdio.c`, and `snoc.c`. Ah, good, it appears that in all those cases - `ahb`, `pci`, `sdio`, and `snoc` - a zero-initialized `struct ath10k_bus_params bus_params = {};` is being employed. That's what I expected to see. I think this approach is correct as we are explicitly initializing the structure with zeros, so any missing parameters will be defaulted to zero which is generally a safe approach to initializing the struct. Good, it looks consistent and clean. Time to move on.



48/3 2026/11/18 13:05 tool grepper
0m Args:
{
  "Expression": "struct ath10k_bus_params bus_params",
  "PathPrefixes": [
    "drivers/net/wireless/ath/ath10k/"
  ]
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/ahb.c=726=static int ath10k_ahb_probe(struct platform_device *pdev)\n--\ndrivers/net/wireless/ath/ath10k/ahb.c-733-\tint ret;\ndrivers/net/wireless/ath/ath10k/ahb.c:734:\tstruct ath10k_bus_params bus_params = {};\ndrivers/net/wireless/ath/ath10k/ahb.c-735-\n--\ndrivers/net/wireless/ath/ath10k/pci.c=3530=static int ath10k_pci_probe(struct pci_dev *pdev,\n--\ndrivers/net/wireless/ath/ath10k/pci.c-3536-\tenum ath10k_hw_rev hw_rev;\ndrivers/net/wireless/ath/ath10k/pci.c:3537:\tstruct ath10k_bus_params bus_params = {};\ndrivers/net/wireless/ath/ath10k/pci.c-3538-\tbool pci_ps, is_qca988x = false;\n--\ndrivers/net/wireless/ath/ath10k/sdio.c=2517=static int ath10k_sdio_probe(struct sdio_func *func,\n--\ndrivers/net/wireless/ath/ath10k/sdio.c-2523-\tu32 dev_id_base;\ndrivers/net/wireless/ath/ath10k/sdio.c:2524:\tstruct ath10k_bus_params bus_params = {};\ndrivers/net/wireless/ath/ath10k/sdio.c-2525-\tint ret, i;\n--\ndrivers/net/wireless/ath/ath10k/snoc.c=1371=int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type)\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-1373-\tstruct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);\ndrivers/net/wireless/ath/ath10k/snoc.c:1374:\tstruct ath10k_bus_params bus_params = {};\ndrivers/net/wireless/ath/ath10k/snoc.c-1375-\tint ret;\n--\ndrivers/net/wireless/ath/ath10k/usb.c=1029=static int ath10k_usb_probe(struct usb_interface *interface,\n--\ndrivers/net/wireless/ath/ath10k/usb.c-1036-\tenum ath10k_hw_rev hw_rev;\ndrivers/net/wireless/ath/ath10k/usb.c:1037:\tstruct ath10k_bus_params bus_params = {};\ndrivers/net/wireless/ath/ath10k/usb.c-1038-\n"
}

49/3 2026/11/18 13:05 llm kmsan-evaluator
2m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 13789
							output: 309
							thoughts: 2010
						

Thoughts:
**KMSAN Assessment: No Uninitialized Memory Risks Introduced**

Okay, let's break this down. My analysis focuses on whether these changes introduce any risks specifically detectable by KMSAN – that is, reads of uninitialized memory or information leaks to userspace. I'm seeing a lot of code related to managing the lifecycle of the ath10k USB device and firmware, but nothing that seems to trigger KMSAN concerns.

First, I'm noting that `bus_params` is consistently zero-initialized, and the new `start_once` flag's behavior is pretty clear: it's a mechanism to handle the USB's firmware restart constraints. Several functions, like `ath10k_usb_reset_target`, are critical. The `val` variable which gets written to the device is correctly initialized, and the rest of the logic around the reset seems sound, including the timeout logic and state checks related to USB connection status.

I checked the hardware parameters table additions, and they're all statically defined and explicitly initialized or zeroed out. No immediate issues there.

Looking at the interaction with `ath10k_core_restart`, `ath10k_core_start`, `ath10k_core_stop`, and related functions, I see the `start_once` flag being used to control firmware restarts. The code handles the case where the firmware can't be restarted, triggering a reset. I'm not seeing any obvious uninitialized memory risks in this control flow either. Specifically, it seems like the `conf_mutex` is handled correctly around critical sections. Functions like `ath10k_core_stop_once` and `ath10k_core_probe_fw` are being used to shut down the device.

The fix to `ath10k_wmi_event_vdev_install_key_complete` is related to how the USB firmware signals key installation, and it's isolated and straightforward.

The testmode checks and corresponding error paths also do not raise any uninitialized memory concerns.

Then, I'm going through my mental checklist: Do any of these changes copy data to userspace? No. Do they read uninitialized memory? It doesn't look like it. Are there changes to buffer handling or packet parsing that could create vulnerabilities? No. Are there changes that could expose uninitialized memory risks? No.

The most important aspect of this analysis is that any concurrency or state machine issues that might be introduced (use-after-free, deadlocks, race conditions around driver unbinding, shutdown, disconnect, power_down, target reset) are already covered by KASAN and LOCKDEP and standard bug detectors. I'm focusing specifically on uninitialized memory, which KMSAN detects. Since I see none of those risks being exposed, it's clear that we don't need KMSAN here.

The changes involve firmware management and device reset and appear sound in terms of initialization and memory access. Therefore, NeedsKMSAN should be false.



50/3 2026/11/18 13:08 tool set-results
0m Args:
{
  "KMSANReasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver, introduces a `start_once` bus parameter to keep the firmware running across interface stop/start cycles, adds target cold reset routines on USB power-down/shutdown, and handles WMI key installation completion for USB.\n\n1. Uninitialized memory analysis:\n- All new stack variables (such as `val` in `ath10k_usb_reset_target` and `bus_params` in probe functions) are fully initialized before use.\n- The patch does not introduce or alter any copying of data to user space (no `copy_to_user`, `put_user`, netlink attributes, or ioctl outputs).\n- No changes alter buffer sizing, allocation routines, or packet parsing logic in ways that could expose uninitialized stack, heap, or page bytes.\n\n2. KASAN vs KMSAN applicability:\n- Potential risks in this change revolve around device state transitions, concurrency/synchronization (`conf_mutex`, `udev-\u003estate`), and lifecycle/cleanup during disconnect or shutdown. These failure modes (use-after-free, double free, locking deadlocks) are already covered by KASAN and LOCKDEP in standard test runs.\n- KMSAN is not required as there are no uninitialized memory reads or information leak risks introduced.",
  "NeedsKMSAN": false
}

Results:
{
  "KMSANReasoning": "The patch adds support for QCA9377 USB devices to the ath10k driver, introduces a `start_once` bus parameter to keep the firmware running across interface stop/start cycles, adds target cold reset routines on USB power-down/shutdown, and handles WMI key installation completion for USB.\n\n1. Uninitialized memory analysis:\n- All new stack variables (such as `val` in `ath10k_usb_reset_target` and `bus_params` in probe functions) are fully initialized before use.\n- The patch does not introduce or alter any copying of data to user space (no `copy_to_user`, `put_user`, netlink attributes, or ioctl outputs).\n- No changes alter buffer sizing, allocation routines, or packet parsing logic in ways that could expose uninitialized stack, heap, or page bytes.\n\n2. KASAN vs KMSAN applicability:\n- Potential risks in this change revolve around device state transitions, concurrency/synchronization (`conf_mutex`, `udev-\u003estate`), and lifecycle/cleanup during disconnect or shutdown. These failure modes (use-after-free, double free, locking deadlocks) are already covered by KASAN and LOCKDEP in standard test runs.\n- KMSAN is not required as there are no uninitialized memory reads or information leak risks introduced.",
  "NeedsKMSAN": false
}

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)