diff options
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_tx.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_wx.c | 2 | ||||
-rw-r--r-- | include/net/lib80211.h | 3 | ||||
-rw-r--r-- | net/wireless/lib80211_crypt_ccmp.c | 1 | ||||
-rw-r--r-- | net/wireless/lib80211_crypt_tkip.c | 1 | ||||
-rw-r--r-- | net/wireless/lib80211_crypt_wep.c | 1 |
7 files changed, 4 insertions, 21 deletions
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h index 284b0e4cb815..7b9539a1b54a 100644 --- a/drivers/net/wireless/ipw2x00/libipw.h +++ b/drivers/net/wireless/ipw2x00/libipw.h | |||
@@ -828,7 +828,6 @@ struct libipw_device { | |||
828 | int host_strip_iv_icv; | 828 | int host_strip_iv_icv; |
829 | 829 | ||
830 | int host_open_frag; | 830 | int host_open_frag; |
831 | int host_build_iv; | ||
832 | int ieee802_1x; /* is IEEE 802.1X used */ | 831 | int ieee802_1x; /* is IEEE 802.1X used */ |
833 | 832 | ||
834 | /* WPA data */ | 833 | /* WPA data */ |
diff --git a/drivers/net/wireless/ipw2x00/libipw_tx.c b/drivers/net/wireless/ipw2x00/libipw_tx.c index da8beac7fcf3..01c88a71abe1 100644 --- a/drivers/net/wireless/ipw2x00/libipw_tx.c +++ b/drivers/net/wireless/ipw2x00/libipw_tx.c | |||
@@ -260,7 +260,7 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev) | |||
260 | int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size, | 260 | int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size, |
261 | rts_required; | 261 | rts_required; |
262 | unsigned long flags; | 262 | unsigned long flags; |
263 | int encrypt, host_encrypt, host_encrypt_msdu, host_build_iv; | 263 | int encrypt, host_encrypt, host_encrypt_msdu; |
264 | __be16 ether_type; | 264 | __be16 ether_type; |
265 | int bytes, fc, hdr_len; | 265 | int bytes, fc, hdr_len; |
266 | struct sk_buff *skb_frag; | 266 | struct sk_buff *skb_frag; |
@@ -301,7 +301,6 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev) | |||
301 | 301 | ||
302 | host_encrypt = ieee->host_encrypt && encrypt && crypt; | 302 | host_encrypt = ieee->host_encrypt && encrypt && crypt; |
303 | host_encrypt_msdu = ieee->host_encrypt_msdu && encrypt && crypt; | 303 | host_encrypt_msdu = ieee->host_encrypt_msdu && encrypt && crypt; |
304 | host_build_iv = ieee->host_build_iv && encrypt && crypt; | ||
305 | 304 | ||
306 | if (!encrypt && ieee->ieee802_1x && | 305 | if (!encrypt && ieee->ieee802_1x && |
307 | ieee->drop_unencrypted && ether_type != htons(ETH_P_PAE)) { | 306 | ieee->drop_unencrypted && ether_type != htons(ETH_P_PAE)) { |
@@ -313,7 +312,7 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev) | |||
313 | skb_copy_from_linear_data(skb, dest, ETH_ALEN); | 312 | skb_copy_from_linear_data(skb, dest, ETH_ALEN); |
314 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, src, ETH_ALEN); | 313 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, src, ETH_ALEN); |
315 | 314 | ||
316 | if (host_encrypt || host_build_iv) | 315 | if (host_encrypt) |
317 | fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA | | 316 | fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA | |
318 | IEEE80211_FCTL_PROTECTED; | 317 | IEEE80211_FCTL_PROTECTED; |
319 | else | 318 | else |
@@ -467,7 +466,7 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev) | |||
467 | for (; i < nr_frags; i++) { | 466 | for (; i < nr_frags; i++) { |
468 | skb_frag = txb->fragments[i]; | 467 | skb_frag = txb->fragments[i]; |
469 | 468 | ||
470 | if (host_encrypt || host_build_iv) | 469 | if (host_encrypt) |
471 | skb_reserve(skb_frag, | 470 | skb_reserve(skb_frag, |
472 | crypt->ops->extra_mpdu_prefix_len); | 471 | crypt->ops->extra_mpdu_prefix_len); |
473 | 472 | ||
@@ -502,15 +501,6 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev) | |||
502 | * to insert the IV between the header and the payload */ | 501 | * to insert the IV between the header and the payload */ |
503 | if (host_encrypt) | 502 | if (host_encrypt) |
504 | libipw_encrypt_fragment(ieee, skb_frag, hdr_len); | 503 | libipw_encrypt_fragment(ieee, skb_frag, hdr_len); |
505 | else if (host_build_iv) { | ||
506 | atomic_inc(&crypt->refcnt); | ||
507 | if (crypt->ops->build_iv) | ||
508 | crypt->ops->build_iv(skb_frag, hdr_len, | ||
509 | ieee->sec.keys[ieee->sec.active_key], | ||
510 | ieee->sec.key_sizes[ieee->sec.active_key], | ||
511 | crypt->priv); | ||
512 | atomic_dec(&crypt->refcnt); | ||
513 | } | ||
514 | 504 | ||
515 | if (ieee->config & | 505 | if (ieee->config & |
516 | (CFG_LIBIPW_COMPUTE_FCS | CFG_LIBIPW_RESERVE_FCS)) | 506 | (CFG_LIBIPW_COMPUTE_FCS | CFG_LIBIPW_RESERVE_FCS)) |
diff --git a/drivers/net/wireless/ipw2x00/libipw_wx.c b/drivers/net/wireless/ipw2x00/libipw_wx.c index 8a4bae44b109..d7bd6cf00a81 100644 --- a/drivers/net/wireless/ipw2x00/libipw_wx.c +++ b/drivers/net/wireless/ipw2x00/libipw_wx.c | |||
@@ -320,7 +320,7 @@ int libipw_wx_set_encode(struct libipw_device *ieee, | |||
320 | }; | 320 | }; |
321 | int i, key, key_provided, len; | 321 | int i, key, key_provided, len; |
322 | struct lib80211_crypt_data **crypt; | 322 | struct lib80211_crypt_data **crypt; |
323 | int host_crypto = ieee->host_encrypt || ieee->host_decrypt || ieee->host_build_iv; | 323 | int host_crypto = ieee->host_encrypt || ieee->host_decrypt; |
324 | DECLARE_SSID_BUF(ssid); | 324 | DECLARE_SSID_BUF(ssid); |
325 | 325 | ||
326 | LIBIPW_DEBUG_WX("SET_ENCODE\n"); | 326 | LIBIPW_DEBUG_WX("SET_ENCODE\n"); |
diff --git a/include/net/lib80211.h b/include/net/lib80211.h index fb4e2784857d..848cce1bb7a5 100644 --- a/include/net/lib80211.h +++ b/include/net/lib80211.h | |||
@@ -54,9 +54,6 @@ struct lib80211_crypto_ops { | |||
54 | /* deinitialize crypto context and free allocated private data */ | 54 | /* deinitialize crypto context and free allocated private data */ |
55 | void (*deinit) (void *priv); | 55 | void (*deinit) (void *priv); |
56 | 56 | ||
57 | int (*build_iv) (struct sk_buff * skb, int hdr_len, | ||
58 | u8 *key, int keylen, void *priv); | ||
59 | |||
60 | /* encrypt/decrypt return < 0 on error or >= 0 on success. The return | 57 | /* encrypt/decrypt return < 0 on error or >= 0 on success. The return |
61 | * value from decrypt_mpdu is passed as the keyidx value for | 58 | * value from decrypt_mpdu is passed as the keyidx value for |
62 | * decrypt_msdu. skb must have enough head and tail room for the | 59 | * decrypt_msdu. skb must have enough head and tail room for the |
diff --git a/net/wireless/lib80211_crypt_ccmp.c b/net/wireless/lib80211_crypt_ccmp.c index b7fa31d5fd13..dacb3b4b1bdb 100644 --- a/net/wireless/lib80211_crypt_ccmp.c +++ b/net/wireless/lib80211_crypt_ccmp.c | |||
@@ -467,7 +467,6 @@ static struct lib80211_crypto_ops lib80211_crypt_ccmp = { | |||
467 | .name = "CCMP", | 467 | .name = "CCMP", |
468 | .init = lib80211_ccmp_init, | 468 | .init = lib80211_ccmp_init, |
469 | .deinit = lib80211_ccmp_deinit, | 469 | .deinit = lib80211_ccmp_deinit, |
470 | .build_iv = lib80211_ccmp_hdr, | ||
471 | .encrypt_mpdu = lib80211_ccmp_encrypt, | 470 | .encrypt_mpdu = lib80211_ccmp_encrypt, |
472 | .decrypt_mpdu = lib80211_ccmp_decrypt, | 471 | .decrypt_mpdu = lib80211_ccmp_decrypt, |
473 | .encrypt_msdu = NULL, | 472 | .encrypt_msdu = NULL, |
diff --git a/net/wireless/lib80211_crypt_tkip.c b/net/wireless/lib80211_crypt_tkip.c index a7f995613f1f..0fe40510e2cb 100644 --- a/net/wireless/lib80211_crypt_tkip.c +++ b/net/wireless/lib80211_crypt_tkip.c | |||
@@ -757,7 +757,6 @@ static struct lib80211_crypto_ops lib80211_crypt_tkip = { | |||
757 | .name = "TKIP", | 757 | .name = "TKIP", |
758 | .init = lib80211_tkip_init, | 758 | .init = lib80211_tkip_init, |
759 | .deinit = lib80211_tkip_deinit, | 759 | .deinit = lib80211_tkip_deinit, |
760 | .build_iv = lib80211_tkip_hdr, | ||
761 | .encrypt_mpdu = lib80211_tkip_encrypt, | 760 | .encrypt_mpdu = lib80211_tkip_encrypt, |
762 | .decrypt_mpdu = lib80211_tkip_decrypt, | 761 | .decrypt_mpdu = lib80211_tkip_decrypt, |
763 | .encrypt_msdu = lib80211_michael_mic_add, | 762 | .encrypt_msdu = lib80211_michael_mic_add, |
diff --git a/net/wireless/lib80211_crypt_wep.c b/net/wireless/lib80211_crypt_wep.c index 6d41e05ca33b..e2e88878ba35 100644 --- a/net/wireless/lib80211_crypt_wep.c +++ b/net/wireless/lib80211_crypt_wep.c | |||
@@ -269,7 +269,6 @@ static struct lib80211_crypto_ops lib80211_crypt_wep = { | |||
269 | .name = "WEP", | 269 | .name = "WEP", |
270 | .init = lib80211_wep_init, | 270 | .init = lib80211_wep_init, |
271 | .deinit = lib80211_wep_deinit, | 271 | .deinit = lib80211_wep_deinit, |
272 | .build_iv = lib80211_wep_build_iv, | ||
273 | .encrypt_mpdu = lib80211_wep_encrypt, | 272 | .encrypt_mpdu = lib80211_wep_encrypt, |
274 | .decrypt_mpdu = lib80211_wep_decrypt, | 273 | .decrypt_mpdu = lib80211_wep_decrypt, |
275 | .encrypt_msdu = NULL, | 274 | .encrypt_msdu = NULL, |