All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Mehmet Fide <mehmet.fide@gmail.com>
Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	mehmet.fide@screeningeagle.com
Subject: Re: [PATCH ath-current 1/2] wifi: ath9k_htc: do not start ANI before the first channel is set
Date: Mon, 19 Oct 2026 22:42:40 +0200	[thread overview]
Message-ID: <87jyndv2v3.fsf@toke.dk> (raw)
In-Reply-To: <20261005072209.4101009-2-mehmet.fide@gmail.com>

Mehmet Fide <mehmet.fide@gmail.com> writes:

> From: Mehmet Fide <mehmet.fide@screeningeagle.com>
>
> 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 <mehmet.fide@screeningeagle.com>

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>

  reply	other threads:[~2026-10-19 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  7:22 [PATCH ath-current 0/2] wifi: ath9k_htc: start ANI for an AP interface at the right time Mehmet Fide
2026-10-05  7:22 ` [PATCH ath-current 1/2] wifi: ath9k_htc: do not start ANI before the first channel is set Mehmet Fide
2026-10-19 20:42   ` Toke Høiland-Jørgensen [this message]
2026-10-05  7:22 ` [PATCH ath-current 2/2] wifi: ath9k_htc: start ANI when an AP interface begins to beacon Mehmet Fide
2026-10-19 20:42   ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jyndv2v3.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mehmet.fide@gmail.com \
    --cc=mehmet.fide@screeningeagle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.