From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795964851; b=wntnH4yKb5Cax+NsAwz5QZHnzPZrWlU7nk0mUtAxdNzTJCrIRAhk5hgM9K/BtzaiWPL7 ZQNvwLmKkRhg49C11p28b5Jusxxg2k60K3aAnTzxmYu7Tvpywloon37ud4AUhVljkzVUo aoHWcnNse9U8CmG4a6FDHwk6xESM77Lf5YSLh7EvX0gpm8KF+sLZe3zgUhRFvQ0h08+CW 3W34HFmwfjXxETeP12xxKpWHKa8dTnEPTPNnRvgDs/3gOpPla9C0aqOlu1CLzQteKRwy/ 1IffXXy9dib+VlMVXdfob3quPp17tYWGfOCDpeQ/9h7lxJZKEDz5zcTA+01hJDD8sFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795964851; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=iY44dM5zI8wkb5iJPUFIUV71MkLpZlMd2kP3aO5cj8g=; b=2P6A0oP5RmOcT9FbLyTvycIgjmlTejf7gNvOwc6bddP0Sva9LgIf/SuPLcureq3NzNww YvpDLx1DxasPbP+s2jc3wZjBN4chYNYvUhRWNgOIF9kT4cZvDDUiuTNElzhp4+O0EK7mk 35iAOtwaVvPycAiCZyqliLjHFhWubujALDuxmBXEq9d201g2W7yYAc9nUZV4w2H1176L/ zS0rQRx6zMXkFoDfiBBEDIlr4cVDOUR87OzTtuKEC31B653zGl8j/9/KkalWmznujV+pN 1ocuzHrDtOk4tHMWgjDp/hemHL2CHhVKk6+/leR1LIvSl9we+PAe+14TxQpI86gZk2Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=Ns8zwyWL; arc=none smtp.remote-ip=209.85.208.44 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB463606A323 for ; Sun, 29 Nov 2026 15:07:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EB463606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=Ns8zwyWL Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-6b87a240de3so12022688a12.1 for ; Sun, 29 Nov 2026 07:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1795964849; x=1796569649; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=iY44dM5zI8wkb5iJPUFIUV71MkLpZlMd2kP3aO5cj8g=; b=Ns8zwyWLOuek5+4XO/NzSwdFcRi8swAcwUBB6PdQT1ZdsmwndzkFGkRvnD6UX0oFZd afNkmH9ujzLptULB/+dnv9EOkiHgsF5I4wHTYBSjQo4wBYHTcSY2yZsh2lvEAyE9UpwS m5i13nBLOknNowXq2yL3H1buJX5mO7mRbVs5c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795964849; x=1796569649; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=iY44dM5zI8wkb5iJPUFIUV71MkLpZlMd2kP3aO5cj8g=; b=e4BY82rxY6sP8Ptzjz8deXNOpDA6wFEmcHw/gXGcgqSJxagR/lwdiHel9+I/9bInK3 E+LW7LX2TIBqJnATUASZRisl7z89klfXyimeFCVrEfBEjcOq1ge1XNOx90tiN9vHVco1 a2ZwVQNBaI8VLf+A8qYzw1fDR1g01SNUoeWw70lbR3MnZ0XHbvjB2GOkpQYYUpQOtp86 unGGrj7Ub90Ci858X6O2a619jzRsVt3S1Y/PGiCbMx+BS5ALGZeXUeUrgfrEU7YyRXgX CJBREbzIplWJy0gCHBBmWHiuU227ksorYL+srgUD0CZrb5rKu7S2aWNn4lSYsC/sqWiG YpFQ== X-Gm-Message-State: APuU4Z8V6BWXKMYuPKUic779AfHug+H73sXIa77m1AtDz06qBfRSgVaq c5cevFDVadjgQYZCurPyTxEO3uvVrC3+IpDhQPPpFTV46Az5+o2bWhW56aUFFEws+4A= X-Gm-Gg: AZFdTZesi2prTbrVegnVhroCBWDVjOk3RUnMqsV0ncoJyj/ULlHQKm06wd9fLoCKffN y5IuldvZrRrNXNu5rI6atPvklmSb6KsVz9X/PuyxFOlrpLhLU/Ak1bbfRXg22EMCqYKzShIixm3 k4tVqnkoNgC9L9lzBm+EvsRVbqfkL1qU+/SgUEavxfMOHujB1o2NHzXFEYdBsoro7UYv00ICZGI Pn3+BKGXJXV2M1F6K/0apDPJiON7w6ofq+WQraodfUwBR1s2HJRw5CfbKztQzFlofIQRgrSAIGV QTcDG4xKdTiM7iXmm64bpt48pFRd1qaEaFtLg03H+Bzb846t06YJdKrxRRmeK9g1utXbsKupBX9 HuyLKMlB95CBda8xFv9IilBpmDEhxqByYmJrL5i2fx2X7k5NSw+Yc9OVoLNtyOz+ycwXJpSJhIP M4T/PW98KurOGrbT4Jv81TS2lhLOgRxHjAupOR6GW1sSTKoeGI66hVufxbvslgkVC6ZmGUoWVzt ywXIXWb8tmrqBJEIaPCNO95cDFjvd4LsRtQRBXCazkENRWRu84krdt9S123OUSAQqRwk/0nIFRn gndbhN5nEz66/EVsImCD0CF0SISGhZGoKAJY2GQnlIZwf/xeGJVQzG6nFSeBavNmeA5+tt4ZASV QjMYuQJ3cCXLvGUwjz4iJyIVEG+pUPpvcV+7F2WXLz6z9dkJ9JUyN X-Received: by 2002:a05:6402:1ecf:b0:6b1:a86c:7b with SMTP id 4fb4d7f45d1cf-6ba37ea0b70mr20787409a12.36.1795964849074; Sun, 29 Nov 2026 07:07:29 -0800 (PST) Received: from panicking.amarulasolutions.com (mob-5-91-85-247.net.vodafone.it. [5.91.85.247]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6ba37109b55sm12774908a12.32.2026.11.29.07.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 07:07:28 -0800 (PST) From: Michael Trimarchi To: Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com Subject: [PATCH v2] wifi: ath11k: Prevent sending WMI commands to firmware during firmware crash Date: Sun, 29 Nov 2026 16:07:24 +0100 Message-ID: <20261129150724.869314-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Set the ATH11K_FLAG_CRASH_FLUSH and ATH11K_FLAG_RECOVERY flags when the host driver receives the firmware crash notification from MHI. This prevents sending WMI commands to the firmware during recovery. We want to prevent the laptop from freezing or becoming extremely slow when its firmware repeatedly crashes while attempting to connect to a known Wi-Fi network. This often happens with routers that intermittently fail to reconnect until the access point is reset. While this solution doesn't fix the underlying router issue, it would allow the laptop to select a different Wi-Fi network and significant performance degradation during the recovery process. [75795.712161] ath11k_pci 0000:02:00.0: firmware crashed: MHI_CB_EE_RDDM [75797.738073] ath11k_pci 0000:02:00.0: wmi command 262145 timeout [75797.738090] ath11k_pci 0000:02:00.0: Failed to send WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID [75797.738101] ath11k_pci 0000:02:00.0: failed to set vdev 0 OBSS PD parameters: -11 [75800.746321] ath11k_pci 0000:02:00.0: wmi command 20488 timeout [75800.746344] ath11k_pci 0000:02:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID [75800.746358] ath11k_pci 0000:02:00.0: failed to set vdev 0 dtim policy: -11 [75803.754345] ath11k_pci 0000:02:00.0: wmi command 237571 timeout [75803.754360] ath11k_pci 0000:02:00.0: failed to send WMI_11D_SCAN_STOP_CMDID: -11 [75803.754371] ath11k_pci 0000:02:00.0: failed to stopt 11d scan vdev 0 ret: -11 [75806.762259] ath11k_pci 0000:02:00.0: wmi command 28684 timeout [75806.762281] ath11k_pci 0000:02:00.0: Failed to send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID [75806.762294] ath11k_pci 0000:02:00.0: failed to enable bss color change on vdev 0: -11 [75809.770916] ath11k_pci 0000:02:00.0: wmi command 172035 timeout [75809.770930] ath11k_pci 0000:02:00.0: Failed to send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID [75809.770938] ath11k_pci 0000:02:00.0: failed to set bss color collision on vdev 0: -11 [75809.770966] wlp2s0: associated [75809.771051] wlp2s0: deauthenticating from a0:95:7f:45:e8:47 by local choice (Reason: 3=DEAUTH_LEAVING) [75809.782908] ieee80211 phy0: Hardware restart was requested [75809.782932] ath11k_pci 0000:02:00.0: failed to lookup peer a0:95:7f:45:e8:47 on vdev 0 [75812.842136] ath11k_pci 0000:02:00.0: wmi command 20488 timeout [75812.842153] ath11k_pci 0000:02:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID [75812.842164] ath11k_pci 0000:02:00.0: Failed to set CTS prot for VDEV: 0 [75815.850227] ath11k_pci 0000:02:00.0: wmi command 20488 timeout Signed-off-by: Michael Trimarchi --- Changes in v2: - Rebased on top of mainline (base-commit 4f069ab1ec243). The RDDM handler now serializes the UNREGISTERING check and queue_work() with ab->base_lock, so the CRASH_FLUSH/RECOVERY updates happen inside the locked section. - No functional change. - Link to v1: https://patchwork.amarulasolutions.com/project/linux-amarula/patch/20250612061619.22094-1-michael@amarulasolutions.com/ drivers/net/wireless/ath/ath11k/mhi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c index a6c9ff112c68f..70680bc40fc44 100644 --- a/drivers/net/wireless/ath/ath11k/mhi.c +++ b/drivers/net/wireless/ath/ath11k/mhi.c @@ -283,8 +283,11 @@ static void ath11k_mhi_op_status_cb(struct mhi_controller *mhi_cntrl, } spin_lock_bh(&ab->base_lock); - if (!(test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags))) + if (!(test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags))) { + set_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags); + set_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags); queue_work(ab->workqueue_aux, &ab->reset_work); + } spin_unlock_bh(&ab->base_lock); break; -- 2.53.0 base-commit: 4f069ab1ec243e6b60dc438772905855c60774e8 branch: ath11k-wmi-crash-flush-mainline