All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: "Denis Kenzior" <denkenz@gmail.com>,
	"Jonas Große Sundrup" <cherti-iwd@letopolis.de>,
	iwd@lists.linux.dev
Subject: Re: Force use of 5GHz band
Date: Fri, 15 Sep 2023 10:36:19 -0700	[thread overview]
Message-ID: <e144f8a4-82b2-4882-bf25-5fac6165b9af@gmail.com> (raw)
In-Reply-To: <42efcf9a-6aca-c728-ba9d-fe95a6066900@gmail.com>

Hi Denis,

On 9/15/23 7:47 AM, Denis Kenzior wrote:
> Hi James,
> 
>>> Careful about using high factors like this.  Right now the rank is 
>>> computed using a double, but truncated to a uint32_t and clamped to 
>>> USHRT_MAX / uint16_t.  This works fine, but the FT roaming 
>>> calculation is a bit more careless.  Could lead to very funny results.
>>
>> I don't think FT uses that ranking factor, but either way yes some 
>> huge factor like that shouldn't be needed.
>>
> 
> Right, but it uses another factor and truncates to a uint16_t.  So if 
> you have USHRT_MAX as rank, multiply then truncate -> fun things happen.
> 
>>>
>>> We may be better off introducing 2.4GHz factor and suggesting using a 
>>> 0.0 multiplier to turn bands off.  Or add an explicit setting.
>>
>> I actually was thinking this would be nice. We actually don't even run 
>> a 2.4ghz network at all so that would reduce extra scanning cycles, 
>> even if just a couple seconds. I'll go ahead and add support for 0.0 
>> factors disabling the band, and add a 2.4 factor setting.
> 
> Excellent.

How would you prefer I do this? We've got quite a few modules using scan 
APIs so I question if we want to filter the frequencies before calling 
scan_*

If we filter in scan.c and call back as if the scan returned no results 
we shouldn't need to touch anything except scan.c. The downside is its a 
bit of wasted work doing this since we have to create requests and work 
items for nothing, but the alternative of adding this specific logic to 
each module using scan calls seems worse IMO, what do you think?

> 
> Regards,
> -Denis

  reply	other threads:[~2023-09-15 17:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 17:44 Force use of 5GHz band Jonas Große Sundrup
2023-09-14 18:06 ` James Prestwood
2023-09-14 18:13   ` Jonas Große Sundrup
2023-09-14 18:16     ` James Prestwood
2023-09-14 18:22       ` Jonas Große Sundrup
2023-09-14 18:33         ` James Prestwood
2023-09-14 18:46           ` Jonas Große Sundrup
2023-09-15 14:35             ` Denis Kenzior
2023-09-15 14:44               ` James Prestwood
2023-09-15 14:55                 ` Denis Kenzior
2023-09-15 14:30           ` Denis Kenzior
2023-09-15 14:42             ` James Prestwood
2023-09-15 14:47               ` Denis Kenzior
2023-09-15 17:36                 ` James Prestwood [this message]
2023-09-16 15:18                   ` Denis Kenzior
2023-09-19 17:29                     ` James Prestwood
2023-09-21 14:21   ` Alvin Šipraga
2023-09-21 14:50     ` James Prestwood

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=e144f8a4-82b2-4882-bf25-5fac6165b9af@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=cherti-iwd@letopolis.de \
    --cc=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.