]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/hostap/hostap_common.h
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
[linux-2.6] / drivers / net / wireless / hostap / hostap_common.h
index 199a65841ad347a5247236ce63dcb2b2c1e9d9ba..ceb7f1e5e9e096d50012a3999e21f1014ee2e48d 100644 (file)
@@ -1,27 +1,14 @@
 #ifndef HOSTAP_COMMON_H
 #define HOSTAP_COMMON_H
 
-#define BIT(x) (1 << (x))
+#include <linux/types.h>
+#include <linux/if_ether.h>
 
-#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
-#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
+#define BIT(x) (1 << (x))
 
 
 /* IEEE 802.11 defines */
 
-#define WLAN_FC_PVER (BIT(1) | BIT(0))
-#define WLAN_FC_TODS BIT(8)
-#define WLAN_FC_FROMDS BIT(9)
-#define WLAN_FC_MOREFRAG BIT(10)
-#define WLAN_FC_RETRY BIT(11)
-#define WLAN_FC_PWRMGT BIT(12)
-#define WLAN_FC_MOREDATA BIT(13)
-#define WLAN_FC_ISWEP BIT(14)
-#define WLAN_FC_ORDER BIT(15)
-
-#define WLAN_CAPABILITY_ESS WLAN_CAPABILITY_BSS
-
-
 /* Information Element IDs */
 #define WLAN_EID_SSID 0
 #define WLAN_EID_SUPP_RATES 1
@@ -378,9 +365,9 @@ enum {
 
 #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024
 #define PRISM2_HOSTAPD_RID_HDR_LEN \
-((int) (&((struct prism2_hostapd_param *) 0)->u.rid.data))
+offsetof(struct prism2_hostapd_param, u.rid.data)
 #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
-((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data))
+offsetof(struct prism2_hostapd_param, u.generic_elem.data)
 
 /* Maximum length for algorithm names (-1 for nul termination) used in ioctl()
  */