diff options
author | James Ketrenos <jketreno@linux.intel.com> | 2005-09-21 12:54:36 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-21 23:02:30 -0400 |
commit | ee34af37c095482b9dba254b9cd7cb5e65e9a25e (patch) | |
tree | eed75aee11663053e658d839fb91bc8dfae56ecb /net/ieee80211/ieee80211_crypt_tkip.c | |
parent | e0d369d1d969fc9e4fd08a20f6dad04d369aceea (diff) |
[PATCH] ieee80211: Renamed ieee80211_hdr to ieee80211_hdr_3addr
tree e9c18b2c8e5ad446a4d213243c2dcf9fd1652a7b
parent 4e97ad6ae7084a4f741e94e76c41c68bc7c5a76a
author James Ketrenos <jketreno@linux.intel.com> 1124444315 -0500
committer James Ketrenos <jketreno@linux.intel.com> 1127312922 -0500
Renamed ieee80211_hdr to ieee80211_hdr_3addr and modified ieee80211_hdr
to just contain the frame_ctrl and duration_id.
Changed uses of ieee80211_hdr to ieee80211_hdr_4addr or
ieee80211_hdr_3addr based on what was expected for that portion of code.
NOTE: This requires changes to ipw2100, ipw2200, hostap, and atmel
drivers.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'net/ieee80211/ieee80211_crypt_tkip.c')
-rw-r--r-- | net/ieee80211/ieee80211_crypt_tkip.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c index 0c495f07e71..f091aacd429 100644 --- a/net/ieee80211/ieee80211_crypt_tkip.c +++ b/net/ieee80211/ieee80211_crypt_tkip.c | |||
@@ -265,11 +265,11 @@ static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
265 | struct ieee80211_tkip_data *tkey = priv; | 265 | struct ieee80211_tkip_data *tkey = priv; |
266 | int len; | 266 | int len; |
267 | u8 rc4key[16], *pos, *icv; | 267 | u8 rc4key[16], *pos, *icv; |
268 | struct ieee80211_hdr *hdr; | 268 | struct ieee80211_hdr_4addr *hdr; |
269 | u32 crc; | 269 | u32 crc; |
270 | struct scatterlist sg; | 270 | struct scatterlist sg; |
271 | 271 | ||
272 | hdr = (struct ieee80211_hdr *)skb->data; | 272 | hdr = (struct ieee80211_hdr_4addr *)skb->data; |
273 | 273 | ||
274 | if (tkey->ieee->tkip_countermeasures) { | 274 | if (tkey->ieee->tkip_countermeasures) { |
275 | if (net_ratelimit()) { | 275 | if (net_ratelimit()) { |
@@ -334,13 +334,13 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
334 | u8 keyidx, *pos; | 334 | u8 keyidx, *pos; |
335 | u32 iv32; | 335 | u32 iv32; |
336 | u16 iv16; | 336 | u16 iv16; |
337 | struct ieee80211_hdr *hdr; | 337 | struct ieee80211_hdr_4addr *hdr; |
338 | u8 icv[4]; | 338 | u8 icv[4]; |
339 | u32 crc; | 339 | u32 crc; |
340 | struct scatterlist sg; | 340 | struct scatterlist sg; |
341 | int plen; | 341 | int plen; |
342 | 342 | ||
343 | hdr = (struct ieee80211_hdr *)skb->data; | 343 | hdr = (struct ieee80211_hdr_4addr *)skb->data; |
344 | 344 | ||
345 | if (tkey->ieee->tkip_countermeasures) { | 345 | if (tkey->ieee->tkip_countermeasures) { |
346 | if (net_ratelimit()) { | 346 | if (net_ratelimit()) { |
@@ -466,9 +466,9 @@ static int michael_mic(struct ieee80211_tkip_data *tkey, u8 * key, u8 * hdr, | |||
466 | 466 | ||
467 | static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr) | 467 | static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr) |
468 | { | 468 | { |
469 | struct ieee80211_hdr *hdr11; | 469 | struct ieee80211_hdr_4addr *hdr11; |
470 | 470 | ||
471 | hdr11 = (struct ieee80211_hdr *)skb->data; | 471 | hdr11 = (struct ieee80211_hdr_4addr *)skb->data; |
472 | switch (le16_to_cpu(hdr11->frame_ctl) & | 472 | switch (le16_to_cpu(hdr11->frame_ctl) & |
473 | (IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS)) { | 473 | (IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS)) { |
474 | case IEEE80211_FCTL_TODS: | 474 | case IEEE80211_FCTL_TODS: |
@@ -517,7 +517,8 @@ static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, | |||
517 | 517 | ||
518 | #if WIRELESS_EXT >= 18 | 518 | #if WIRELESS_EXT >= 18 |
519 | static void ieee80211_michael_mic_failure(struct net_device *dev, | 519 | static void ieee80211_michael_mic_failure(struct net_device *dev, |
520 | struct ieee80211_hdr *hdr, int keyidx) | 520 | struct ieee80211_hdr_4addr *hdr, |
521 | int keyidx) | ||
521 | { | 522 | { |
522 | union iwreq_data wrqu; | 523 | union iwreq_data wrqu; |
523 | struct iw_michaelmicfailure ev; | 524 | struct iw_michaelmicfailure ev; |
@@ -537,7 +538,8 @@ static void ieee80211_michael_mic_failure(struct net_device *dev, | |||
537 | } | 538 | } |
538 | #elif WIRELESS_EXT >= 15 | 539 | #elif WIRELESS_EXT >= 15 |
539 | static void ieee80211_michael_mic_failure(struct net_device *dev, | 540 | static void ieee80211_michael_mic_failure(struct net_device *dev, |
540 | struct ieee80211_hdr *hdr, int keyidx) | 541 | struct ieee80211_hdr_4addr *hdr, |
542 | int keyidx) | ||
541 | { | 543 | { |
542 | union iwreq_data wrqu; | 544 | union iwreq_data wrqu; |
543 | char buf[128]; | 545 | char buf[128]; |
@@ -551,9 +553,8 @@ static void ieee80211_michael_mic_failure(struct net_device *dev, | |||
551 | wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); | 553 | wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); |
552 | } | 554 | } |
553 | #else /* WIRELESS_EXT >= 15 */ | 555 | #else /* WIRELESS_EXT >= 15 */ |
554 | static inline void ieee80211_michael_mic_failure(struct net_device *dev, | 556 | static inline void ieee80211_michael_mic_failure(struct net_device *dev, struct ieee80211_hdr_4addr |
555 | struct ieee80211_hdr *hdr, | 557 | *hdr, int keyidx) |
556 | int keyidx) | ||
557 | { | 558 | { |
558 | } | 559 | } |
559 | #endif /* WIRELESS_EXT >= 15 */ | 560 | #endif /* WIRELESS_EXT >= 15 */ |
@@ -572,8 +573,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx, | |||
572 | skb->data + hdr_len, skb->len - 8 - hdr_len, mic)) | 573 | skb->data + hdr_len, skb->len - 8 - hdr_len, mic)) |
573 | return -1; | 574 | return -1; |
574 | if (memcmp(mic, skb->data + skb->len - 8, 8) != 0) { | 575 | if (memcmp(mic, skb->data + skb->len - 8, 8) != 0) { |
575 | struct ieee80211_hdr *hdr; | 576 | struct ieee80211_hdr_4addr *hdr; |
576 | hdr = (struct ieee80211_hdr *)skb->data; | 577 | hdr = (struct ieee80211_hdr_4addr *)skb->data; |
577 | printk(KERN_DEBUG "%s: Michael MIC verification failed for " | 578 | printk(KERN_DEBUG "%s: Michael MIC verification failed for " |
578 | "MSDU from " MAC_FMT " keyidx=%d\n", | 579 | "MSDU from " MAC_FMT " keyidx=%d\n", |
579 | skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2), | 580 | skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2), |