aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00lib.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00lib.h45
1 files changed, 33 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index eeb2881e818e..5462cb5ad994 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -120,21 +120,42 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb);
120void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); 120void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb);
121 121
122/** 122/**
123 * rt2x00queue_payload_align - Align 802.11 payload to 4-byte boundary 123 * rt2x00queue_align_frame - Align 802.11 frame to 4-byte boundary
124 * @skb: The skb to align
125 *
126 * Align the start of the 802.11 frame to a 4-byte boundary, this could
127 * mean the payload is not aligned properly though.
128 */
129void rt2x00queue_align_frame(struct sk_buff *skb);
130
131/**
132 * rt2x00queue_align_payload - Align 802.11 payload to 4-byte boundary
133 * @skb: The skb to align
134 * @header_length: Length of 802.11 header
135 *
136 * Align the 802.11 payload to a 4-byte boundary, this could
137 * mean the header is not aligned properly though.
138 */
139void rt2x00queue_align_payload(struct sk_buff *skb, unsigned int header_length);
140
141/**
142 * rt2x00queue_insert_l2pad - Align 802.11 header & payload to 4-byte boundary
143 * @skb: The skb to align
144 * @header_length: Length of 802.11 header
145 *
146 * Apply L2 padding to align both header and payload to 4-byte boundary
147 */
148void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length);
149
150/**
151 * rt2x00queue_insert_l2pad - Remove L2 padding from 802.11 frame
124 * @skb: The skb to align 152 * @skb: The skb to align
125 * @l2pad: Should L2 padding be used
126 * @header_length: Length of 802.11 header 153 * @header_length: Length of 802.11 header
127 * 154 *
128 * This function prepares the @skb to be send to the device or mac80211. 155 * Remove L2 padding used to align both header and payload to 4-byte boundary,
129 * If @l2pad is set to true padding will occur between the 802.11 header 156 * by removing the L2 padding the header will no longer be 4-byte aligned.
130 * and payload. Otherwise the padding will be done in front of the 802.11
131 * header.
132 * When @l2pad is set the function will check for the &SKBDESC_L2_PADDED
133 * flag in &skb_frame_desc. If that flag is set, the padding is removed
134 * and the flag cleared. Otherwise the padding is added and the flag is set.
135 */ 157 */
136void rt2x00queue_payload_align(struct sk_buff *skb, 158void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length);
137 bool l2pad, unsigned int header_length);
138 159
139/** 160/**
140 * rt2x00queue_write_tx_frame - Write TX frame to hardware 161 * rt2x00queue_write_tx_frame - Write TX frame to hardware
@@ -324,7 +345,7 @@ void rt2x00crypto_tx_copy_iv(struct sk_buff *skb,
324void rt2x00crypto_tx_remove_iv(struct sk_buff *skb, 345void rt2x00crypto_tx_remove_iv(struct sk_buff *skb,
325 struct txentry_desc *txdesc); 346 struct txentry_desc *txdesc);
326void rt2x00crypto_tx_insert_iv(struct sk_buff *skb, unsigned int header_length); 347void rt2x00crypto_tx_insert_iv(struct sk_buff *skb, unsigned int header_length);
327void rt2x00crypto_rx_insert_iv(struct sk_buff *skb, bool l2pad, 348void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
328 unsigned int header_length, 349 unsigned int header_length,
329 struct rxdone_entry_desc *rxdesc); 350 struct rxdone_entry_desc *rxdesc);
330#else 351#else