Page MenuHomeFreeBSD

net80211: correct return code for ieee80211_ampdu_request()
ClosedPublic

Authored by bz on Jan 20 2026, 1:53 PM.
Tags
None
Referenced Files
F162634346: D54794.diff
Wed, Jul 15, 7:03 AM
F162634345: D54794.diff
Wed, Jul 15, 7:03 AM
Unknown Object (File)
Sun, Jul 12, 6:26 AM
Unknown Object (File)
Mon, Jul 6, 4:55 PM
Unknown Object (File)
Mon, Jul 6, 9:12 AM
Unknown Object (File)
Sun, Jul 5, 10:32 PM
Unknown Object (File)
May 19 2026, 10:50 PM
Unknown Object (File)
Apr 24 2026, 10:07 PM

Details

Summary

We used to return the result of (*ic_send_action) directly but
ieee80211_ampdu_request() returns 1 on success and 0 on error,
which is contrary to the result of (*ic_send_action). Deal with
that accordingly and update the documentation of the function.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jan 20 2026, 1:53 PM
emaste added inline comments.
sys/net80211/ieee80211_ht.c
2839

I suppose ieee80211_ampdu_request ought to return bool.
Either way, to me return (error == 0) is clear.

bz marked an inline comment as done.Jan 20 2026, 2:13 PM
bz added inline comments.
sys/net80211/ieee80211_ht.c
2839

Well, I would happily be able to propagate an error in the future (or act upon as we adjusted state early on).

I guess for the moment we can return error == 0 indeed. Saves vertical space :)

bz marked an inline comment as done.

Update treturn as suggested by @emaste.

This revision is now accepted and ready to land.Jan 20 2026, 3:27 PM

Oh, there's no callers of ieee80211_ampdu_request() outside of net80211? I was worried that the existing AMPDU implementing drivers would hiccup with the return value changing!

Oh, there's no callers of ieee80211_ampdu_request() outside of net80211? I was worried that the existing AMPDU implementing drivers would hiccup with the return value changing!

No, the caller in net80211 is (void). But I wanted to use it from LinuxKPI and I need to know the result as otherwise firmware and us will not be friends.