linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Cc: <ath12k@lists.infradead.org>,  <linux-wireless@vger.kernel.org>,
	 Sriram R <quic_srirrama@quicinc.com>
Subject: Re: [PATCH v2 03/12] wifi: ath12k: modify ath12k mac start/stop ops for single wiphy
Date: Fri, 16 Feb 2024 18:35:41 +0200	[thread overview]
Message-ID: <8734tsnz8i.fsf@kernel.org> (raw)
In-Reply-To: <20240206091954.4144454-4-quic_ramess@quicinc.com> (Rameshkumar Sundaram's message of "Tue, 6 Feb 2024 14:49:45 +0530")

Rameshkumar Sundaram <quic_ramess@quicinc.com> writes:

> From: Sriram R <quic_srirrama@quicinc.com>
>
> When mac80211 does drv start/stop, apply the state change
> for all the radios within the wiphy in ath12k.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>

I haven't reviewed the patchset fully yet, first quick impressions:

> +static void ath12k_drain_tx(struct ath12k_hw *ah)
> +{
> +	int i;
> +	struct ath12k *ar;

We usually try to have reverse xmas style, of course not always possible
but here it is.

> +	ar = ah->radio;
> +
> +	for (i = 0; i < ah->num_radio; i++) {
> +		ath12k_mac_drain_tx(ar);
> +		ar++;
> +	}
> +}

Please avoid pointer arithmetic (in this case 'ar++') as much as
possible, it's just so easy to shoot yourself in the foot. In patch 1
you add ath12k_ah_to_ar(), why not use it?

And I see this pattern quite a lot, should we have
ath12k_for_each_radio() or something like that? Or did I see that macro
in some patch already?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2024-02-16 16:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06  9:19 [PATCH v2 00/12] wifi: ath12k: Add single wiphy support Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 01/12] wifi: ath12k: add multiple radio support in a single MAC HW un/register Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 02/12] wifi: ath12k: Modify add and remove chanctx ops for single wiphy support Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 03/12] wifi: ath12k: modify ath12k mac start/stop ops for single wiphy Rameshkumar Sundaram
2024-02-16 16:35   ` Kalle Valo [this message]
2024-02-16 16:45     ` Jeff Johnson
2024-02-16 17:02       ` Kalle Valo
2024-02-20 11:29     ` Rameshkumar Sundaram (QUIC)
2024-02-06  9:19 ` [PATCH v2 04/12] wifi: ath12k: vdev statemachine changes " Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 05/12] wifi: ath12k: scan " Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 06/12] wifi: ath12k: fetch correct radio based on vdev status Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 07/12] wifi: ath12k: Cache vdev configs before vdev create Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 08/12] wifi: ath12k: Add additional checks for vif and sta iterators Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 09/12] wifi: ath12k: modify regulatory support for single wiphy architecture Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 10/12] wifi: ath12k: Modify set and get antenna mac ops for single wiphy Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 11/12] wifi: ath12k: Modify rts threshold mac op " Rameshkumar Sundaram
2024-02-06  9:19 ` [PATCH v2 12/12] wifi: ath12k: support get_survey " Rameshkumar Sundaram

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=8734tsnz8i.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_ramess@quicinc.com \
    --cc=quic_srirrama@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 NNTP newsgroup(s).