Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220034
b: refs/heads/master
c: 57c096b
h: refs/heads/master
v: v3
  • Loading branch information
Jason Cooper authored and Greg Kroah-Hartman committed Oct 5, 2010
1 parent 4dfb3b5 commit f8c72f5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c74c95cd1f6e4b59ecd75c0584b8b5589e7b60a3
refs/heads/master: 57c096b897fe59e106452500afbbe0e0f1f8e149
27 changes: 18 additions & 9 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,12 @@ void *pktq_pdeq(struct pktq *pq, int prec)

q = &pq->q[prec];

if ((p = q->head) == NULL)
p = q->head;
if (p == NULL)
return NULL;

if ((q->head = PKTLINK(p)) == NULL)
q->head = PKTLINK(p);
if (q->head == NULL)
q->tail = NULL;

q->len--;
Expand All @@ -223,7 +225,8 @@ void *pktq_pdeq_tail(struct pktq *pq, int prec)

q = &pq->q[prec];

if ((p = q->head) == NULL)
p = q->head;
if (p == NULL)
return NULL;

for (prev = NULL; p != q->tail; p = PKTLINK(p))
Expand Down Expand Up @@ -274,7 +277,8 @@ bool pktq_pdel(struct pktq *pq, void *pktbuf, int prec)
q = &pq->q[prec];

if (q->head == pktbuf) {
if ((q->head = PKTLINK(pktbuf)) == NULL)
q->head = PKTLINK(pktbuf);
if (q->head == NULL)
q->tail = NULL;
} else {
for (p = q->head; p && PKTLINK(p) != pktbuf; p = PKTLINK(p))
Expand Down Expand Up @@ -325,10 +329,12 @@ void *pktq_deq(struct pktq *pq, int *prec_out)

q = &pq->q[prec];

if ((p = q->head) == NULL)
p = q->head;
if (p == NULL)
return NULL;

if ((q->head = PKTLINK(p)) == NULL)
q->head = PKTLINK(p);
if (q->head == NULL)
q->tail = NULL;

q->len--;
Expand Down Expand Up @@ -358,7 +364,8 @@ void *pktq_deq_tail(struct pktq *pq, int *prec_out)

q = &pq->q[prec];

if ((p = q->head) == NULL)
p = q->head;
if (p == NULL)
return NULL;

for (prev = NULL; p != q->tail; p = PKTLINK(p))
Expand Down Expand Up @@ -456,10 +463,12 @@ void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out)

q = &pq->q[prec];

if ((p = q->head) == NULL)
p = q->head;
if (p == NULL)
return NULL;

if ((q->head = PKTLINK(p)) == NULL)
q->head = PKTLINK(p);
if (q->head == NULL)
q->tail = NULL;

q->len--;
Expand Down

0 comments on commit f8c72f5

Please sign in to comment.