Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 1/3] band: return -ENOTSUP when RSSI is too low for rate estimation
Date: Mon, 15 Apr 2024 12:01:39 -0700	[thread overview]
Message-ID: <8e9b5eaf-6ac2-433d-9c49-5f1fc3912924@gmail.com> (raw)
In-Reply-To: <873738bd-0761-4b0a-bbcb-cf76ea8f66e9@gmail.com>

Hi Denis,

On 4/15/24 11:47 AM, Denis Kenzior wrote:
> Hi James,
>
> On 4/15/24 10:11, James Prestwood wrote:
>> This was overlooked in a prior patch and causes the rate estimation
>> to return -ENETUNREACH if the RSSI is too low to support the
>> various capabilities. This return was unhandled and was treated as
>> if the IE was invalid which then printed a warning.
>>
>> The low RSSI case should just be ignored, similar to if the IE was
>> not provided at all. In this case return -ENOTSUP so the caller
>> moves on to the next capability set.
>
> Err, why?  Just handle the error code.

Seemed better to do this than checking for 2 return codes. And IMO "Not 
Supported" actually describes the situation better than "Network is 
unreachable".

But I don't have a strong preference either way, if you prefer checking 
both we can do that too.

>
>>
>> Note: this does result in most of the estimation functions only
>>        returning 0 or -ENOTSUP as they do little to no validation
>>        on the frame, but rather just test bits. Additional
>>        validation could be added in the future which would be
>>        handled by this patch.
>> ---
>>   src/band.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> Hmm, this set is failing CI for some reason?
Ah, good catch CI :) its because test-band was expecting -EBADMSG when 
all MCS' were unsupported. Really this is a valid IE so we shouldn't 
expect -EBADMSG there but we do. I'll have to change this, or check for 
-ENETUNREACH if we go back to that.
>
> Regards,
> -Denis

  reply	other threads:[~2024-04-15 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 15:11 [PATCH 1/3] band: return -ENOTSUP when RSSI is too low for rate estimation James Prestwood
2024-04-15 15:11 ` [PATCH 2/3] scan: replace -ENETUNREACH with -ENOTSUP for rate estimation return James Prestwood
2024-04-15 15:11 ` [PATCH 3/3] wiphy: include MAC of BSS with invalid HE capabilities James Prestwood
2024-04-15 18:47 ` [PATCH 1/3] band: return -ENOTSUP when RSSI is too low for rate estimation Denis Kenzior
2024-04-15 19:01   ` James Prestwood [this message]
2024-04-15 19:07     ` 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=8e9b5eaf-6ac2-433d-9c49-5f1fc3912924@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    /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