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
Unknown Object (File)
Tue, Apr 7, 2:21 AM
Unknown Object (File)
Mon, Apr 6, 2:55 PM
Unknown Object (File)
Fri, Apr 3, 9:32 PM
Unknown Object (File)
Wed, Apr 1, 11:53 AM
Unknown Object (File)
Fri, Mar 27, 1:02 AM
Unknown Object (File)
Thu, Mar 26, 7:02 AM
Unknown Object (File)
Thu, Mar 26, 4:31 AM
Unknown Object (File)
Wed, Mar 18, 3:00 AM

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.