public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Cc: Keith G <ys3al35l@gmail.com>
Subject: Re: [PATCH] scan: limit COLOCATED_6GHZ flag to 6ghz devices
Date: Thu, 4 Jan 2024 12:30:24 -0800	[thread overview]
Message-ID: <d828bb81-8035-48c3-ae86-1d479bdc0fdc@gmail.com> (raw)
In-Reply-To: <4dcbc730-034a-4e3d-afb6-992cbc03a8ac@gmail.com>

Hi Denis,

On 1/4/24 10:17 AM, Denis Kenzior wrote:
> Hi James,
>
> On 1/3/24 06:56, James Prestwood wrote:
>> It was seen that this flag seems to cause issues when in AP mode on
>> brcmfmac devices (e.g. the raspberry Pi 3). When in AP mode an a
>
> Seriously?  Why would this flag do anything for non-6E devices?

No idea, I haven't had time, or the desire really to actually check the 
driver. But it was night and day in my testing. With the flag enabled a 
scan on the station interface would immediately disconnect all clients. 
Without the flag things were stable.

We can definitely hold off here, Keith is still doing some testing. Its 
not critical to anything I'm doing so I'd rather be sure it actually 
fixes the problem.

>
>> scan is issued clients will disconnect. After testing this behavior
>> was isolated to the use of the COLOCATED_6GHZ flag.
>>
>> Besides working around the problem on this specific hardware the
>> patch itself makes sense as a non-6GHz capable device shouldn't use
>> this flag anyways.
>
> I guess if you're super paranoid and don't trust the kernel to do the 
> right thing...
>
>>
>> As stated in the patch comment, this isn't really a catch all
>> workaround since the flag is still used for devices supporting 6GHz.
>> If additional hardware exhibits this behavior we may need additional
>> changes like a hardware blacklist or an explicit option to disable
>> the flag.
>>
>> Reported-By: Keith G <ys3al35l@gmail.com>
>> ---
>>   src/scan.c | 15 ++++++++++++++-
>>   1 file changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/scan.c b/src/scan.c
>> index f48ffdef..8c6fdc08 100644
>> --- a/src/scan.c
>> +++ b/src/scan.c
>> @@ -394,7 +394,20 @@ static struct l_genl_msg *scan_build_cmd(struct 
>> scan_context *sc,
>>       if (params->ap_scan)
>>           flags |= NL80211_SCAN_FLAG_AP;
>>   -    flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ;
>> +    /*
>> +     * TODO: This flag appears to cause some undesired behavior on 
>> brcmfmac
>> +     *       when the device is in AP mode, or has a secondary AP 
>> interface
>> +     *       running, causing clients to disconnect when a scan is 
>> issued.
>> +     *
>> +     *       Only using this flag for 6GHz capable devices will 
>> limit this
>> +     *       behavior to only 6GHz devices and in reality makes sense
>> +     *       because a non-6GHz device shouldn't use this flag 
>> anyways. If
>> +     *       more issues still are seen related to this we may need an
>> +     *       explicit workaround, either brcmfmac-specific or a disable
>> +     *       option.
>> +     */
>
> I'd just drop this comment entirely if you still think this is needed.
>
>> +    if (wiphy_band_is_disabled(sc->wiphy, BAND_FREQ_6_GHZ) != -ENOTSUP)
>> +        flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ;
>>         if (flags)
>>           l_genl_msg_append_attr(msg, NL80211_ATTR_SCAN_FLAGS, 4, 
>> &flags);
>
> Regards,
> -Denis

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 12:56 [PATCH] scan: limit COLOCATED_6GHZ flag to 6ghz devices James Prestwood
2024-01-03 12:58 ` James Prestwood
2024-01-03 14:57   ` KeithG
2024-01-03 15:01     ` James Prestwood
2024-01-04  2:42       ` KeithG
2024-01-04 12:54         ` James Prestwood
2024-01-04 18:17 ` Denis Kenzior
2024-01-04 20:30   ` James Prestwood [this message]

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=d828bb81-8035-48c3-ae86-1d479bdc0fdc@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    --cc=ys3al35l@gmail.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