Linux-Wireless Archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>,
	<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] wifi: ath12k: Refactor the hardware recovery procedure
Date: Wed, 24 Apr 2024 13:20:24 -0700	[thread overview]
Message-ID: <7813db11-2445-4af3-910f-f3232af873aa@quicinc.com> (raw)
In-Reply-To: <20240424065646.1666166-2-quic_periyasa@quicinc.com>

On 4/23/2024 11:56 PM, Karthikeyan Periyasamy wrote:
> Currently, in multi-wiphy models, the recovery handler access mac80211
> HW from the radio/link structure. This will be incorrect for single wiphy
> model, as they will hold multiple link/radio structures. To fix this,
> access mac80211 HW based on the number of hardware in the SoC/chip. This
> approach makes the recovery handler compatible with both multi wiphy and
> single wiphy models.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
[...]
> @@ -1006,35 +1005,34 @@ static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab)
>  		set_bit(ATH12K_FLAG_CRASH_FLUSH, &ab->dev_flags);
>  
>  	for (i = 0; i < ab->num_hw; i++) {
> -		if (!ab->ah[i])
> +		ah = ab->ah[i];
> +		if (!ah)
>  			continue;
>  
> -		ah = ab->ah[i];
>  		ieee80211_stop_queues(ah->hw);
> -	}
>  
> -	for (i = 0; i < ab->num_radios; i++) {
> -		pdev = &ab->pdevs[i];
> -		ar = pdev->ar;
> -		if (!ar || ar->state == ATH12K_STATE_OFF)
> -			continue;
> +		for (j = 0; j < ah->num_radio; j++) {
> +			ar = &ah->radio[j];
> +			if (!ar || ar->state == ATH12K_STATE_OFF)

remove !ar test, result of & operation can't be NULL

> +				continue;


  reply	other threads:[~2024-04-24 20:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  6:56 [PATCH v2 0/3] wifi: ath12k: Refactor the hardware recovery procedures Karthikeyan Periyasamy
2024-04-24  6:56 ` [PATCH v2 1/3] wifi: ath12k: Refactor the hardware recovery procedure Karthikeyan Periyasamy
2024-04-24 20:20   ` Jeff Johnson [this message]
2024-04-25  6:26     ` Karthikeyan Periyasamy
2024-04-24  6:56 ` [PATCH v2 2/3] wifi: ath12k: Refactor the hardware state Karthikeyan Periyasamy
2024-04-24  6:56 ` [PATCH v2 3/3] wifi: ath12k: Add lock to protect " Karthikeyan Periyasamy
2024-04-24  7:28   ` Johannes Berg
2024-04-24  9:39     ` Kalle Valo
2024-04-24  9:43       ` Johannes Berg
2024-04-24  9:50         ` Kalle Valo
2024-04-24  9:52           ` Johannes Berg
2024-04-24 12:16             ` Kalle Valo
2024-04-24 20:41   ` Jeff Johnson
2024-04-25  6:58     ` Karthikeyan Periyasamy

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=7813db11-2445-4af3-910f-f3232af873aa@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_periyasa@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).