[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.c b/drivers/net/wireless/hostap/hostap.c
index 182891f..75c75103 100644
--- a/drivers/net/wireless/hostap/hostap.c
+++ b/drivers/net/wireless/hostap/hostap.c
@@ -26,6 +26,8 @@
 #include <linux/rtnetlink.h>
 #include <linux/wireless.h>
 #include <net/iw_handler.h>
+#include <net/ieee80211.h>
+#include <net/ieee80211_crypt.h>
 #include <asm/uaccess.h>
 
 #include "hostap_wlan.h"
@@ -596,7 +598,7 @@
 	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), WLAN_FC_GET_STYPE(fc),
+	       fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc),
 	       __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl),
 	       __le16_to_cpu(rx->data_len),
 	       fc & WLAN_FC_TODS ? " [ToDS]" : "",
@@ -625,7 +627,7 @@
 	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), WLAN_FC_GET_STYPE(fc),
+	       fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc),
 	       __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl),
 	       __le16_to_cpu(tx->data_len),
 	       fc & WLAN_FC_TODS ? " [ToDS]" : "",
@@ -668,13 +670,13 @@
 {
 	int hdrlen = 24;
 
-	switch (WLAN_FC_GET_TYPE(fc)) {
+	switch (HOSTAP_FC_GET_TYPE(fc)) {
 	case WLAN_FC_TYPE_DATA:
 		if ((fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS))
 			hdrlen = 30; /* Addr4 */
 		break;
 	case WLAN_FC_TYPE_CTRL:
-		switch (WLAN_FC_GET_STYPE(fc)) {
+		switch (HOSTAP_FC_GET_STYPE(fc)) {
 		case WLAN_FC_STYPE_CTS:
 		case WLAN_FC_STYPE_ACK:
 			hdrlen = 10;