diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 90 |
1 files changed, 55 insertions, 35 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 7027c9f47d3f..4d00ced14cc7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -54,6 +54,17 @@ | |||
54 | 54 | ||
55 | /** | 55 | /** |
56 | * enum data_queue_qid: Queue identification | 56 | * enum data_queue_qid: Queue identification |
57 | * | ||
58 | * @QID_AC_BE: AC BE queue | ||
59 | * @QID_AC_BK: AC BK queue | ||
60 | * @QID_AC_VI: AC VI queue | ||
61 | * @QID_AC_VO: AC VO queue | ||
62 | * @QID_HCCA: HCCA queue | ||
63 | * @QID_MGMT: MGMT queue (prio queue) | ||
64 | * @QID_RX: RX queue | ||
65 | * @QID_OTHER: None of the above (don't use, only present for completeness) | ||
66 | * @QID_BEACON: Beacon queue (value unspecified, don't send it to device) | ||
67 | * @QID_ATIM: Atim queue (value unspeficied, don't send it to device) | ||
57 | */ | 68 | */ |
58 | enum data_queue_qid { | 69 | enum data_queue_qid { |
59 | QID_AC_BE = 0, | 70 | QID_AC_BE = 0, |
@@ -64,21 +75,8 @@ enum data_queue_qid { | |||
64 | QID_MGMT = 13, | 75 | QID_MGMT = 13, |
65 | QID_RX = 14, | 76 | QID_RX = 14, |
66 | QID_OTHER = 15, | 77 | QID_OTHER = 15, |
67 | }; | 78 | QID_BEACON, |
68 | 79 | QID_ATIM, | |
69 | /** | ||
70 | * enum rt2x00_bcn_queue: Beacon queue index | ||
71 | * | ||
72 | * Start counting with a high offset, this because this enumeration | ||
73 | * supplements &enum ieee80211_tx_queue and we should prevent value | ||
74 | * conflicts. | ||
75 | * | ||
76 | * @RT2X00_BCN_QUEUE_BEACON: Beacon queue | ||
77 | * @RT2X00_BCN_QUEUE_ATIM: Atim queue (sends frame after beacon) | ||
78 | */ | ||
79 | enum rt2x00_bcn_queue { | ||
80 | RT2X00_BCN_QUEUE_BEACON = 100, | ||
81 | RT2X00_BCN_QUEUE_ATIM = 101, | ||
82 | }; | 80 | }; |
83 | 81 | ||
84 | /** | 82 | /** |
@@ -94,38 +92,39 @@ enum skb_frame_desc_flags { | |||
94 | /** | 92 | /** |
95 | * struct skb_frame_desc: Descriptor information for the skb buffer | 93 | * struct skb_frame_desc: Descriptor information for the skb buffer |
96 | * | 94 | * |
97 | * This structure is placed over the skb->cb array, this means that | 95 | * This structure is placed over the driver_data array, this means that |
98 | * this structure should not exceed the size of that array (48 bytes). | 96 | * this structure should not exceed the size of that array (40 bytes). |
99 | * | 97 | * |
100 | * @flags: Frame flags, see &enum skb_frame_desc_flags. | 98 | * @flags: Frame flags, see &enum skb_frame_desc_flags. |
101 | * @frame_type: Frame type, see &enum rt2x00_dump_type. | ||
102 | * @data: Pointer to data part of frame (Start of ieee80211 header). | 99 | * @data: Pointer to data part of frame (Start of ieee80211 header). |
103 | * @desc: Pointer to descriptor part of the frame. | 100 | * @desc: Pointer to descriptor part of the frame. |
104 | * Note that this pointer could point to something outside | 101 | * Note that this pointer could point to something outside |
105 | * of the scope of the skb->data pointer. | 102 | * of the scope of the skb->data pointer. |
106 | * @data_len: Length of the frame data. | 103 | * @data_len: Length of the frame data. |
107 | * @desc_len: Length of the frame descriptor. | 104 | * @desc_len: Length of the frame descriptor. |
108 | |||
109 | * @entry: The entry to which this sk buffer belongs. | 105 | * @entry: The entry to which this sk buffer belongs. |
110 | */ | 106 | */ |
111 | struct skb_frame_desc { | 107 | struct skb_frame_desc { |
112 | unsigned int flags; | 108 | unsigned int flags; |
113 | 109 | ||
114 | unsigned int frame_type; | 110 | unsigned short data_len; |
111 | unsigned short desc_len; | ||
115 | 112 | ||
116 | void *data; | 113 | void *data; |
117 | void *desc; | 114 | void *desc; |
118 | 115 | ||
119 | unsigned int data_len; | ||
120 | unsigned int desc_len; | ||
121 | |||
122 | struct queue_entry *entry; | 116 | struct queue_entry *entry; |
123 | }; | 117 | }; |
124 | 118 | ||
119 | /** | ||
120 | * get_skb_frame_desc - Obtain the rt2x00 frame descriptor from a sk_buff. | ||
121 | * @skb: &struct sk_buff from where we obtain the &struct skb_frame_desc | ||
122 | */ | ||
125 | static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb) | 123 | static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb) |
126 | { | 124 | { |
127 | BUILD_BUG_ON(sizeof(struct skb_frame_desc) > sizeof(skb->cb)); | 125 | BUILD_BUG_ON(sizeof(struct skb_frame_desc) > |
128 | return (struct skb_frame_desc *)&skb->cb[0]; | 126 | IEEE80211_TX_INFO_DRIVER_DATA_SIZE); |
127 | return (struct skb_frame_desc *)&IEEE80211_SKB_CB(skb)->driver_data; | ||
129 | } | 128 | } |
130 | 129 | ||
131 | /** | 130 | /** |
@@ -161,18 +160,32 @@ struct rxdone_entry_desc { | |||
161 | }; | 160 | }; |
162 | 161 | ||
163 | /** | 162 | /** |
163 | * enum txdone_entry_desc_flags: Flags for &struct txdone_entry_desc | ||
164 | * | ||
165 | * @TXDONE_UNKNOWN: Hardware could not determine success of transmission. | ||
166 | * @TXDONE_SUCCESS: Frame was successfully send | ||
167 | * @TXDONE_FAILURE: Frame was not successfully send | ||
168 | * @TXDONE_EXCESSIVE_RETRY: In addition to &TXDONE_FAILURE, the | ||
169 | * frame transmission failed due to excessive retries. | ||
170 | */ | ||
171 | enum txdone_entry_desc_flags { | ||
172 | TXDONE_UNKNOWN = 1 << 0, | ||
173 | TXDONE_SUCCESS = 1 << 1, | ||
174 | TXDONE_FAILURE = 1 << 2, | ||
175 | TXDONE_EXCESSIVE_RETRY = 1 << 3, | ||
176 | }; | ||
177 | |||
178 | /** | ||
164 | * struct txdone_entry_desc: TX done entry descriptor | 179 | * struct txdone_entry_desc: TX done entry descriptor |
165 | * | 180 | * |
166 | * Summary of information that has been read from the TX frame descriptor | 181 | * Summary of information that has been read from the TX frame descriptor |
167 | * after the device is done with transmission. | 182 | * after the device is done with transmission. |
168 | * | 183 | * |
169 | * @control: Control structure which was used to transmit the frame. | 184 | * @flags: TX done flags (See &enum txdone_entry_desc_flags). |
170 | * @status: TX status (See &enum tx_status). | ||
171 | * @retry: Retry count. | 185 | * @retry: Retry count. |
172 | */ | 186 | */ |
173 | struct txdone_entry_desc { | 187 | struct txdone_entry_desc { |
174 | struct ieee80211_tx_control *control; | 188 | unsigned long flags; |
175 | int status; | ||
176 | int retry; | 189 | int retry; |
177 | }; | 190 | }; |
178 | 191 | ||
@@ -180,19 +193,25 @@ struct txdone_entry_desc { | |||
180 | * enum txentry_desc_flags: Status flags for TX entry descriptor | 193 | * enum txentry_desc_flags: Status flags for TX entry descriptor |
181 | * | 194 | * |
182 | * @ENTRY_TXD_RTS_FRAME: This frame is a RTS frame. | 195 | * @ENTRY_TXD_RTS_FRAME: This frame is a RTS frame. |
196 | * @ENTRY_TXD_CTS_FRAME: This frame is a CTS-to-self frame. | ||
183 | * @ENTRY_TXD_OFDM_RATE: This frame is send out with an OFDM rate. | 197 | * @ENTRY_TXD_OFDM_RATE: This frame is send out with an OFDM rate. |
198 | * @ENTRY_TXD_FIRST_FRAGMENT: This is the first frame. | ||
184 | * @ENTRY_TXD_MORE_FRAG: This frame is followed by another fragment. | 199 | * @ENTRY_TXD_MORE_FRAG: This frame is followed by another fragment. |
185 | * @ENTRY_TXD_REQ_TIMESTAMP: Require timestamp to be inserted. | 200 | * @ENTRY_TXD_REQ_TIMESTAMP: Require timestamp to be inserted. |
186 | * @ENTRY_TXD_BURST: This frame belongs to the same burst event. | 201 | * @ENTRY_TXD_BURST: This frame belongs to the same burst event. |
187 | * @ENTRY_TXD_ACK: An ACK is required for this frame. | 202 | * @ENTRY_TXD_ACK: An ACK is required for this frame. |
203 | * @ENTRY_TXD_RETRY_MODE: When set, the long retry count is used. | ||
188 | */ | 204 | */ |
189 | enum txentry_desc_flags { | 205 | enum txentry_desc_flags { |
190 | ENTRY_TXD_RTS_FRAME, | 206 | ENTRY_TXD_RTS_FRAME, |
207 | ENTRY_TXD_CTS_FRAME, | ||
191 | ENTRY_TXD_OFDM_RATE, | 208 | ENTRY_TXD_OFDM_RATE, |
209 | ENTRY_TXD_FIRST_FRAGMENT, | ||
192 | ENTRY_TXD_MORE_FRAG, | 210 | ENTRY_TXD_MORE_FRAG, |
193 | ENTRY_TXD_REQ_TIMESTAMP, | 211 | ENTRY_TXD_REQ_TIMESTAMP, |
194 | ENTRY_TXD_BURST, | 212 | ENTRY_TXD_BURST, |
195 | ENTRY_TXD_ACK, | 213 | ENTRY_TXD_ACK, |
214 | ENTRY_TXD_RETRY_MODE, | ||
196 | }; | 215 | }; |
197 | 216 | ||
198 | /** | 217 | /** |
@@ -206,6 +225,7 @@ enum txentry_desc_flags { | |||
206 | * @length_low: PLCP length low word. | 225 | * @length_low: PLCP length low word. |
207 | * @signal: PLCP signal. | 226 | * @signal: PLCP signal. |
208 | * @service: PLCP service. | 227 | * @service: PLCP service. |
228 | * @retry_limit: Max number of retries. | ||
209 | * @aifs: AIFS value. | 229 | * @aifs: AIFS value. |
210 | * @ifs: IFS value. | 230 | * @ifs: IFS value. |
211 | * @cw_min: cwmin value. | 231 | * @cw_min: cwmin value. |
@@ -221,10 +241,11 @@ struct txentry_desc { | |||
221 | u16 signal; | 241 | u16 signal; |
222 | u16 service; | 242 | u16 service; |
223 | 243 | ||
224 | int aifs; | 244 | short retry_limit; |
225 | int ifs; | 245 | short aifs; |
226 | int cw_min; | 246 | short ifs; |
227 | int cw_max; | 247 | short cw_min; |
248 | short cw_max; | ||
228 | }; | 249 | }; |
229 | 250 | ||
230 | /** | 251 | /** |
@@ -240,7 +261,6 @@ struct txentry_desc { | |||
240 | * encryption or decryption. The entry should only be touched after | 261 | * encryption or decryption. The entry should only be touched after |
241 | * the device has signaled it is done with it. | 262 | * the device has signaled it is done with it. |
242 | */ | 263 | */ |
243 | |||
244 | enum queue_entry_flags { | 264 | enum queue_entry_flags { |
245 | ENTRY_BCN_ASSIGNED, | 265 | ENTRY_BCN_ASSIGNED, |
246 | ENTRY_OWNER_DEVICE_DATA, | 266 | ENTRY_OWNER_DEVICE_DATA, |
@@ -369,7 +389,7 @@ struct data_queue_desc { | |||
369 | * the end of the TX queue array. | 389 | * the end of the TX queue array. |
370 | */ | 390 | */ |
371 | #define tx_queue_end(__dev) \ | 391 | #define tx_queue_end(__dev) \ |
372 | &(__dev)->tx[(__dev)->hw->queues] | 392 | &(__dev)->tx[(__dev)->ops->tx_queues] |
373 | 393 | ||
374 | /** | 394 | /** |
375 | * queue_loop - Loop through the queues within a specific range (HELPER MACRO). | 395 | * queue_loop - Loop through the queues within a specific range (HELPER MACRO). |