From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 3/4] station: utilize the AP_BUSY blacklist for denied auth/assoc
Date: Mon, 19 May 2025 09:36:23 -0700 [thread overview]
Message-ID: <20250519163624.198865-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20250519163624.198865-1-prestwoj@gmail.com>
Specifically for the NO_MORE_STAS reason code, add the BSS to the
(now renamed) AP_BUSY blacklist to avoid roaming to this BSS for
the near future.
Since we are now handling individual reason codes differently the
whole IS_TEMPORARY_STATUS macro was removed and replaced with a
case statement.
---
src/station.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/src/station.c b/src/station.c
index 71f4db99..2b6a18f8 100644
--- a/src/station.c
+++ b/src/station.c
@@ -3522,13 +3522,6 @@ static bool station_pmksa_fallback(struct station *station, uint16_t status)
return true;
}
-/* A bit more concise for trying to fit these into 80 characters */
-#define IS_TEMPORARY_STATUS(code) \
- ((code) == MMPDU_STATUS_CODE_DENIED_UNSUFFICIENT_BANDWIDTH || \
- (code) == MMPDU_STATUS_CODE_DENIED_POOR_CHAN_CONDITIONS || \
- (code) == MMPDU_STATUS_CODE_REJECTED_WITH_SUGG_BSS_TRANS || \
- (code) == MMPDU_STATUS_CODE_DENIED_NO_MORE_STAS)
-
static bool station_retry_with_status(struct station *station,
uint16_t status_code)
{
@@ -3536,19 +3529,37 @@ static bool station_retry_with_status(struct station *station,
if (station_pmksa_fallback(station, status_code))
goto try_next;
+ switch (status_code) {
/*
* Certain Auth/Assoc failures should not cause a timeout blacklist.
* In these cases we want to only temporarily blacklist the BSS until
* the connection is complete.
- *
+ */
+ case MMPDU_STATUS_CODE_DENIED_UNSUFFICIENT_BANDWIDTH:
+ case MMPDU_STATUS_CODE_DENIED_POOR_CHAN_CONDITIONS:
+ /*
* TODO: The WITH_SUGG_BSS_TRANS case should also include a neighbor
* report IE in the frame. This would allow us to target a
* specific BSS on our next attempt. There is currently no way to
* obtain that IE, but this should be done in the future.
+ */
+ case MMPDU_STATUS_CODE_REJECTED_WITH_SUGG_BSS_TRANS:
+ break;
+ /*
+ * If a BSS is indicating its unable to handle more connections we will
+ * blacklist this the same way we do for BSS's issuing BSS-TM requests
+ * thereby avoiding roams to this BSS for the configured timeout.
*/
- if (!IS_TEMPORARY_STATUS(status_code))
+ case MMPDU_STATUS_CODE_DENIED_NO_MORE_STAS:
+ blacklist_add_bss(station->connected_bss->addr,
+ BLACKLIST_REASON_AP_BUSY);
+ break;
+ /* For any other status codes, blacklist the BSS */
+ default:
blacklist_add_bss(station->connected_bss->addr,
BLACKLIST_REASON_CONNECT_FAILED);
+ break;
+ }
/*
* Unconditionally network blacklist the BSS if we are retrying. This
--
2.34.1
next prev parent reply other threads:[~2025-05-19 16:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 16:36 [PATCH 1/4] blacklist: rename ROAM_REQUESTED to AP_BUSY James Prestwood
2025-05-19 16:36 ` [PATCH 2/4] docs: replace/deprecate InitialRoamRequestedTimeout James Prestwood
2025-05-19 16:36 ` James Prestwood [this message]
2025-05-19 16:36 ` [PATCH 4/4] auto-t: use renamed InitialAccessPointBusyTimeout James Prestwood
2025-05-19 21:39 ` [PATCH 1/4] blacklist: rename ROAM_REQUESTED to AP_BUSY 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=20250519163624.198865-3-prestwoj@gmail.com \
--to=prestwoj@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