git: c670af3725d0 - main - net80211: correct return code for ieee80211_ampdu_request()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jan 2026 15:48:38 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=c670af3725d0bb5494caf0846994ae6997175cb6
commit c670af3725d0bb5494caf0846994ae6997175cb6
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-01-20 13:48:11 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-01-20 15:45:58 +0000
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
---
sys/net80211/ieee80211_ht.c | 18 +++++++++++++-----
1 file 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);
}
/*