public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH v3 3/3] netdev: fall back to RSSI polling if SET_CQM fails
Date: Tue, 3 Sep 2024 10:15:38 -0500	[thread overview]
Message-ID: <810c7737-2a26-4296-9ace-55b8d767cea8@gmail.com> (raw)
In-Reply-To: <20240829114102.56284-3-prestwoj@gmail.com>

Hi James,

On 8/29/24 6:41 AM, James Prestwood wrote:
> Some drivers fail to set a CQM threshold and report not supported.
> Its unclear exactly why but if this happens roaming is effectively
> broken.
> 
> To work around this enable RSSI polling if -ENOTSUP is returned.
> The polling callback has been changed to emit the HIGH/LOW signal
> threshold events instead of just the RSSI level index, just as if
> a CQM event came from the kernel.
> ---
>   src/netdev.c | 142 ++++++++++++++++++++++++++++++++++-----------------
>   1 file changed, 94 insertions(+), 48 deletions(-)
> 
> v3:
>   * Rebaed on top of upstream
> 

<snip>

> @@ -3672,7 +3718,7 @@ static int netdev_cqm_rssi_update(struct netdev *netdev)
>   		return -EINVAL;
>   
>   	if (!l_genl_family_send(nl80211, msg, netdev_cmd_set_cqm_cb,
> -				NULL, NULL)) {
> +				netdev, NULL)) {
>   		l_genl_msg_unref(msg);
>   		return -EIO;
>   	}
> @@ -5310,7 +5356,7 @@ int netdev_set_rssi_report_levels(struct netdev *netdev, const int8_t *levels,
>   		return -EINVAL;
>   
>   	if (!l_genl_family_send(nl80211, cmd_set_cqm, netdev_cmd_set_cqm_cb,
> -				NULL, NULL)) {
> +				netdev, NULL)) {
>   		l_genl_msg_unref(cmd_set_cqm);
>   		return -EIO;
>   	}

Since userdata is now used in these l_genl_family_send callbacks, you really 
should track the command id in case netdev gets removed.  Alternatively, switch 
netdev to start using a dedicated l_genl_family handle so that all outstanding 
requests get auto-canceled.

Regards,
-Denis

  reply	other threads:[~2024-09-03 15:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 11:41 [PATCH v3 1/3] wiphy: add flag for supporting remain on channel James Prestwood
2024-08-29 11:41 ` [PATCH v3 2/3] station: don't allow FT-over-Air without offchannel support James Prestwood
2024-08-29 11:41 ` [PATCH v3 3/3] netdev: fall back to RSSI polling if SET_CQM fails James Prestwood
2024-09-03 15:15   ` Denis Kenzior [this message]
2024-09-03 15:11 ` [PATCH v3 1/3] wiphy: add flag for supporting remain on channel 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=810c7737-2a26-4296-9ace-55b8d767cea8@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