diff options
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-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 |
3 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h index 4736861bc4f8..70f5586d96bd 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"); |