From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.48 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795964851; b=OB2SOW5Yoh24kMqiCN6sKS9bQLsy+qbpA0d2gqaVNbTFrd4ifuPpt8gHDELLqwzVmoE8 NIsHZZXfzBlgb3qX61TcWKQ+bQqF44wyPexLCCZd7s8qGiyW9CvQyTtQdAmXcOPfDgeEY dyqPtfqNr4+SeMXuhU3S1Y3/0Rl+0TAJUR0Zwom1G7uuYw1479/fz9IUk2GP7GEYoaKzr zXeFdxSDcPO/ZHGVixTTvUY1awLuGGmTl26SJG6jAc+JIQTI1JS8+OfQ0MN49ZFi59Jns 09W3TipPqidIVyPzojfIEmREVa89hUwGQJyUUsMeMYO9xDTCLI88Ho7Ob7obFPugNkA== 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-Forwarded-Encrypted: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=44pONW7fcvCYb9NbDTsAs3m0unof+IiouGT7hXogNCfCz5VX45LoNRiqLa+ZOTBnNnsl gwm6K89I/PHcGIm7Y0p6ToTPwYaDb19UxvFwIBIwjNWu9l/n6EbyfirOB5b21pWMjh7wM /KYe+EA8THXKJ4icXR46f7rZ11cQWkQy2bbQ5iYZBss9jkp26ncy3ZJ9bzvmj3Ahr6WAA ZZ6xz+FcOEh3/RJ8dgL9wnxrgbCAuxiZlYUlR6aIqBy8SODPG+3TAp2EPPck6gv81lUhR PlaCWIV0Z7BXCmB9GJLdcVJqW06ReOUlvTsk0Jcqr7flVr6a+TbTG1cfel7EKVMgYAA== 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.48 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 E81C2606A31C for ; Sun, 29 Nov 2026 15:07:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E81C2606A31C 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, unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=Ns8zwyWL Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-6bb06dc1fffso7756721a12.3 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=juztBUkPx8w3RFsa0FwYNpzyJZS2WHNeDBOXRI5ea/Et/rP82Lt9pNMD88es2IVf5A sGAo4KfCGvPaxO30HFu8CUo2GPfzFtBl+l7/824U42csYe0mF3ChzT81/pgxwnjosoc4 bMMWx3nygz0p1L8LoFUF561mVcbArPAWu9WC/rgPX07HzZXkak9lxGLhWQhe1/se59zu E/ph+KbLqvPojMLv5CwqpYchJyWo95xM2gtqnN6HmWOT+HoKqwnU2e+SKJDl0oSwyzhA k2CDT5EPXf9M4rR8Pg/jgvY5P3vicePAau/xVs5n/jLYGV352/jk8SNhikcziZ9LMb9e D91w== X-Forwarded-Encrypted: i=1; AL+hErG0IjADjw3aSB9H9hPI+q2uXDviT5KyZJVMG3Itkx+ggmBZyapJdt3fIOmDUKuFJVNcFnEBQdBWH9mSZ3Y=@vger.kernel.org X-Gm-Message-State: APuU4Z+GoTQ5CuN062tnVgT9N6z2fPgjSMN/+hZOSbjKtfS0/jNi1aYg PFXjYtwtYdorLCUuQ3htJ9UZ2ZaTZnhhTzA5V48wmBjr0XAkG4cUTF1MzRpfpZEH0Uc= X-Gm-Gg: AZFdTZfaKnNMdRP4oPJS0vpW150rRLXZF3uB9Yh/vHebNEmVjjf5NvC3CkI86ra/aRT TJN3K+wNWmqrpU/JfyKYVgGE3EEAvLyHBC8zdTovrKEiyXbbZv18PLqtXDIAoJFmGcc2IsY5yE9 Wx33fvx5ITlfzWVUCu0cdCcIC50NEfe6WKxxXh2WvmqRfXAv7cQSi0tRlBFQiFLG0dtCX1V8FjK Dy6kqKE431q0ZTsFo2J4T+sy4RUWZice5OyVgMyjtpb/ydryrnv68xV+s+DfddHnOFro/Sit+V7 fnrc6kI89QjUrI+JZgJ+GJr2Vz0gBtqPk6dJ6niM5JUyzCuy1hijamwePUd52u1zj9NeyLB1nmB /3X9miiasxjZTVd0jH/M6Sgpvk50Lt3Op0NVQ2pFH7lnaDQetMDc3y2PRD9hpOHj059t8MeUolk TcmEEae07i9GrlKhENnKzSwPYBhOhQnloLXq2SZGKQXAIvRrSD2KCRN9VEa53fn5JOjH4/xL29h kpn3rrtaBQo0sKTEZp2TWdT1cbp9q1tdxLgggLEG49YYV2IZ28tHEaTja/o1EeFGkY4Z1DtUE/r XuFEO2M8fIrmhXtP52Op1yJy6Y+zvGeTrU8MTPqgnXKf21T3VcbUWSoqQPMvV59PSai+ihH6GoE oInHlC1rvXe/FmDl880ZWzN5IA5xLKzzjW6myv/4ncU8zzdK60Suo 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-kernel@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