aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00lib.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-08-04 10:37:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-22 16:29:58 -0400
commit2bb057d07a0bc17475a7bf897fc41667ab08b73f (patch)
tree55461e52caa34a45a67aaf9e3f1c608f96c77d59 /drivers/net/wireless/rt2x00/rt2x00lib.h
parent8e7cdbb6333ef7654e708bd60e50a123688dcd7b (diff)
rt2x00: Implement HW encryption
Various rt2x00 devices support hardware encryption. Most of them require the IV/EIV to be generated by mac80211, but require it to be provided seperately instead of within the frame itself. This means that rt2x00lib should extract the data from the frame and place it in the frame descriptor. During RX the IV/EIV is provided in the descriptor by the hardware which means that it should be inserted into the frame by rt2x00lib. 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/rt2x00lib.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00lib.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index c5fb3a72cf37..7bbc16b1b6c6 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -181,6 +181,8 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev);
181void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev); 181void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev);
182void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, 182void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
183 enum rt2x00_dump_type type, struct sk_buff *skb); 183 enum rt2x00_dump_type type, struct sk_buff *skb);
184void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
185 enum cipher cipher, enum rx_crypto status);
184#else 186#else
185static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) 187static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
186{ 188{
@@ -195,9 +197,54 @@ static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
195 struct sk_buff *skb) 197 struct sk_buff *skb)
196{ 198{
197} 199}
200
201static inline void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
202 enum cipher cipher,
203 enum rx_crypto status)
204{
205}
198#endif /* CONFIG_RT2X00_LIB_DEBUGFS */ 206#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
199 207
200/* 208/*
209 * Crypto handlers.
210 */
211#ifdef CONFIG_RT2X00_LIB_CRYPTO
212enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf *key);
213unsigned int rt2x00crypto_tx_overhead(struct ieee80211_tx_info *tx_info);
214void rt2x00crypto_tx_remove_iv(struct sk_buff *skb, unsigned int iv_len);
215void rt2x00crypto_tx_insert_iv(struct sk_buff *skb);
216void rt2x00crypto_rx_insert_iv(struct sk_buff *skb, unsigned int align,
217 unsigned int header_length,
218 struct rxdone_entry_desc *rxdesc);
219#else
220static inline enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf *key)
221{
222 return CIPHER_NONE;
223}
224
225static inline unsigned int rt2x00crypto_tx_overhead(struct ieee80211_tx_info *tx_info)
226{
227 return 0;
228}
229
230static inline void rt2x00crypto_tx_remove_iv(struct sk_buff *skb,
231 unsigned int iv_len)
232{
233}
234
235static inline void rt2x00crypto_tx_insert_iv(struct sk_buff *skb)
236{
237}
238
239static inline void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
240 unsigned int align,
241 unsigned int header_length,
242 struct rxdone_entry_desc *rxdesc)
243{
244}
245#endif
246
247/*
201 * RFkill handlers. 248 * RFkill handlers.
202 */ 249 */
203#ifdef CONFIG_RT2X00_LIB_RFKILL 250#ifdef CONFIG_RT2X00_LIB_RFKILL