mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
net80211 amdpu: Simplify a few loops that drain an mbufq
These loops already handled a NULL return from mbufq_dequeue when the
queue was empty, so remove a redundant check of mbufq_len before
dequeueing.
Reviewed by: bz
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43336
(cherry picked from commit 6977311633)
This commit is contained in:
parent
e000bd2551
commit
2bc7fdc3a8
1 changed files with 2 additions and 2 deletions
|
|
@ -521,7 +521,7 @@ ampdu_rx_purge_slot(struct ieee80211_rx_ampdu *rap, int i)
|
|||
struct mbuf *m;
|
||||
|
||||
/* Walk the queue, removing frames as appropriate */
|
||||
while (mbufq_len(&rap->rxa_mq[i]) != 0) {
|
||||
for (;;) {
|
||||
m = mbufq_dequeue(&rap->rxa_mq[i]);
|
||||
if (m == NULL)
|
||||
break;
|
||||
|
|
@ -816,7 +816,7 @@ ampdu_dispatch_slot(struct ieee80211_rx_ampdu *rap, struct ieee80211_node *ni,
|
|||
struct mbuf *m;
|
||||
int n = 0;
|
||||
|
||||
while (mbufq_len(&rap->rxa_mq[i]) != 0) {
|
||||
for (;;) {
|
||||
m = mbufq_dequeue(&rap->rxa_mq[i]);
|
||||
if (m == NULL)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue