diff options
author | Dan Williams <dcbw@redhat.com> | 2009-02-11 17:17:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:51:41 -0500 |
commit | 1ea893fde29d8cf1639da8989f4b843dc3283ca8 (patch) | |
tree | b942df0bc99ef1568aab1ce4e42969e9eaf5b3db /drivers/net/wireless/hostap/hostap_main.c | |
parent | 4d8faf6937fd7ada1f523b1cf565ffd2a0623e8c (diff) |
hostap: convert usage of net/ieee80211.h to linux/ieee80211.h
So that net/ieee80211.h can be made private to ipw2x00 in a follow-up.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_main.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_main.c | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 02a312ca8607..5d55f92f654b 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/etherdevice.h> | 26 | #include <linux/etherdevice.h> |
27 | #include <net/net_namespace.h> | 27 | #include <net/net_namespace.h> |
28 | #include <net/iw_handler.h> | 28 | #include <net/iw_handler.h> |
29 | #include <net/ieee80211.h> | ||
30 | #include <net/lib80211.h> | 29 | #include <net/lib80211.h> |
31 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
32 | 31 | ||
@@ -543,7 +542,8 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx) | |||
543 | fc = __le16_to_cpu(rx->frame_control); | 542 | fc = __le16_to_cpu(rx->frame_control); |
544 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " | 543 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " |
545 | "data_len=%d%s%s\n", | 544 | "data_len=%d%s%s\n", |
546 | fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, | 545 | fc, (fc & IEEE80211_FCTL_FTYPE) >> 2, |
546 | (fc & IEEE80211_FCTL_STYPE) >> 4, | ||
547 | __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl), | 547 | __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl), |
548 | __le16_to_cpu(rx->data_len), | 548 | __le16_to_cpu(rx->data_len), |
549 | fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", | 549 | fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", |
@@ -570,7 +570,8 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx) | |||
570 | fc = __le16_to_cpu(tx->frame_control); | 570 | fc = __le16_to_cpu(tx->frame_control); |
571 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " | 571 | printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " |
572 | "data_len=%d%s%s\n", | 572 | "data_len=%d%s%s\n", |
573 | fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, | 573 | fc, (fc & IEEE80211_FCTL_FTYPE) >> 2, |
574 | (fc & IEEE80211_FCTL_STYPE) >> 4, | ||
574 | __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl), | 575 | __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl), |
575 | __le16_to_cpu(tx->data_len), | 576 | __le16_to_cpu(tx->data_len), |
576 | fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", | 577 | fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", |
@@ -593,29 +594,16 @@ static int hostap_80211_header_parse(const struct sk_buff *skb, | |||
593 | } | 594 | } |
594 | 595 | ||
595 | 596 | ||
596 | int hostap_80211_get_hdrlen(u16 fc) | 597 | int hostap_80211_get_hdrlen(__le16 fc) |
597 | { | 598 | { |
598 | int hdrlen = 24; | 599 | if (ieee80211_is_data(fc) && ieee80211_has_a4 (fc)) |
599 | 600 | return 30; /* Addr4 */ | |
600 | switch (WLAN_FC_GET_TYPE(fc)) { | 601 | else if (ieee80211_is_cts(fc) || ieee80211_is_ack(fc)) |
601 | case IEEE80211_FTYPE_DATA: | 602 | return 10; |
602 | if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) | 603 | else if (ieee80211_is_ctl(fc)) |
603 | hdrlen = 30; /* Addr4 */ | 604 | return 16; |
604 | break; | 605 | |
605 | case IEEE80211_FTYPE_CTL: | 606 | return 24; |
606 | switch (WLAN_FC_GET_STYPE(fc)) { | ||
607 | case IEEE80211_STYPE_CTS: | ||
608 | case IEEE80211_STYPE_ACK: | ||
609 | hdrlen = 10; | ||
610 | break; | ||
611 | default: | ||
612 | hdrlen = 16; | ||
613 | break; | ||
614 | } | ||
615 | break; | ||
616 | } | ||
617 | |||
618 | return hdrlen; | ||
619 | } | 607 | } |
620 | 608 | ||
621 | 609 | ||