summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/include
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-11-10 20:30:27 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-11-11 14:28:40 -0500
commitad3b8b39189689dbff84c8a8edf024511b087f87 (patch)
tree533b37b0b1e4fb219bf9f854f4d193e3f1ea199e /drivers/net/wireless/brcm80211/include
parentad4d71f69ebe2acab75d0a8a66ab9f7609151cce (diff)
downloadblackbird-op-linux-ad3b8b39189689dbff84c8a8edf024511b087f87.tar.gz
blackbird-op-linux-ad3b8b39189689dbff84c8a8edf024511b087f87.zip
brcm80211: util: use sk_buff_head in precedence queue functions
Instead of dealing with sk_buff prev pointers the queue functions now make use of the sk_buff_head functions provided by the kernel. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/include')
-rw-r--r--drivers/net/wireless/brcm80211/include/brcmu_utils.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/wireless/brcm80211/include/brcmu_utils.h b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
index ccf60151953c..cae4e519d187 100644
--- a/drivers/net/wireless/brcm80211/include/brcmu_utils.h
+++ b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
@@ -65,9 +65,7 @@
#define ETHER_ADDR_STR_LEN 18
struct pktq_prec {
- struct sk_buff *head; /* first packet to dequeue */
- struct sk_buff *tail; /* last packet to dequeue */
- u16 len; /* number of queued packets */
+ struct sk_buff_head skblist;
u16 max; /* maximum number of queued packets */
};
@@ -88,32 +86,32 @@ struct pktq {
static inline int pktq_plen(struct pktq *pq, int prec)
{
- return pq->q[prec].len;
+ return pq->q[prec].skblist.qlen;
}
static inline int pktq_pavail(struct pktq *pq, int prec)
{
- return pq->q[prec].max - pq->q[prec].len;
+ return pq->q[prec].max - pq->q[prec].skblist.qlen;
}
static inline bool pktq_pfull(struct pktq *pq, int prec)
{
- return pq->q[prec].len >= pq->q[prec].max;
+ return pq->q[prec].skblist.qlen >= pq->q[prec].max;
}
static inline bool pktq_pempty(struct pktq *pq, int prec)
{
- return pq->q[prec].len == 0;
+ return skb_queue_empty(&pq->q[prec].skblist);
}
static inline struct sk_buff *pktq_ppeek(struct pktq *pq, int prec)
{
- return pq->q[prec].head;
+ return skb_peek(&pq->q[prec].skblist);
}
static inline struct sk_buff *pktq_ppeek_tail(struct pktq *pq, int prec)
{
- return pq->q[prec].tail;
+ return skb_peek_tail(&pq->q[prec].skblist);
}
extern struct sk_buff *brcmu_pktq_penq(struct pktq *pq, int prec,
OpenPOWER on IntegriCloud