aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2024-01-09 19:00:46 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2024-01-09 19:00:46 +0000
commit8cb9b68f5821e45c63ee08d8ee3029ca523ac174 (patch)
tree8ee8e6b8324384b82ed02533a600698404373ce8 /sys/net80211
parent76f405ed63540aa2d989c231f70277062e76ccfb (diff)
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_ddb.c2
-rw-r--r--sys/net80211/ieee80211_ht.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c
index cd4a4f191745..0042d5d4aeb6 100644
--- a/sys/net80211/ieee80211_ddb.c
+++ b/sys/net80211/ieee80211_ddb.c
@@ -222,7 +222,7 @@ _db_show_rxampdu(const char *sep, int ix, const struct ieee80211_rx_ampdu *rap)
db_printf("%s age %d nframes %d\n", sep,
rap->rxa_age, rap->rxa_nframes);
for (i = 0; i < IEEE80211_AGGR_BAWMAX; i++)
- if (mbufq_len(&rap->rxa_mq[i]) > 0) {
+ if (!mbufq_empty(&rap->rxa_mq[i])) {
db_printf("%s m[%2u:%4u] ", sep, i,
IEEE80211_SEQ_ADD(rap->rxa_start, i));
STAILQ_FOREACH(m, &rap->rxa_mq[i].mq_head,
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index 5297b741d9b9..c747d29735a6 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -567,7 +567,7 @@ ampdu_rx_add_slot(struct ieee80211_rx_ampdu *rap, int off, int tid,
/*
* Get the rxs of the final mbuf in the slot, if one exists.
*/
- if (mbufq_len(&rap->rxa_mq[off]) != 0) {
+ if (!mbufq_empty(&rap->rxa_mq[off])) {
rxs_final = ieee80211_get_rx_params_ptr(mbufq_last(&rap->rxa_mq[off]));
}
@@ -597,7 +597,7 @@ ampdu_rx_add_slot(struct ieee80211_rx_ampdu *rap, int off, int tid,
* If the list is empty OR we have determined we can put more
* driver decap'ed AMSDU frames in here, then insert.
*/
- if ((mbufq_len(&rap->rxa_mq[off]) == 0) || (toss_dup == 0)) {
+ if (mbufq_empty(&rap->rxa_mq[off]) || (toss_dup == 0)) {
if (mbufq_enqueue(&rap->rxa_mq[off], m) != 0) {
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT | IEEE80211_MSG_11N,
ni->ni_macaddr,
@@ -1075,7 +1075,7 @@ again:
/*
* Dispatch as many packets as we can.
*/
- KASSERT((mbufq_len(&rap->rxa_mq[0]) == 0), ("unexpected dup"));
+ KASSERT(mbufq_empty(&rap->rxa_mq[0]), ("unexpected dup"));
ampdu_dispatch(ni, m);
ampdu_rx_dispatch(rap, ni);
return CONSUMED;