aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-04-26 10:08:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:14:49 -0400
commit9f1661718c7fcf82e25c6aed20b729ee372d9d65 (patch)
tree099a3305c948f306f46e2cf2f0d24a8ef069f011 /drivers/net/wireless/rt2x00/rt2x00queue.h
parent9eb4e21e289beba9cfe34f24920eee83c144e62f (diff)
rt2x00: Add support for L2 padding during TX/RX
Some hardware require L2 padding between header and payload because both must be aligned to a 4-byte boundary. This hardware also is easier during the RX path since we no longer need to move the entire payload but rather only the header to remove the padding (mac80211 only wants the payload to be 4-byte aligned). 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.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index e3bfd73e319b..13e0ece176a1 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -87,13 +87,16 @@ enum data_queue_qid {
87 * 87 *
88 * @SKBDESC_DMA_MAPPED_RX: &skb_dma field has been mapped for RX 88 * @SKBDESC_DMA_MAPPED_RX: &skb_dma field has been mapped for RX
89 * @SKBDESC_DMA_MAPPED_TX: &skb_dma field has been mapped for TX 89 * @SKBDESC_DMA_MAPPED_TX: &skb_dma field has been mapped for TX
90 * @FRAME_DESC_IV_STRIPPED: Frame contained a IV/EIV provided by 90 * @SKBDESC_IV_STRIPPED: Frame contained a IV/EIV provided by
91 * mac80211 but was stripped for processing by the driver. 91 * mac80211 but was stripped for processing by the driver.
92 * @SKBDESC_L2_PADDED: Payload has been padded for 4-byte alignment,
93 * the padded bytes are located between header and payload.
92 */ 94 */
93enum skb_frame_desc_flags { 95enum skb_frame_desc_flags {
94 SKBDESC_DMA_MAPPED_RX = 1 << 0, 96 SKBDESC_DMA_MAPPED_RX = 1 << 0,
95 SKBDESC_DMA_MAPPED_TX = 1 << 1, 97 SKBDESC_DMA_MAPPED_TX = 1 << 1,
96 FRAME_DESC_IV_STRIPPED = 1 << 2, 98 SKBDESC_IV_STRIPPED = 1 << 2,
99 SKBDESC_L2_PADDED = 1 << 3
97}; 100};
98 101
99/** 102/**
@@ -148,6 +151,7 @@ static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb)
148 * @RXDONE_MY_BSS: Does this frame originate from device's BSS. 151 * @RXDONE_MY_BSS: Does this frame originate from device's BSS.
149 * @RXDONE_CRYPTO_IV: Driver provided IV/EIV data. 152 * @RXDONE_CRYPTO_IV: Driver provided IV/EIV data.
150 * @RXDONE_CRYPTO_ICV: Driver provided ICV data. 153 * @RXDONE_CRYPTO_ICV: Driver provided ICV data.
154 * @RXDONE_L2PAD: 802.11 payload has been padded to 4-byte boundary.
151 */ 155 */
152enum rxdone_entry_desc_flags { 156enum rxdone_entry_desc_flags {
153 RXDONE_SIGNAL_PLCP = 1 << 0, 157 RXDONE_SIGNAL_PLCP = 1 << 0,
@@ -155,6 +159,7 @@ enum rxdone_entry_desc_flags {
155 RXDONE_MY_BSS = 1 << 2, 159 RXDONE_MY_BSS = 1 << 2,
156 RXDONE_CRYPTO_IV = 1 << 3, 160 RXDONE_CRYPTO_IV = 1 << 3,
157 RXDONE_CRYPTO_ICV = 1 << 4, 161 RXDONE_CRYPTO_ICV = 1 << 4,
162 RXDONE_L2PAD = 1 << 5,
158}; 163};
159 164
160/** 165/**
@@ -267,6 +272,8 @@ enum txentry_desc_flags {
267 * 272 *
268 * @flags: Descriptor flags (See &enum queue_entry_flags). 273 * @flags: Descriptor flags (See &enum queue_entry_flags).
269 * @queue: Queue identification (See &enum data_queue_qid). 274 * @queue: Queue identification (See &enum data_queue_qid).
275 * @header_length: Length of 802.11 header.
276 * @l2pad: Amount of padding to align 802.11 payload to 4-byte boundrary.
270 * @length_high: PLCP length high word. 277 * @length_high: PLCP length high word.
271 * @length_low: PLCP length low word. 278 * @length_low: PLCP length low word.
272 * @signal: PLCP signal. 279 * @signal: PLCP signal.
@@ -287,6 +294,9 @@ struct txentry_desc {
287 294
288 enum data_queue_qid queue; 295 enum data_queue_qid queue;
289 296
297 u16 header_length;
298 u16 l2pad;
299
290 u16 length_high; 300 u16 length_high;
291 u16 length_low; 301 u16 length_low;
292 u16 signal; 302 u16 signal;