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>
This commit is contained in:
Ivo van Doorn 2008-12-02 18:20:42 +01:00 committed by John W. Linville
parent 0b927a0791
commit dddfb478b2
8 changed files with 156 additions and 9 deletions

View file

@ -69,6 +69,18 @@ unsigned int rt2x00crypto_tx_overhead(struct ieee80211_tx_info *tx_info)
return overhead;
}
void rt2x00crypto_tx_copy_iv(struct sk_buff *skb, unsigned int iv_len)
{
struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb);
unsigned int header_length = ieee80211_get_hdrlen_from_skb(skb);
if (unlikely(!iv_len))
return;
/* Copy IV/EIV data */
memcpy(skbdesc->iv, skb->data + header_length, iv_len);
}
void rt2x00crypto_tx_remove_iv(struct sk_buff *skb, unsigned int iv_len)
{
struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb);