From: Johannes Berg <johannes@sipsolutions.net>
To: Zhao Li <enderaoelyther@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-next@vger.kernel.org,
Miri Korenblit <miriam.rachel.korenblit@intel.com>,
Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Subject: Re: linux-next: manual merge of the wireless-next tree with the origin tree
Date: Sun, 26 Jul 2026 12:33:13 +0200 [thread overview]
Message-ID: <b99e4a1428546030b61883063b9542dd953a69f2.camel@sipsolutions.net> (raw)
In-Reply-To: <20260723202153.97352-1-enderaoelyther@gmail.com> (sfid-20260723_222207_378983_9EE2E883)
On Fri, 2026-07-24 at 04:21 +0800, Zhao Li wrote:
>
> That last branch was introduced by 035ed430ce6a ("wifi: mac80211: avoid
> non-S1G AID fallback for S1G assoc") as:
>
> else if (status_code == WLAN_STATUS_SUCCESS)
> goto abandon_assoc;
>
> f13e573ab3f12 ("wifi: mac80211: notify driver before destroying assoc
> link") consolidated terminal association cleanup at destroy_assoc_data
> and removed abandon_assoc. The conflict resolution retargeted this branch
> to notify_driver, but notify_driver only calls drv_mgd_complete_tx()
> without destroying the association data.
>
> Since assoc_status is initialized to ASSOC_ABANDON at function entry, the
> equivalent target is destroy_assoc_data. A successful S1G association
> response with no AID Response element otherwise leaves assoc_data live
> instead of abandoning it.
>
> > but that is immediately after another goto notify_driver, there's
> > further notify_driver error handling afterwards and all the earlier
> > error handling is return statements so it looks at least unclear what's
> > supposed to be going on.
>
> Other goto notify_driver targets are intentional:
>
> - "if (!elems) goto notify_driver" is a pre-existing allocation failure
> bail-out; so association timeout handles cleanup.
>
> - The comeback path WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY keeps
> assoc_data live deliberately for retry.
>
> A successful S1G response without an AID Response element is terminal.
> It needs to abandon association immediately, so the target should be
> destroy_assoc_data rather than notify_driver.
Actually, looking at this again because I was going to send a PR for
wireless-next, I disagree.
From userspace perspective, you're right, we could and perhaps should
abandon the assoc attempt entirely and send a "something went wrong" to
userspace.
However, from the driver's perspective, we're going to need the
notify_driver part, because we're done with the transmit/receive cycle.
Just abandoning it there would introduce a bug around this area.
But because I don't think (a) we should fix that in the merge, and (b)
it's actually very important, I'm just going to leave it as
"notify_driver". Sure, this means that for a bogus association response
we're going to try again (and who knows what the AP will do then), but
that only risks confusing the AP and potentially wasting some time
against a broken AP, rather than confusing the driver.
If we actually observe this in practice and want to get rid of the time
wasting, I guess we could add a path out that does both, but I'm not
sure it's worth it.
johannes
next prev parent reply other threads:[~2026-07-26 10:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 15:57 Mark Brown
2026-07-22 20:53 ` Enderaoe Lyther
2026-07-23 11:51 ` Mark Brown
2026-07-23 20:21 ` Zhao Li
2026-07-26 10:33 ` Johannes Berg [this message]
2026-07-26 16:41 ` Zhao Li
2026-07-26 17:02 ` Johannes Berg
-- strict thread matches above, loose matches on Subject: below --
2024-10-09 0:35 Stephen Rothwell
2024-10-09 7:12 ` Johannes Berg
2022-02-22 16:12 broonie
2022-02-22 16:45 ` Johannes Berg
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=b99e4a1428546030b61883063b9542dd953a69f2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=broonie@kernel.org \
--cc=enderaoelyther@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=pagadala.yesu.anjaneyulu@intel.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
all inboxes | Powered by JetHome®