All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stf_xl@wp.pl>
To: "Марков Михаил Александрович" <markov.mikhail@itmh.ru>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Helmut Schaa <helmut.schaa@googlemail.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	"\"David S. Miller\"" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"illumin@yandex.ru" <illumin@yandex.ru>
Subject: Re: [PATCH] rt2x00: save survey for every channel visited
Date: Tue, 20 Oct 2020 09:12:43 +0200	[thread overview]
Message-ID: <20201020071243.GA302394@wp.pl> (raw)
In-Reply-To: <1603134408870.78805@itmh.ru>

On Mon, Oct 19, 2020 at 07:06:47PM +0000, Марков Михаил Александрович wrote:
> rt2800 only gives you survey for current channel.
<snip>
>      .watchdog        = rt2800_watchdog,
> +    .update_survey        = rt2800_update_survey,

Since this feature is rt2800 specific, I would do not add new generic
callback. It could be fully done in rt2800* code, i.e ...

> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> index 8c6d3099b19d..8eff57132154 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> @@ -1026,6 +1026,12 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
>      if (!rates)
>          goto exit_free_channels;
> 
> +    rt2x00dev->chan_survey =
> +        kcalloc(spec->num_channels, sizeof(struct rt2x00_chan_survey),
> +            GFP_KERNEL);
> +    if (!rt2x00dev->chan_survey)
> +        goto exit_free_rates;
... this could be placed in rt2800_probe_hw_mode() just after
channel info array allocation ... 

> @@ -316,6 +316,15 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
>      if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
>          return 0;
> 
> +    /*
> +     * To provide correct survey data for survey-based ACS algorithm
> +     * we have to save survey data for current channel before switching.
> +     */
> +    if (rt2x00dev->ops->lib->update_survey &&
> +        (changed & IEEE80211_CONF_CHANGE_CHANNEL)) {
... and this in rt2800_config()

Thanks
Stanislaw

       reply	other threads:[~2020-10-20  7:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1603134408870.78805@itmh.ru>
2020-10-20  7:12 ` Stanislaw Gruszka [this message]
2020-10-20 19:43   ` [PATCH v2] rt2x00: save survey for every channel visited Марков Михаил Александрович
2020-10-21  7:40     ` Stanislaw Gruszka
     [not found]     ` <871rhbpw8b.fsf@codeaurora.org>
2020-11-04 11:47       ` Stanislaw Gruszka

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=20201020071243.GA302394@wp.pl \
    --to=stf_xl@wp.pl \
    --cc=davem@davemloft.net \
    --cc=helmut.schaa@googlemail.com \
    --cc=illumin@yandex.ru \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=markov.mikhail@itmh.ru \
    --cc=netdev@vger.kernel.org \
    /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.