lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d2aa2b49-f907-41e4-8208-3b92da607a34@quicinc.com>
Date: Thu, 22 May 2025 14:51:14 +0530
From: Raj Kumar Bhagat <quic_rajkbhag@...cinc.com>
To: Johannes Berg <johannes@...solutions.net>
CC: <linux-wireless@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "Aditya
 Kumar Singh" <aditya.kumar.singh@....qualcomm.com>
Subject: Re: [PATCH wireless-next 3/3] wifi: mac80211: Allow DFS/CSA on a
 radio if scan is ongoing on another radio

On 5/16/2025 1:35 PM, Johannes Berg wrote:
> 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?
> 

Next version will rename this function to "ieee80211_is_scan_ongoing()".

>> +{
>> +	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?
> 

Thanks for suggestion, will simplify the above logic in next version.

> 
>> +	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 ...
> 

Sure, will do in next version.

> 
> Also patch-order wise, it seems this one really should go before the
> 2nd?
> 

Sure will update the patch order as suggested.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ