• Home
  • Raw
  • Download

Lines Matching refs:pq

47 struct sk_buff *brcmu_pktq_penq(struct pktq *pq, int prec,  in brcmu_pktq_penq()  argument
52 if (pktq_full(pq) || pktq_pfull(pq, prec)) in brcmu_pktq_penq()
55 q = &pq->q[prec].skblist; in brcmu_pktq_penq()
57 pq->len++; in brcmu_pktq_penq()
59 if (pq->hi_prec < prec) in brcmu_pktq_penq()
60 pq->hi_prec = (u8) prec; in brcmu_pktq_penq()
66 struct sk_buff *brcmu_pktq_penq_head(struct pktq *pq, int prec, in brcmu_pktq_penq_head() argument
71 if (pktq_full(pq) || pktq_pfull(pq, prec)) in brcmu_pktq_penq_head()
74 q = &pq->q[prec].skblist; in brcmu_pktq_penq_head()
76 pq->len++; in brcmu_pktq_penq_head()
78 if (pq->hi_prec < prec) in brcmu_pktq_penq_head()
79 pq->hi_prec = (u8) prec; in brcmu_pktq_penq_head()
85 struct sk_buff *brcmu_pktq_pdeq(struct pktq *pq, int prec) in brcmu_pktq_pdeq() argument
90 q = &pq->q[prec].skblist; in brcmu_pktq_pdeq()
95 pq->len--; in brcmu_pktq_pdeq()
106 struct sk_buff *brcmu_pktq_pdeq_match(struct pktq *pq, int prec, in brcmu_pktq_pdeq_match() argument
113 q = &pq->q[prec].skblist; in brcmu_pktq_pdeq_match()
117 pq->len--; in brcmu_pktq_pdeq_match()
125 struct sk_buff *brcmu_pktq_pdeq_tail(struct pktq *pq, int prec) in brcmu_pktq_pdeq_tail() argument
130 q = &pq->q[prec].skblist; in brcmu_pktq_pdeq_tail()
135 pq->len--; in brcmu_pktq_pdeq_tail()
141 brcmu_pktq_pflush(struct pktq *pq, int prec, bool dir, in brcmu_pktq_pflush() argument
147 q = &pq->q[prec].skblist; in brcmu_pktq_pflush()
152 pq->len--; in brcmu_pktq_pflush()
158 void brcmu_pktq_flush(struct pktq *pq, bool dir, in brcmu_pktq_flush() argument
162 for (prec = 0; prec < pq->num_prec; prec++) in brcmu_pktq_flush()
163 brcmu_pktq_pflush(pq, prec, dir, fn, arg); in brcmu_pktq_flush()
167 void brcmu_pktq_init(struct pktq *pq, int num_prec, int max_len) in brcmu_pktq_init() argument
172 memset(pq, 0, in brcmu_pktq_init()
175 pq->num_prec = (u16) num_prec; in brcmu_pktq_init()
177 pq->max = (u16) max_len; in brcmu_pktq_init()
180 pq->q[prec].max = pq->max; in brcmu_pktq_init()
181 skb_queue_head_init(&pq->q[prec].skblist); in brcmu_pktq_init()
186 struct sk_buff *brcmu_pktq_peek_tail(struct pktq *pq, int *prec_out) in brcmu_pktq_peek_tail() argument
190 if (pq->len == 0) in brcmu_pktq_peek_tail()
193 for (prec = 0; prec < pq->hi_prec; prec++) in brcmu_pktq_peek_tail()
194 if (!skb_queue_empty(&pq->q[prec].skblist)) in brcmu_pktq_peek_tail()
200 return skb_peek_tail(&pq->q[prec].skblist); in brcmu_pktq_peek_tail()
205 int brcmu_pktq_mlen(struct pktq *pq, uint prec_bmp) in brcmu_pktq_mlen() argument
211 for (prec = 0; prec <= pq->hi_prec; prec++) in brcmu_pktq_mlen()
213 len += pq->q[prec].skblist.qlen; in brcmu_pktq_mlen()
220 struct sk_buff *brcmu_pktq_mdeq(struct pktq *pq, uint prec_bmp, in brcmu_pktq_mdeq() argument
227 if (pq->len == 0) in brcmu_pktq_mdeq()
230 while ((prec = pq->hi_prec) > 0 && in brcmu_pktq_mdeq()
231 skb_queue_empty(&pq->q[prec].skblist)) in brcmu_pktq_mdeq()
232 pq->hi_prec--; in brcmu_pktq_mdeq()
235 skb_queue_empty(&pq->q[prec].skblist)) in brcmu_pktq_mdeq()
239 q = &pq->q[prec].skblist; in brcmu_pktq_mdeq()
244 pq->len--; in brcmu_pktq_mdeq()