]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/ieee80211.h
[INET]: Uninline the __inet_inherit_port call.
[linux-2.6-omap-h63xx.git] / include / net / ieee80211.h
index b174ebb277a96668f058e469b0753503c34f164b..529816bfbc52a3d5c54f1ef72cb7fa29a8b46f19 100644 (file)
@@ -6,8 +6,8 @@
  * LAN access point) driver for Intersil Prism2/2.5/3.
  *
  * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
- * <jkmaline@cc.hut.fi>
- * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
+ * <j@w1.fi>
+ * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
  *
  * Adaption to a generic IEEE 802.11 stack by James Ketrenos
  * <jketreno@linux.intel.com>
@@ -115,15 +115,18 @@ extern u32 ieee80211_debug_level;
 do { if (ieee80211_debug_level & (level)) \
   printk(KERN_DEBUG "ieee80211: %c %s " fmt, \
          in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
+static inline bool ieee80211_ratelimit_debug(u32 level)
+{
+       return (ieee80211_debug_level & level) && net_ratelimit();
+}
 #else
 #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
+static inline bool ieee80211_ratelimit_debug(u32 level)
+{
+       return false;
+}
 #endif                         /* CONFIG_IEEE80211_DEBUG */
 
-/* debug macros not dependent on CONFIG_IEEE80211_DEBUG */
-
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-
 /* escape_essid() is intended to be used in debug (and possibly error)
  * messages. It should never be used for passing essid to user space. */
 const char *escape_essid(const char *essid, u8 essid_len);
@@ -180,7 +183,6 @@ const char *escape_essid(const char *essid, u8 essid_len);
 #define IEEE80211_DEBUG_RX(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a)
 #define IEEE80211_DEBUG_QOS(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_QOS, f, ## a)
 #include <linux/netdevice.h>
-#include <linux/wireless.h>
 #include <linux/if_arp.h>      /* ARPHRD_ETHER */
 
 #ifndef WIRELESS_SPY
@@ -218,7 +220,7 @@ struct ieee80211_snap_hdr {
 #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
 
 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
-#define WLAN_GET_SEQ_SEQ(seq)  ((seq) & IEEE80211_SCTL_SEQ)
+#define WLAN_GET_SEQ_SEQ(seq)  (((seq) & IEEE80211_SCTL_SEQ) >> 4)
 
 /* Authentication algorithms */
 #define WLAN_AUTH_OPEN 0
@@ -674,7 +676,7 @@ struct ieee80211_probe_request {
 
 struct ieee80211_probe_response {
        struct ieee80211_hdr_3addr header;
-       u32 time_stamp[2];
+       __le32 time_stamp[2];
        __le16 beacon_interval;
        __le16 capability;
        /* SSID, supported rates, FH params, DS params,
@@ -715,8 +717,8 @@ struct ieee80211_txb {
        u8 encrypted;
        u8 rts_included;
        u8 reserved;
-       __le16 frag_size;
-       __le16 payload_size;
+       u16 frag_size;
+       u16 payload_size;
        struct sk_buff *fragments[0];
 };
 
@@ -1037,6 +1039,10 @@ struct ieee80211_device {
        /* host performs multicast decryption */
        int host_mc_decrypt;
 
+       /* host should strip IV and ICV from protected frames */
+       /* meaningful only when hardware decryption is being used */
+       int host_strip_iv_icv;
+
        int host_open_frag;
        int host_build_iv;
        int ieee802_1x;         /* is IEEE 802.1X used */
@@ -1076,6 +1082,8 @@ struct ieee80211_device {
        int perfect_rssi;
        int worst_rssi;
 
+       u16 prev_seq_ctl;       /* used to drop duplicate frames */
+
        /* Callback functions */
        void (*set_security) (struct net_device * dev,
                              struct ieee80211_security * sec);
@@ -1285,6 +1293,8 @@ extern u8 ieee80211_get_channel_flags(struct ieee80211_device *ieee,
 extern const struct ieee80211_channel *ieee80211_get_channel(struct
                                                             ieee80211_device
                                                             *ieee, u8 channel);
+extern u32 ieee80211_channel_to_freq(struct ieee80211_device * ieee,
+                                     u8 channel);
 
 /* ieee80211_wx.c */
 extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,