Page MenuHomeFreeBSD

net80211: correct return code for ieee80211_ampdu_request()
ClosedPublic

Authored by bz on Tue, Jan 20, 1:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 21, 8:17 AM
Unknown Object (File)
Wed, Jan 21, 5:07 AM
Unknown Object (File)
Wed, Jan 21, 2:40 AM
Unknown Object (File)
Wed, Jan 21, 2:09 AM
Unknown Object (File)
Wed, Jan 21, 2:07 AM
Unknown Object (File)
Wed, Jan 21, 1:25 AM
Unknown Object (File)
Wed, Jan 21, 1:19 AM
Unknown Object (File)
Wed, Jan 21, 12:53 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.Tue, Jan 20, 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.Tue, Jan 20, 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.Tue, Jan 20, 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.