From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388359; b=Wqg9hgsCvkvZ2vC4hFMsSDbfw+WJf+HD1xuzbiqY2NIA/ksn+DmU0P6vzjGdBkjWCtca 18g3dChemmdPW0TAbPGiXJ6pRQ9GxI6yHU6uzvWorEsjE7vM5SpAIBXI1+Du41+R8cW7M d6Uu3hnh5Rl6GTjuXNGiC8jD21r/MwiTdfEmFgywrp+fut+i0OpuWWJkfWg2LrlE/5uv/ YCcHvz7heNDlENSupMZXMRv4/bRhJZM0imT9AFSTjNdnbaDqpiB1vyb4zGa7LrLaDfjrx PTgDdDfx6qbRxmApGgKX+brvXT7FpBvkiS7L1NSaDS9bJj/zc4QuLi1DZ2ptnAoNmxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388359; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=UI2k7Y3k9a9XAtl1kMqaMMLbWAtr/4jHoo+i6KTqJHw=; b=TfB55as2FXWA47hky5S6Z3p1d1BSruxrCAWLddXHAX9+QE54oDwCC5lJKLCqvNG9U+hZ DXUg/v+StXci3HR0Hjio1Frb+q/nb0wHZUjcScJg7HyGaU2x8cFGLFEc8HPtGW9HwUn5F z3CQKxUVQ3waRzPicMBkNSlJJYr3ZMue7MwYgVJhx2doc3RxOOiv3k7B1AXE3pw/P48tQ coM5B/t1aej+ot/R2KJx4FbKKrB6swPGxx59YMZ7Gl17BBx/7HuZy7tka2n1uil2O85nu TFp4inRuYHm2+5l3tyg7NNnY2xylqM7Jun9UzcWU/20X3qY2xkHMzKmshhAC1WA4f6g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="v907pNg/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC41D606A32D; Fri, 4 Dec 2026 12:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=v907pNg/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AD121F0093A; Fri, 4 Dec 2026 12:45:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388359; bh=UI2k7Y3k9a9XAtl1kMqaMMLbWAtr/4jHoo+i6KTqJHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=v907pNg/zB9fxs+YSHiAyLPLGKEfDWFdKW/l96BspA7894GRM1Y005iKehPtHleak 6oTIHjWAvYI5R4xwscqqjWt4O3WWtcQE/6nMuicXnfVieED1gpFX86/VZtbLzqpavk fcKPZAvKbtL0yj6xv9SM2whMjz7RkfqZryJHgNDo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mehmet Fide , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Jeff Johnson Subject: [PATCH 6.1 0543/1059] wifi: ath9k_htc: do not start ANI before the first channel is set Date: Fri, 4 Dec 2026 19:01:14 +0900 Message-ID: <20261204100658.266821732@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mehmet Fide commit dda63dd136ba2bc3b297079b190ac81a0aea40ae upstream. ath9k_htc_add_interface() starts ANI for the first AP interface, before any channel is configured. The per-channel calibration data only gets attached by the first ath9k_htc_set_channel() that is not a fast channel change, and that same call cancels the ANI work a few milliseconds after add_interface, so normally the work never runs. When the bring-up stalls for more than the 100 ms ANI poll interval in between, it does run, and ar9002_hw_per_calibration() records the IQ calibration result in the calibration data that does not exist yet: Unable to handle kernel NULL pointer dereference at virtual address 00000008 PC is at ar9002_hw_calibrate+0x1f8/0x570 [ath9k_hw] Workqueue: phy0 ath9k_htc_ani_work [ath9k_htc] Seen about once per thousand AP starts with an AR9271 on a Cortex-A5 board that starts hostapd while still booting; a 500 ms delay after add_interface reproduces it on every start. The crashed work never completes, so the next cancel_delayed_work_sync() blocks for good. Drop the start; it has nothing to calibrate against and is cancelled anyway. The TSF adjust bit that shared its condition is now set for every AP interface, which is harmless: the next reset applies it. The next patch starts ANI once the interface beacons. Fixes: a236254c35f0 ("ath9k_htc: Add ANI for AP mode") Cc: stable@vger.kernel.org Signed-off-by: Mehmet Fide Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20261005072209.4101009-2-mehmet.fide@gmail.com Signed-off-by: Jeff Johnson Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -1098,11 +1098,8 @@ static int ath9k_htc_add_interface(struc ath9k_htc_set_opmode(priv); - if ((priv->ah->opmode == NL80211_IFTYPE_AP) && - !test_bit(ATH_OP_ANI_RUN, &common->op_flags)) { + if (priv->ah->opmode == NL80211_IFTYPE_AP) ath9k_hw_set_tsfadjust(priv->ah, true); - ath9k_htc_start_ani(priv); - } ath_dbg(common, CONFIG, "Attach a VIF of type: %d at idx: %d\n", vif->type, avp->index);