From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH v3 1/4] network: add network_update_known_frequencies
Date: Mon, 29 Jan 2024 20:54:33 -0600 [thread overview]
Message-ID: <6fc2ba34-e9fe-4d91-9709-1e9233903c4f@gmail.com> (raw)
In-Reply-To: <20240126202243.91947-1-prestwoj@gmail.com>
Hi James,
On 1/26/24 14:22, James Prestwood wrote:
> In order to support an ordered list of known frequencies the list
> should be in order of last seen BSS frequencies with the highest
> ranked ones first. To accomplish this without adding a lot of
> complexity the frequencies can be pushed into the list as long as
> they are pushed in reverse rank order (lowest rank first, highest
> last). This ensures that very high ranked BSS's will always get
> superseded by subsequent scans if not seen.
>
> This adds a new network API to update the known frequency list
> based on the current newtork->bss_list. This assumes that station
> always wipes the BSS list on scans and populates with only fresh
Sort of. Strictly speaking it takes the frequencies scanned into account. So
for example if we scan only certain 2.4GHz channels (say through DBus Scan API),
then only BSSes within that frequency set will be updated. However, such scans
are initiated one-after-the-other, so it is probably okay in this case.
One thing you might have to be careful of is limited scans due to roaming logic.
But I think this series is good enough for now.
> BSS entries. After the scan this API can be called and it will
> reverse the list, then add each frequency.
> ---
> src/network.c | 40 ++++++++++++++++++++++++++++------------
> src/network.h | 2 ++
> 2 files changed, 30 insertions(+), 12 deletions(-)
>
> v4:
> * Added an API to do the insertion once all the BSS's have been added
> to the network object.
> * I'm also ok adding something to ELL like:
> l_queue_new_reverse(list);
Given the sizes of our queues, it might be faster to reverse it twice than
re-allocate / free one. Might even be a good candidate for l_newa() if you can
keep a known bound on the number of entries.
>
> The current reverse is in-place, so I cant really use it unless I
> wanted to reverse twice to get it back to decending order.
>
<snip>
> bool network_bss_add(struct network *network, struct scan_bss *bss)
> {
> if (!l_queue_insert(network->bss_list, bss, scan_bss_rank_compare,
> NULL))
> return false;
>
> - if (network->info)
> - known_network_add_frequency(network->info, bss->frequency);
> -
> /* Done if BSS is not HS20 or we already have network_info set */
> if (!bss->hs20_capable)
> return true;
This part looked like it belong with patch 2, so I moved it there.
All patches applied, thanks.
Regards,
-Denis
next prev parent reply other threads:[~2024-01-30 2:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 20:22 [PATCH v3 1/4] network: add network_update_known_frequencies James Prestwood
2024-01-26 20:22 ` [PATCH v3 2/4] station: use network_update_known_frequencies James Prestwood
2024-01-26 20:22 ` [PATCH v3 3/4] station: knownnetworks: limit quick scans to 5 freqs per network James Prestwood
2024-01-26 20:22 ` [PATCH v3 4/4] auto-t: add test for known frequency sorting/maximum James Prestwood
2024-01-30 2:54 ` Denis Kenzior [this message]
2024-01-30 12:30 ` [PATCH v3 1/4] network: add network_update_known_frequencies 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=6fc2ba34-e9fe-4d91-9709-1e9233903c4f@gmail.com \
--to=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
--cc=prestwoj@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