diff options
author | Gertjan van Wingerde <gwingerde@kpnplanet.nl> | 2008-06-16 13:56:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-26 16:49:16 -0400 |
commit | c4da004857056e6ee034c4110ccdcba659077b7e (patch) | |
tree | 641f8d9ddab7b8b6ba41fefc57a517abce15e8e6 /drivers/net/wireless/rt2x00/rt2x00queue.h | |
parent | 30caa6e3d586442f7c3ad081260ee1b22bb123de (diff) |
rt2x00: Replace statically allocated DMA buffers with mapped skb's.
The current PCI drivers require a lot of pre-allocated DMA buffers. Reduce this
by using dynamically mapped skb's (using pci_map_single) instead of the pre-
allocated DMA buffers that are allocated at device start-up time.
At the same time move common RX path code into rt2x00lib from rt2x00pci and
rt2x00usb, as the RX paths now are now almost the same.
Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index fcf52520b016..192b6e789a7f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -83,9 +83,10 @@ enum data_queue_qid { | |||
83 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc | 83 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc |
84 | * | 84 | * |
85 | */ | 85 | */ |
86 | //enum skb_frame_desc_flags { | 86 | enum skb_frame_desc_flags { |
87 | // TEMPORARILY EMPTY | 87 | SKBDESC_DMA_MAPPED_RX = (1 << 0), |
88 | //}; | 88 | SKBDESC_DMA_MAPPED_TX = (1 << 1), |
89 | }; | ||
89 | 90 | ||
90 | /** | 91 | /** |
91 | * struct skb_frame_desc: Descriptor information for the skb buffer | 92 | * struct skb_frame_desc: Descriptor information for the skb buffer |
@@ -94,19 +95,20 @@ enum data_queue_qid { | |||
94 | * this structure should not exceed the size of that array (40 bytes). | 95 | * this structure should not exceed the size of that array (40 bytes). |
95 | * | 96 | * |
96 | * @flags: Frame flags, see &enum skb_frame_desc_flags. | 97 | * @flags: Frame flags, see &enum skb_frame_desc_flags. |
97 | * @data: Pointer to data part of frame (Start of ieee80211 header). | 98 | * @desc_len: Length of the frame descriptor. |
98 | * @desc: Pointer to descriptor part of the frame. | 99 | * @desc: Pointer to descriptor part of the frame. |
99 | * Note that this pointer could point to something outside | 100 | * Note that this pointer could point to something outside |
100 | * of the scope of the skb->data pointer. | 101 | * of the scope of the skb->data pointer. |
101 | * @data_len: Length of the frame data. | 102 | * @skb_dma: (PCI-only) the DMA address associated with the sk buffer. |
102 | * @desc_len: Length of the frame descriptor. | ||
103 | * @entry: The entry to which this sk buffer belongs. | 103 | * @entry: The entry to which this sk buffer belongs. |
104 | */ | 104 | */ |
105 | struct skb_frame_desc { | 105 | struct skb_frame_desc { |
106 | unsigned int flags; | 106 | unsigned int flags; |
107 | 107 | ||
108 | void *desc; | ||
109 | unsigned int desc_len; | 108 | unsigned int desc_len; |
109 | void *desc; | ||
110 | |||
111 | dma_addr_t skb_dma; | ||
110 | 112 | ||
111 | struct queue_entry *entry; | 113 | struct queue_entry *entry; |
112 | }; | 114 | }; |