diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-04 08:22:13 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-04 08:22:13 -0400 |
commit | 13d1ef29bc5125d7b77c5f6cdfde5ed31226005c (patch) | |
tree | fdab36f463a248d5be3bd46a5ad181f6d354ddde /include/net | |
parent | e2608361be343e6220e0a87e04ff224eb037df31 (diff) | |
parent | ff0037b259e8b47843176142131844bc80fd2887 (diff) | |
download | linux-13d1ef29bc5125d7b77c5f6cdfde5ed31226005c.tar.bz2 |
Merge rsync://bughost.org/repos/ieee80211-delta/
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ieee80211.h | 30 | ||||
-rw-r--r-- | include/net/ieee80211_crypt.h | 6 |
2 files changed, 32 insertions, 4 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 4851756202c5..58f62224e7ea 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 0c9d859d912e..0a1c2d82ca4b 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 |