diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ieee80211.h | 20 | ||||
-rw-r--r-- | include/net/lib80211.h | 31 |
2 files changed, 31 insertions, 20 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 93a56de3594b..dec10c41e2ec 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -127,10 +127,6 @@ static inline bool ieee80211_ratelimit_debug(u32 level) | |||
127 | } | 127 | } |
128 | #endif /* CONFIG_IEEE80211_DEBUG */ | 128 | #endif /* CONFIG_IEEE80211_DEBUG */ |
129 | 129 | ||
130 | /* escape_essid() is intended to be used in debug (and possibly error) | ||
131 | * messages. It should never be used for passing essid to user space. */ | ||
132 | const char *escape_essid(const char *essid, u8 essid_len); | ||
133 | |||
134 | /* | 130 | /* |
135 | * To use the debug system: | 131 | * To use the debug system: |
136 | * | 132 | * |
@@ -1135,22 +1131,6 @@ static inline void *ieee80211_priv(struct net_device *dev) | |||
1135 | return ((struct ieee80211_device *)netdev_priv(dev))->priv; | 1131 | return ((struct ieee80211_device *)netdev_priv(dev))->priv; |
1136 | } | 1132 | } |
1137 | 1133 | ||
1138 | static inline int ieee80211_is_empty_essid(const char *essid, int essid_len) | ||
1139 | { | ||
1140 | /* Single white space is for Linksys APs */ | ||
1141 | if (essid_len == 1 && essid[0] == ' ') | ||
1142 | return 1; | ||
1143 | |||
1144 | /* Otherwise, if the entire essid is 0, we assume it is hidden */ | ||
1145 | while (essid_len) { | ||
1146 | essid_len--; | ||
1147 | if (essid[essid_len] != '\0') | ||
1148 | return 0; | ||
1149 | } | ||
1150 | |||
1151 | return 1; | ||
1152 | } | ||
1153 | |||
1154 | static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, | 1134 | static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, |
1155 | int mode) | 1135 | int mode) |
1156 | { | 1136 | { |
diff --git a/include/net/lib80211.h b/include/net/lib80211.h new file mode 100644 index 000000000000..91a64f358cef --- /dev/null +++ b/include/net/lib80211.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * lib80211.h -- common bits for IEEE802.11 wireless drivers | ||
3 | * | ||
4 | * Copyright (c) 2008, John W. Linville <linville@tuxdriver.com> | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | #ifndef LIB80211_H | ||
9 | #define LIB80211_H | ||
10 | |||
11 | /* escape_ssid() is intended to be used in debug (and possibly error) | ||
12 | * messages. It should never be used for passing ssid to user space. */ | ||
13 | const char *escape_ssid(const char *ssid, u8 ssid_len); | ||
14 | |||
15 | static inline int is_empty_ssid(const char *ssid, int ssid_len) | ||
16 | { | ||
17 | /* Single white space is for Linksys APs */ | ||
18 | if (ssid_len == 1 && ssid[0] == ' ') | ||
19 | return 1; | ||
20 | |||
21 | /* Otherwise, if the entire ssid is 0, we assume it is hidden */ | ||
22 | while (ssid_len) { | ||
23 | ssid_len--; | ||
24 | if (ssid[ssid_len] != '\0') | ||
25 | return 0; | ||
26 | } | ||
27 | |||
28 | return 1; | ||
29 | } | ||
30 | |||
31 | #endif /* LIB80211_H */ | ||