Lines Matching refs:pq

46 struct sk_buff *brcmu_pktq_penq(struct pktq *pq, int prec,  in brcmu_pktq_penq()  argument
51 if (pktq_full(pq) || pktq_pfull(pq, prec)) in brcmu_pktq_penq()
54 q = &pq->q[prec].skblist; in brcmu_pktq_penq()
56 pq->len++; in brcmu_pktq_penq()
58 if (pq->hi_prec < prec) in brcmu_pktq_penq()
59 pq->hi_prec = (u8) prec; in brcmu_pktq_penq()
65 struct sk_buff *brcmu_pktq_penq_head(struct pktq *pq, int prec, in brcmu_pktq_penq_head() argument
70 if (pktq_full(pq) || pktq_pfull(pq, prec)) in brcmu_pktq_penq_head()
73 q = &pq->q[prec].skblist; in brcmu_pktq_penq_head()
75 pq->len++; in brcmu_pktq_penq_head()
77 if (pq->hi_prec < prec) in brcmu_pktq_penq_head()
78 pq->hi_prec = (u8) prec; in brcmu_pktq_penq_head()
84 struct sk_buff *brcmu_pktq_pdeq(struct pktq *pq, int prec) in brcmu_pktq_pdeq() argument
89 q = &pq->q[prec].skblist; in brcmu_pktq_pdeq()
94 pq->len--; in brcmu_pktq_pdeq()
105 struct sk_buff *brcmu_pktq_pdeq_match(struct pktq *pq, int prec, in brcmu_pktq_pdeq_match() argument
112 q = &pq->q[prec].skblist; in brcmu_pktq_pdeq_match()
116 pq->len--; in brcmu_pktq_pdeq_match()
124 struct sk_buff *brcmu_pktq_pdeq_tail(struct pktq *pq, int prec) in brcmu_pktq_pdeq_tail() argument
129 q = &pq->q[prec].skblist; in brcmu_pktq_pdeq_tail()
134 pq->len--; in brcmu_pktq_pdeq_tail()
140 brcmu_pktq_pflush(struct pktq *pq, int prec, bool dir, in brcmu_pktq_pflush() argument
146 q = &pq->q[prec].skblist; in brcmu_pktq_pflush()
151 pq->len--; in brcmu_pktq_pflush()
157 void brcmu_pktq_flush(struct pktq *pq, bool dir, in brcmu_pktq_flush() argument
161 for (prec = 0; prec < pq->num_prec; prec++) in brcmu_pktq_flush()
162 brcmu_pktq_pflush(pq, prec, dir, fn, arg); in brcmu_pktq_flush()
166 void brcmu_pktq_init(struct pktq *pq, int num_prec, int max_len) in brcmu_pktq_init() argument
171 memset(pq, 0, in brcmu_pktq_init()
174 pq->num_prec = (u16) num_prec; in brcmu_pktq_init()
176 pq->max = (u16) max_len; in brcmu_pktq_init()
179 pq->q[prec].max = pq->max; in brcmu_pktq_init()
180 skb_queue_head_init(&pq->q[prec].skblist); in brcmu_pktq_init()
185 struct sk_buff *brcmu_pktq_peek_tail(struct pktq *pq, int *prec_out) in brcmu_pktq_peek_tail() argument
189 if (pktq_empty(pq)) in brcmu_pktq_peek_tail()
192 for (prec = 0; prec < pq->hi_prec; prec++) in brcmu_pktq_peek_tail()
193 if (!skb_queue_empty(&pq->q[prec].skblist)) in brcmu_pktq_peek_tail()
199 return skb_peek_tail(&pq->q[prec].skblist); in brcmu_pktq_peek_tail()
204 int brcmu_pktq_mlen(struct pktq *pq, uint prec_bmp) in brcmu_pktq_mlen() argument
210 for (prec = 0; prec <= pq->hi_prec; prec++) in brcmu_pktq_mlen()
212 len += pq->q[prec].skblist.qlen; in brcmu_pktq_mlen()
219 struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp, in brcmu_pktq_mdeq() argument
226 if (pktq_empty(pq)) in brcmu_pktq_mdeq()
229 while ((prec = pq->hi_prec) > 0 && in brcmu_pktq_mdeq()
230 skb_queue_empty(&pq->q[prec].skblist)) in brcmu_pktq_mdeq()
231 pq->hi_prec--; in brcmu_pktq_mdeq()
234 skb_queue_empty(&pq->q[prec].skblist)) in brcmu_pktq_mdeq()
238 q = &pq->q[prec].skblist; in brcmu_pktq_mdeq()
243 pq->len--; in brcmu_pktq_mdeq()