From: Johannes Berg <johannes@sipsolutions.net>
To: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Subject: Re: [PATCH wireless-next 3/3] wifi: mac80211: Allow DFS/CSA on a radio if scan is ongoing on another radio
Date: Fri, 16 May 2025 10:05:34 +0200 [thread overview]
Message-ID: <fb6cb470c66e215c0fde3652c1986d604731ac94.camel@sipsolutions.net> (raw)
In-Reply-To: <20250514-mlo-dfs-acs-v1-3-74e42a5583c6@quicinc.com>
On Wed, 2025-05-14 at 16:58 +0530, Raj Kumar Bhagat wrote:
>
> +static bool
> +__ieee80211_is_scan_ongoing(struct wiphy *wiphy,
> + struct ieee80211_local *local,
> + struct cfg80211_chan_def *chandef)
Any particular reason or the __ name? We usually have that for internal
locking-related things, but here doesn't matter, and there's no non-__
version either?
> +{
> + struct cfg80211_scan_request *scan_req;
> + int chan_radio_idx, req_radio_idx;
> + struct ieee80211_roc_work *roc;
> + bool ret = false;
> +
> + if (!list_empty(&local->roc_list) || local->scanning)
> + ret = true;
> +
> + if (wiphy->n_radio < 2)
> + return ret;
> +
> + /*
> + * Multiple HWs are grouped under same wiphy. If not scanning then
> + * return now itself
> + */
> + if (!ret)
> + return ret;
I don't fully understand this logic, and certainly not the comment. You
can certainly "return false" here anyway or something. And initialize
ret = list_empty || scanning or something, the whole thing is hard to
follow?
> + if (!list_empty(&local->roc_list)) {
> + list_for_each_entry(roc, &local->roc_list, list) {
There's no point in checking first before iterating, it's perfectly fine
to iterate an empty list and do nothing while doing so ...
Also patch-order wise, it seems this one really should go before the
2nd?
johannes
next prev parent reply other threads:[~2025-05-16 8:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 11:28 [PATCH wireless-next 0/3] wifi: cfg80211/mac80211: Handle simultaneous scan and DFS operations on different radios Raj Kumar Bhagat
2025-05-14 11:28 ` [PATCH wireless-next 1/3] wifi: cfg80211: Add utility API to get radio index from channel Raj Kumar Bhagat
2025-05-16 7:51 ` Johannes Berg
2025-05-16 7:52 ` Johannes Berg
2025-05-22 9:20 ` Raj Kumar Bhagat
2025-05-14 11:28 ` [PATCH wireless-next 2/3] wifi: mac80211: Allow scan on a radio while operating on DFS on another radio Raj Kumar Bhagat
2025-05-16 8:01 ` Johannes Berg
2025-05-22 10:40 ` Raj Kumar Bhagat
2025-05-22 11:23 ` Johannes Berg
2025-05-27 6:49 ` Raj Kumar Bhagat
2025-05-14 11:28 ` [PATCH wireless-next 3/3] wifi: mac80211: Allow DFS/CSA on a radio if scan is ongoing " Raj Kumar Bhagat
2025-05-16 8:05 ` Johannes Berg [this message]
2025-05-22 9:21 ` Raj Kumar Bhagat
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=fb6cb470c66e215c0fde3652c1986d604731ac94.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=aditya.kumar.singh@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_rajkbhag@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
all inboxes | Powered by JetHome®