aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/ieee80211.h30
-rw-r--r--include/net/ieee80211_crypt.h6
2 files changed, 32 insertions, 4 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index 4851756..58f6222 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -613,7 +613,7 @@ struct ieee80211_disassoc {
} __attribute__ ((packed));
/* Alias deauth for disassoc */
-#define ieee82011_deauth ieee80211_disassoc
+#define ieee80211_deauth ieee80211_disassoc
struct ieee80211_probe_request {
struct ieee80211_hdr_3addr header;
@@ -1045,6 +1045,34 @@ static inline u8 *ieee80211_get_payload(struct ieee80211_hdr *hdr)
}
+static inline int ieee80211_is_ofdm_rate(u8 rate)
+{
+ switch (rate & ~IEEE80211_BASIC_RATE_MASK) {
+ case IEEE80211_OFDM_RATE_6MB:
+ case IEEE80211_OFDM_RATE_9MB:
+ case IEEE80211_OFDM_RATE_12MB:
+ case IEEE80211_OFDM_RATE_18MB:
+ case IEEE80211_OFDM_RATE_24MB:
+ case IEEE80211_OFDM_RATE_36MB:
+ case IEEE80211_OFDM_RATE_48MB:
+ case IEEE80211_OFDM_RATE_54MB:
+ return 1;
+ }
+ return 0;
+}
+
+static inline int ieee80211_is_cck_rate(u8 rate)
+{
+ switch (rate & ~IEEE80211_BASIC_RATE_MASK) {
+ case IEEE80211_CCK_RATE_1MB:
+ case IEEE80211_CCK_RATE_2MB:
+ case IEEE80211_CCK_RATE_5MB:
+ case IEEE80211_CCK_RATE_11MB:
+ return 1;
+ }
+ return 0;
+}
+
/* ieee80211.c */
extern void free_ieee80211(struct net_device *dev);
extern struct net_device *alloc_ieee80211(int sizeof_priv);
diff --git a/include/net/ieee80211_crypt.h b/include/net/ieee80211_crypt.h
index 0c9d859..0a1c2d8 100644
--- a/include/net/ieee80211_crypt.h
+++ b/include/net/ieee80211_crypt.h
@@ -26,7 +26,7 @@
#include <linux/skbuff.h>
enum {
- IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1<<0),
+ IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1 << 0),
};
struct ieee80211_crypto_ops {
@@ -65,8 +65,8 @@ struct ieee80211_crypto_ops {
char *(*print_stats) (char *p, void *priv);
/* Crypto specific flag get/set for configuration settings */
- unsigned long (*get_flags)(void *priv);
- unsigned long (*set_flags)(unsigned long flags, void *priv);
+ unsigned long (*get_flags) (void *priv);
+ unsigned long (*set_flags) (unsigned long flags, void *priv);
/* maximum number of bytes added by encryption; encrypt buf is
* allocated with extra_prefix_len bytes, copy of in_buf, and