X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=wpa_supplicant%2Fbss.h;h=f7f72f396bb3eb2013b087e53f0d1d2fc5a6183d;hb=9eece21357b6706ca783635b761350e74a8e8992;hp=4a782afe86e2a0d640bdc58c3222ecccf624635d;hpb=8c4a1026b83b7bfb14c1f69d2b9a7c4be6c0758e;p=mech_eap.git 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)