diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-15 06:55:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:48:11 -0400 |
commit | e039fa4a4195ac4ee895e6f3d1334beed63256fe (patch) | |
tree | cfd0762d73df96b73052378be7b157c4ac6e7035 /drivers/net/wireless/rt2x00/rt2x00queue.h | |
parent | e24549485f859be6518929bb1c9c0257d79f033d (diff) |
mac80211: move TX info into skb->cb
This patch converts mac80211 and all drivers to have transmit
information and status in skb->cb rather than allocating extra
memory for it and copying all the data around. To make it fit,
a union is used where only data that is necessary for all steps
is kept outside of the union.
A number of fixes were done by Ivo, as well as the rt2x00 part
of this patch.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: David S. Miller <davem@davemloft.net>
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 | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index c6edc52873c4..f263fe422f87 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -105,8 +105,8 @@ enum skb_frame_desc_flags { | |||
105 | /** | 105 | /** |
106 | * struct skb_frame_desc: Descriptor information for the skb buffer | 106 | * struct skb_frame_desc: Descriptor information for the skb buffer |
107 | * | 107 | * |
108 | * This structure is placed over the skb->cb array, this means that | 108 | * This structure is placed over the driver_data array, this means that |
109 | * this structure should not exceed the size of that array (48 bytes). | 109 | * this structure should not exceed the size of that array (40 bytes). |
110 | * | 110 | * |
111 | * @flags: Frame flags, see &enum skb_frame_desc_flags. | 111 | * @flags: Frame flags, see &enum skb_frame_desc_flags. |
112 | * @data: Pointer to data part of frame (Start of ieee80211 header). | 112 | * @data: Pointer to data part of frame (Start of ieee80211 header). |
@@ -129,10 +129,15 @@ struct skb_frame_desc { | |||
129 | struct queue_entry *entry; | 129 | struct queue_entry *entry; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | /** | ||
133 | * get_skb_frame_desc - Obtain the rt2x00 frame descriptor from a sk_buff. | ||
134 | * @skb: &struct sk_buff from where we obtain the &struct skb_frame_desc | ||
135 | */ | ||
132 | static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb) | 136 | static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb) |
133 | { | 137 | { |
134 | BUILD_BUG_ON(sizeof(struct skb_frame_desc) > sizeof(skb->cb)); | 138 | BUILD_BUG_ON(sizeof(struct skb_frame_desc) > |
135 | return (struct skb_frame_desc *)&skb->cb[0]; | 139 | IEEE80211_TX_INFO_DRIVER_DATA_SIZE); |
140 | return (struct skb_frame_desc *)&IEEE80211_SKB_CB(skb)->driver_data; | ||
136 | } | 141 | } |
137 | 142 | ||
138 | /** | 143 | /** |
@@ -189,12 +194,10 @@ enum txdone_entry_desc_flags { | |||
189 | * Summary of information that has been read from the TX frame descriptor | 194 | * Summary of information that has been read from the TX frame descriptor |
190 | * after the device is done with transmission. | 195 | * after the device is done with transmission. |
191 | * | 196 | * |
192 | * @control: Control structure which was used to transmit the frame. | ||
193 | * @flags: TX done flags (See &enum txdone_entry_desc_flags). | 197 | * @flags: TX done flags (See &enum txdone_entry_desc_flags). |
194 | * @retry: Retry count. | 198 | * @retry: Retry count. |
195 | */ | 199 | */ |
196 | struct txdone_entry_desc { | 200 | struct txdone_entry_desc { |
197 | struct ieee80211_tx_control *control; | ||
198 | unsigned long flags; | 201 | unsigned long flags; |
199 | int retry; | 202 | int retry; |
200 | }; | 203 | }; |