diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-01-20 13:48:11 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-01-20 15:45:58 +0000 |
| commit | c670af3725d0bb5494caf0846994ae6997175cb6 (patch) | |
| tree | 6c4a34ca9036071925a4e1e192e1e3cf6aad6f92 | |
| parent | 768332d619484834a7866fde4bf2695d4262355a (diff) | |
net80211: correct return code for ieee80211_ampdu_request()
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
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D54794
| -rw-r--r-- | sys/net80211/ieee80211_ht.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index a8a767785fce..88e614e266a1 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2766,10 +2766,15 @@ ieee80211_ampdu_enable(struct ieee80211_node *ni, return 1; } -/* - * Request A-MPDU tx aggregation. Setup local state and - * issue an ADDBA request. BA use will only happen after +/** + * @brief Request A-MPDU tx aggregation. + * + * Setup local state and issue an ADDBA request. BA use will only happen after * the other end replies with ADDBA response. + * + * @param ni ieee80211_node update + * @param tap tx_ampdu state + * @returns 1 on success and 0 on error */ int ieee80211_ampdu_request(struct ieee80211_node *ni, @@ -2777,7 +2782,7 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, { struct ieee80211com *ic = ni->ni_ic; uint16_t args[5]; - int tid, dialogtoken; + int tid, dialogtoken, error; static int tokens = 0; /* XXX */ /* XXX locking */ @@ -2828,8 +2833,11 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, args[4] = _IEEE80211_SHIFTMASK(tap->txa_start, IEEE80211_BASEQ_START) | _IEEE80211_SHIFTMASK(0, IEEE80211_BASEQ_FRAG) ; - return ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, + + error = ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, IEEE80211_ACTION_BA_ADDBA_REQUEST, args); + /* Silly return of 1 for success here. */ + return (error == 0); } /* |
