All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug with RoamThreshold5G
@ 2021-07-12 13:17 Michael Johnson
  2021-07-12 16:22 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Johnson @ 2021-07-12 13:17 UTC (permalink / raw)
  To: iwd

[-- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug with RoamThreshold5G
  2021-07-12 13:17 Bug with RoamThreshold5G Michael Johnson
@ 2021-07-12 16:22 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-07-12 16:22 UTC (permalink / raw)
  To: iwd

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

Hi Michael,

On 7/12/21 8:17 AM, Michael Johnson wrote:
> 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
> 

Yep, seems we forgot to invoke netdev_cqm_rssi_update() in 
netdev_connect/netdev_reassociate/netdev_fast_transition*

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

Probably not.  If the driver doesn't support NL80211_EXT_FEATURE_CQM_RSSI_LIST, 
then we can only set a single threshold and we want that to be the roaming 
threshold.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-12 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 13:17 Bug with RoamThreshold5G Michael Johnson
2021-07-12 16:22 ` Denis Kenzior

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.