diff options
-rw-r--r-- | include/net/ieee80211.h | 28 | ||||
-rw-r--r-- | net/ieee80211/ieee80211_rx.c | 16 |
2 files changed, 28 insertions, 16 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 33b595ebef1f..58f62224e7ea 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -1045,6 +1045,34 @@ static inline u8 *ieee80211_get_payload(struct ieee80211_hdr *hdr) | |||
1045 | 1045 | ||
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | static inline int ieee80211_is_ofdm_rate(u8 rate) | ||
1049 | { | ||
1050 | switch (rate & ~IEEE80211_BASIC_RATE_MASK) { | ||
1051 | case IEEE80211_OFDM_RATE_6MB: | ||
1052 | case IEEE80211_OFDM_RATE_9MB: | ||
1053 | case IEEE80211_OFDM_RATE_12MB: | ||
1054 | case IEEE80211_OFDM_RATE_18MB: | ||
1055 | case IEEE80211_OFDM_RATE_24MB: | ||
1056 | case IEEE80211_OFDM_RATE_36MB: | ||
1057 | case IEEE80211_OFDM_RATE_48MB: | ||
1058 | case IEEE80211_OFDM_RATE_54MB: | ||
1059 | return 1; | ||
1060 | } | ||
1061 | return 0; | ||
1062 | } | ||
1063 | |||
1064 | static inline int ieee80211_is_cck_rate(u8 rate) | ||
1065 | { | ||
1066 | switch (rate & ~IEEE80211_BASIC_RATE_MASK) { | ||
1067 | case IEEE80211_CCK_RATE_1MB: | ||
1068 | case IEEE80211_CCK_RATE_2MB: | ||
1069 | case IEEE80211_CCK_RATE_5MB: | ||
1070 | case IEEE80211_CCK_RATE_11MB: | ||
1071 | return 1; | ||
1072 | } | ||
1073 | return 0; | ||
1074 | } | ||
1075 | |||
1048 | /* ieee80211.c */ | 1076 | /* ieee80211.c */ |
1049 | extern void free_ieee80211(struct net_device *dev); | 1077 | extern void free_ieee80211(struct net_device *dev); |
1050 | extern struct net_device *alloc_ieee80211(int sizeof_priv); | 1078 | extern struct net_device *alloc_ieee80211(int sizeof_priv); |
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index fcf05bf677b8..2f4b16c1c143 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
@@ -1020,22 +1020,6 @@ static int ieee80211_handle_assoc_resp(struct ieee80211_device *ieee, struct iee | |||
1020 | 1020 | ||
1021 | /***************************************************/ | 1021 | /***************************************************/ |
1022 | 1022 | ||
1023 | static inline int ieee80211_is_ofdm_rate(u8 rate) | ||
1024 | { | ||
1025 | switch (rate & ~IEEE80211_BASIC_RATE_MASK) { | ||
1026 | case IEEE80211_OFDM_RATE_6MB: | ||
1027 | case IEEE80211_OFDM_RATE_9MB: | ||
1028 | case IEEE80211_OFDM_RATE_12MB: | ||
1029 | case IEEE80211_OFDM_RATE_18MB: | ||
1030 | case IEEE80211_OFDM_RATE_24MB: | ||
1031 | case IEEE80211_OFDM_RATE_36MB: | ||
1032 | case IEEE80211_OFDM_RATE_48MB: | ||
1033 | case IEEE80211_OFDM_RATE_54MB: | ||
1034 | return 1; | ||
1035 | } | ||
1036 | return 0; | ||
1037 | } | ||
1038 | |||
1039 | static inline int ieee80211_network_init(struct ieee80211_device *ieee, struct ieee80211_probe_response | 1023 | static inline int ieee80211_network_init(struct ieee80211_device *ieee, struct ieee80211_probe_response |
1040 | *beacon, | 1024 | *beacon, |
1041 | struct ieee80211_network *network, | 1025 | struct ieee80211_network *network, |