[PATCH] hostap: Start using net/ieee80211.h

Preparations for starting to use net/ieee80211 instead of private
IEEE 802.11 implementation. Include net/ieee80211.h and
net/ieee80211_crypt.h into files that will be needed these in the
future. Remove duplicate definitions from hostap_common.h and
rename WLAN_FC_GET_{TYPE,STYPE} macros for now sinc net/ieee80211.h
is using incompatible definitions. This will be resolved in the
future by updating Host AP to use the versions that do not shift
type/stype.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index 026d47d..a0da9b9 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -21,7 +21,7 @@
 
 	fc = le16_to_cpu(hdr->frame_control);
 	printk(KERN_DEBUG "   FC=0x%04x (type=%d:%d)%s%s",
-	       fc, WLAN_FC_GET_TYPE(fc), WLAN_FC_GET_STYPE(fc),
+	       fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc),
 	       fc & WLAN_FC_TODS ? " [ToDS]" : "",
 	       fc & WLAN_FC_FROMDS ? " [FromDS]" : "");
 
@@ -224,7 +224,7 @@
 
 	sc = le16_to_cpu(hdr->seq_ctrl);
 	frag = WLAN_GET_SEQ_FRAG(sc);
-	seq = WLAN_GET_SEQ_SEQ(sc);
+	seq = WLAN_GET_SEQ_SEQ(sc) >> 4;
 
 	if (frag == 0) {
 		/* Reserve enough space to fit maximum frame length */
@@ -274,7 +274,7 @@
 	struct prism2_frag_entry *entry;
 
 	sc = le16_to_cpu(hdr->seq_ctrl);
-	seq = WLAN_GET_SEQ_SEQ(sc);
+	seq = WLAN_GET_SEQ_SEQ(sc) >> 4;
 
 	entry = prism2_frag_cache_find(local, seq, -1, hdr->addr2, hdr->addr1);
 
@@ -719,8 +719,8 @@
 		goto rx_dropped;
 
 	fc = le16_to_cpu(hdr->frame_control);
-	type = WLAN_FC_GET_TYPE(fc);
-	stype = WLAN_FC_GET_STYPE(fc);
+	type = HOSTAP_FC_GET_TYPE(fc);
+	stype = HOSTAP_FC_GET_STYPE(fc);
 	sc = le16_to_cpu(hdr->seq_ctrl);
 	frag = WLAN_GET_SEQ_FRAG(sc);
 	hdrlen = hostap_80211_get_hdrlen(fc);
@@ -896,7 +896,7 @@
 			printk(KERN_DEBUG "%s: Rx cannot get skb from "
 			       "fragment cache (morefrag=%d seq=%u frag=%u)\n",
 			       dev->name, (fc & WLAN_FC_MOREFRAG) != 0,
-			       WLAN_GET_SEQ_SEQ(sc), frag);
+			       WLAN_GET_SEQ_SEQ(sc) >> 4, frag);
 			goto rx_dropped;
 		}