nl80211: Basic support for PBSS/PCP
authorLior David <qca_liord@qca.qualcomm.com>
Mon, 8 Feb 2016 10:16:45 +0000 (12:16 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 8 Feb 2016 20:16:04 +0000 (22:16 +0200)
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 pbss flag to the relevant structures to support starting a PCP and
connecting to a PCP. Implement support in the nl80211 driver by using
the new PBSS flag attribute.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
src/drivers/driver.h
src/drivers/driver_nl80211.c

index aad0e04..a4f6704 100644 (file)
@@ -860,6 +860,12 @@ struct wpa_driver_associate_params {
         * RRM (Radio Resource Measurements)
         */
        int rrm_used;
+
+       /**
+        * pbss - If set, connect to a PCP in a PBSS. Otherwise, connect to an
+        * AP as usual. Valid for DMG network only.
+        */
+       int pbss;
 };
 
 enum hide_ssid {
@@ -1087,6 +1093,12 @@ struct wpa_driver_ap_params {
         * reenable - Whether this is to re-enable beaconing
         */
        int reenable;
+
+       /**
+        * pbss - Whether to start a PCP (in PBSS) instead of an AP in
+        * infrastructure BSS. Valid only for DMG network.
+        */
+       int pbss;
 };
 
 struct wpa_driver_mesh_bss_params {
index 4cb92d0..0f312a0 100644 (file)
@@ -3584,6 +3584,12 @@ static int wpa_driver_nl80211_set_ap(void *priv,
        }
 #endif /* CONFIG_P2P */
 
+       if (params->pbss) {
+               wpa_printf(MSG_DEBUG, "nl80211: PBSS");
+               if (nla_put_flag(msg, NL80211_ATTR_PBSS))
+                       goto fail;
+       }
+
        ret = send_and_recv_msgs(drv, msg, NULL, NULL);
        if (ret) {
                wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
@@ -4744,6 +4750,12 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
        if (params->p2p)
                wpa_printf(MSG_DEBUG, "  * P2P group");
 
+       if (params->pbss) {
+               wpa_printf(MSG_DEBUG, "  * PBSS");
+               if (nla_put_flag(msg, NL80211_ATTR_PBSS))
+                       return -1;
+       }
+
        return 0;
 }