aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDedy Lansky <dlansky@codeaurora.org>2015-02-08 08:52:03 -0500
committerJohannes Berg <johannes.berg@intel.com>2015-03-03 09:56:01 -0500
commit6eb18137643fee5f182d85c818062b4feddfb76b (patch)
tree6c9712c947498fd2291a53acfe2be48711a881ac /include/net
parent76a70e9c4b45fc1dbcbff6f7ae88ac7e1ddfb677 (diff)
cfg80211: add bss_type and privacy arguments in cfg80211_get_bss()
802.11ad adds new a network type (PBSS) and changes the capability field interpretation for the DMG (60G) band. The same 2 bits that were interpreted as "ESS" and "IBSS" before are re-used as a 2-bit field with 3 valid values (and 1 reserved). Valid values are: "IBSS", "PBSS" (new) and "AP". In order to get the BSS struct for the new PBSS networks, change the cfg80211_get_bss() function to take a new enum ieee80211_bss_type argument with the valid network types, as "capa_mask" and "capa_val" no longer work correctly (the search must be band-aware now.) The remaining bits in "capa_mask" and "capa_val" are used only for privacy matching so replace those two with a privacy enum as well. Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> [rewrite commit log, tiny fixes] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h39
1 files changed, 37 insertions, 2 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 64e09e1e8099..28fff56f5606 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -215,6 +215,39 @@ enum ieee80211_rate_flags {
215}; 215};
216 216
217/** 217/**
218 * enum ieee80211_bss_type - BSS type filter
219 *
220 * @IEEE80211_BSS_TYPE_ESS: Infrastructure BSS
221 * @IEEE80211_BSS_TYPE_PBSS: Personal BSS
222 * @IEEE80211_BSS_TYPE_IBSS: Independent BSS
223 * @IEEE80211_BSS_TYPE_MBSS: Mesh BSS
224 * @IEEE80211_BSS_TYPE_ANY: Wildcard value for matching any BSS type
225 */
226enum ieee80211_bss_type {
227 IEEE80211_BSS_TYPE_ESS,
228 IEEE80211_BSS_TYPE_PBSS,
229 IEEE80211_BSS_TYPE_IBSS,
230 IEEE80211_BSS_TYPE_MBSS,
231 IEEE80211_BSS_TYPE_ANY
232};
233
234/**
235 * enum ieee80211_privacy - BSS privacy filter
236 *
237 * @IEEE80211_PRIVACY_ON: privacy bit set
238 * @IEEE80211_PRIVACY_OFF: privacy bit clear
239 * @IEEE80211_PRIVACY_ANY: Wildcard value for matching any privacy setting
240 */
241enum ieee80211_privacy {
242 IEEE80211_PRIVACY_ON,
243 IEEE80211_PRIVACY_OFF,
244 IEEE80211_PRIVACY_ANY
245};
246
247#define IEEE80211_PRIVACY(x) \
248 ((x) ? IEEE80211_PRIVACY_ON : IEEE80211_PRIVACY_OFF)
249
250/**
218 * struct ieee80211_rate - bitrate definition 251 * struct ieee80211_rate - bitrate definition
219 * 252 *
220 * This structure describes a bitrate that an 802.11 PHY can 253 * This structure describes a bitrate that an 802.11 PHY can
@@ -4012,14 +4045,16 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
4012 struct ieee80211_channel *channel, 4045 struct ieee80211_channel *channel,
4013 const u8 *bssid, 4046 const u8 *bssid,
4014 const u8 *ssid, size_t ssid_len, 4047 const u8 *ssid, size_t ssid_len,
4015 u16 capa_mask, u16 capa_val); 4048 enum ieee80211_bss_type bss_type,
4049 enum ieee80211_privacy);
4016static inline struct cfg80211_bss * 4050static inline struct cfg80211_bss *
4017cfg80211_get_ibss(struct wiphy *wiphy, 4051cfg80211_get_ibss(struct wiphy *wiphy,
4018 struct ieee80211_channel *channel, 4052 struct ieee80211_channel *channel,
4019 const u8 *ssid, size_t ssid_len) 4053 const u8 *ssid, size_t ssid_len)
4020{ 4054{
4021 return cfg80211_get_bss(wiphy, channel, NULL, ssid, ssid_len, 4055 return cfg80211_get_bss(wiphy, channel, NULL, ssid, ssid_len,
4022 WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS); 4056 IEEE80211_BSS_TYPE_IBSS,
4057 IEEE80211_PRIVACY_ANY);
4023} 4058}
4024 4059
4025/** 4060/**