All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 6/7] wiphy: track disabled frequencies on multiple dumps
Date: Fri, 22 Jul 2022 13:08:47 -0500	[thread overview]
Message-ID: <3e06e40c-d82d-d00a-5050-080668b68216@gmail.com> (raw)
In-Reply-To: <20220722163417.1119334-6-prestwoj@gmail.com>

Hi James,

On 7/22/22 11:34, James Prestwood wrote:
> If a frequency is disabled, it should not be added to the supported list which
> it previously was. In this case its added to the (new) disabled_freqs list.
> 
> Now that wiphy's are dumped on regulatory changes frequencies may be added or
> removed from either the supported or disabled frequency list. These changes
> are now tracked to keep the lists accurate.
> ---
>   src/wiphy.c | 35 ++++++++++++++++++++++++++++++++---
>   src/wiphy.h |  1 +
>   2 files changed, 33 insertions(+), 3 deletions(-)
> 

<snip>

> +		/*
> +		 * Wiphy is dumped again on every regulatory domain change which
> +		 * may contain disabled frequencies which were previously
> +		 * allowed. If disabled, remove from supported. If supported,
> +		 * remove from disabled.
> +		 */

I would do this differently and leave 'supported_freqs' alone and only track the 
disabled freqs.

> +		if (disabled) {
> +			scan_freq_set_add(wiphy->disabled_freqs, freq);
> +			scan_freq_set_remove(wiphy->supported_freqs, freq);
> +		} else {
> +			scan_freq_set_add(wiphy->supported_freqs, freq);
> +			scan_freq_set_remove(wiphy->disabled_freqs, freq);
> +		}

Also you can simply clear the 'disabled_freqs' set on reg change, before parsing 
the disabled flags.

Then make sure wiphy_constrain_freq_set() takes everything into account. 
Perhaps we need a new scan_freq_set_* API?


>   	}
>   }
>   

Regards,
-Denis

  reply	other threads:[~2022-07-22 18:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 16:34 [PATCH 1/7] wiphy: fix runtime error from bit shift James Prestwood
2022-07-22 16:34 ` [PATCH 2/7] scan: make scan_freq_set const in scan_passive James Prestwood
2022-07-22 16:34 ` [PATCH 3/7] util: add scan_freq_set_remove James Prestwood
2022-07-22 16:34 ` [PATCH 4/7] util: add scan_freq_set_max James Prestwood
2022-07-22 17:41   ` Denis Kenzior
2022-07-22 18:19     ` James Prestwood
2022-07-22 16:34 ` [PATCH 5/7] manager: re-dump wiphy on regulatory change James Prestwood
2022-07-22 17:38   ` Denis Kenzior
2022-07-22 18:18     ` James Prestwood
2022-07-22 16:34 ` [PATCH 6/7] wiphy: track disabled frequencies on multiple dumps James Prestwood
2022-07-22 18:08   ` Denis Kenzior [this message]
2022-07-22 16:34 ` [PATCH 7/7] station: do full passive scan if 6GHz is supported but disabled James Prestwood
2022-07-22 17:04 ` [PATCH 1/7] wiphy: fix runtime error from bit shift Denis Kenzior
2022-07-22 18:21   ` 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=3e06e40c-d82d-d00a-5050-080668b68216@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 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.