All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Johnson <mjohnson459@gmail.com>
To: iwd@lists.01.org
Subject: Bug with RoamThreshold5G
Date: Mon, 12 Jul 2021 14:17:01 +0100	[thread overview]
Message-ID: <CACsRnHXxRm=yNaPBzwGKkymvv9H3PDHfwGKbJnDc5VYcV0d=6w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

Hi everyone,

I noticed that iwd wasn't roaming as much as I would expect given a
modified RoamTheshold5G
value. Looking into it, it seems like when the threshold is registered
for updates in
netdev_build_cmd_cqm_rssi_update we always use RoamThreshold. When
this bit of code is
called the frequency seems to always be 0 and so the non-5G variant is
used. This in turn becomes an issue once the frequency is set and the
correct threshold is used for other checks (at least if
RoamThreshold5G is configured higher than RoamThreshold).

Code:
netdev_build_cmd_cqm_rssi_update(...)
    int threshold = netdev->frequency > 4000 ? LOW_SIGNAL_THRESHOLD_5GHZ :

   LOW_SIGNAL_THRESHOLD;
    l_debug("frequency: %u, threshold: %d", netdev->frequency,
threshold); // added for debug

Config:
[General]
EnableNetworkConfiguration=true
RoamThreshold=-60
RoamThreshold5G=-65

Output:
src/netdev.c:netdev_build_cmd_cqm_rssi_update() frequency: 0, threshold: -60

I'm not really sure what the right fix for this is. Can it just
request notifications for both
thresholds?

Regards,
Michael

             reply	other threads:[~2021-07-12 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 13:17 Michael Johnson [this message]
2021-07-12 16:22 ` Bug with RoamThreshold5G Denis Kenzior

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='CACsRnHXxRm=yNaPBzwGKkymvv9H3PDHfwGKbJnDc5VYcV0d=6w@mail.gmail.com' \
    --to=mjohnson459@gmail.com \
    --cc=iwd@lists.01.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.