From 1ea893fde29d8cf1639da8989f4b843dc3283ca8 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 11 Feb 2009 17:17:10 -0500 Subject: 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 Signed-off-by: John W. Linville --- drivers/net/wireless/hostap/hostap_main.c | 38 +++++++++++-------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'drivers/net/wireless/hostap/hostap_main.c') 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 @@ #include #include #include -#include #include #include @@ -543,7 +542,8 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx) fc = __le16_to_cpu(rx->frame_control); printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " "data_len=%d%s%s\n", - fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, + fc, (fc & IEEE80211_FCTL_FTYPE) >> 2, + (fc & IEEE80211_FCTL_STYPE) >> 4, __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl), __le16_to_cpu(rx->data_len), fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", @@ -570,7 +570,8 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx) fc = __le16_to_cpu(tx->frame_control); printk(KERN_DEBUG " FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x " "data_len=%d%s%s\n", - fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, + fc, (fc & IEEE80211_FCTL_FTYPE) >> 2, + (fc & IEEE80211_FCTL_STYPE) >> 4, __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl), __le16_to_cpu(tx->data_len), fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", @@ -593,29 +594,16 @@ static int hostap_80211_header_parse(const struct sk_buff *skb, } -int hostap_80211_get_hdrlen(u16 fc) +int hostap_80211_get_hdrlen(__le16 fc) { - int hdrlen = 24; - - switch (WLAN_FC_GET_TYPE(fc)) { - case IEEE80211_FTYPE_DATA: - if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) - hdrlen = 30; /* Addr4 */ - break; - case IEEE80211_FTYPE_CTL: - switch (WLAN_FC_GET_STYPE(fc)) { - case IEEE80211_STYPE_CTS: - case IEEE80211_STYPE_ACK: - hdrlen = 10; - break; - default: - hdrlen = 16; - break; - } - break; - } - - return hdrlen; + if (ieee80211_is_data(fc) && ieee80211_has_a4 (fc)) + return 30; /* Addr4 */ + else if (ieee80211_is_cts(fc) || ieee80211_is_ack(fc)) + return 10; + else if (ieee80211_is_ctl(fc)) + return 16; + + return 24; } -- cgit v1.2.1