aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/bss.h
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-02-08 10:30:04 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-08 20:23:56 (GMT)
commitb907491281b06b4dee9e0d0326e23c67ce486eb5 (patch)
tree91d050cd4f5cbefda1005eac5581690497bf912f /wpa_supplicant/bss.h
parent86b5c400a0fe2567e40119c31657076b87cd5f18 (diff)
downloadhostap-b907491281b06b4dee9e0d0326e23c67ce486eb5.zip
hostap-b907491281b06b4dee9e0d0326e23c67ce486eb5.tar.gz
hostap-b907491281b06b4dee9e0d0326e23c67ce486eb5.tar.bz2
wpa_supplicant: Basic support for PBSS/PCP
PBSS (Personal Basic Service Set) is a new BSS type for DMG networks. It is similar to infrastructure BSS, having an AP-like entity called PCP (PBSS Control Point), but it has few differences. PBSS support is mandatory for IEEE 802.11ad devices. Add a new "pbss" argument to network block. The argument is used in the following scenarios: 1. When network has mode=2 (AP), when pbss flag is set will start as a PCP instead of an AP. 2. When network has mode=0 (station), when pbss flag is set will connect to PCP instead of AP. The function wpa_scan_res_match() was modified to match BSS according to the pbss flag in the network block (wpa_ssid structure). When pbss flag is set it will match only PCPs, and when it is clear it will match only APs. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/bss.h')
-rw-r--r--wpa_supplicant/bss.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h
index 4a782af..f7f72f3 100644
--- a/wpa_supplicant/bss.h
+++ b/wpa_supplicant/bss.h
@@ -148,6 +148,17 @@ static inline int bss_is_dmg(const struct wpa_bss *bss)
return bss->freq > 45000;
}
+/**
+ * Test whether a BSS is a PBSS.
+ * This checks whether a BSS is a DMG-band PBSS. PBSS is used for P2P DMG
+ * network.
+ */
+static inline int bss_is_pbss(struct wpa_bss *bss)
+{
+ return bss_is_dmg(bss) &&
+ (bss->caps & IEEE80211_CAP_DMG_MASK) == IEEE80211_CAP_DMG_PBSS;
+}
+
static inline void wpa_bss_update_level(struct wpa_bss *bss, int new_level)
{
if (bss != NULL && new_level < 0)