aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-12-02 18:20:42 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 09:35:51 -0500
commitdddfb478b26e29a2b47f655ec219e743b8111015 (patch)
tree040ba518fcddc9b2e89a8bbf9d3a2e2d24f14b0e /drivers/net/wireless/rt2x00/rt2x00queue.c
parent0b927a079106e5f66c736e297370d3feb008e28e (diff)
rt2x00: Implement HW encryption (rt2500usb)
rt2500usb supports hardware encryption. rt2500usb supports up to 4 shared and pairwise keys. 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.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 7f908a17e36..e4a1dbeb18f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -420,8 +420,12 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
* the frame so we can provide it to the driver seperately.
*/
if (test_bit(ENTRY_TXD_ENCRYPT, &txdesc.flags) &&
- !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc.flags))
- rt2x00crypto_tx_remove_iv(skb, iv_len);
+ !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc.flags)) {
+ if (test_bit(CONFIG_CRYPTO_COPY_IV, &queue->rt2x00dev->flags))
+ rt2x00crypto_tx_copy_iv(skb, iv_len);
+ else
+ rt2x00crypto_tx_remove_iv(skb, iv_len);
+ }
/*
* It could be possible that the queue was corrupted and this