diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2010-06-03 04:51:45 -0400 |
---|---|---|
committer | Ivo van Doorn <IvDoorn@gmail.com> | 2010-06-03 04:51:45 -0400 |
commit | 0b8004aa12d13ec750d102ba4082a95f0107c649 (patch) | |
tree | eac5224159d34ae525b552254816c3a1e056336c /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | baaffe67b5b33e4215409669226ef623cb65e15c (diff) |
rt2x00: Properly reserve room for descriptors in skbs.
Instead of fiddling with the skb->data pointer and thereby risking
out of bounds accesses, properly reserve the space needed in an
skb for descriptors.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 811844be0053..889a372367f6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -1002,6 +1002,13 @@ static inline bool rt2x00_is_soc(struct rt2x00_dev *rt2x00dev) | |||
1002 | void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | 1002 | void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); |
1003 | 1003 | ||
1004 | /** | 1004 | /** |
1005 | * rt2x00queue_unmap_skb - Unmap a skb from DMA. | ||
1006 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
1007 | * @skb: The skb to unmap. | ||
1008 | */ | ||
1009 | void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | ||
1010 | |||
1011 | /** | ||
1005 | * rt2x00queue_get_queue - Convert queue index to queue pointer | 1012 | * rt2x00queue_get_queue - Convert queue index to queue pointer |
1006 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | 1013 | * @rt2x00dev: Pointer to &struct rt2x00_dev. |
1007 | * @queue: rt2x00 queue index (see &enum data_queue_qid). | 1014 | * @queue: rt2x00 queue index (see &enum data_queue_qid). |