Connect without scanning using PBSS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am working with an 802.11ad system, which uses PBSS. I am trying to use wpa_supplicant to connect without scanning - for this, I'm using ap_scan=2 as per the configuration below:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=2

network={
       ssid="myNetwork"
       key_mgmt=NONE
       pbss=1
       frequency=62640
       bssid=01:02:03:04:05:06
}

However, wpa_supplicant will not connect because it is not passing the BSSID or frequency down to the driver.

From looking at hostap/wpa_supplicant/wpa_supplicant.c, I can see two options:
a) Setting IBSS (I believe this is the wrong approach) as per the line:

if (ssid->mode == WPAS_MODE_IBSS && ssid->bssid_set &&
            wpa_s->conf->ap_scan == 2)

b) Somehow setting the bss parameter (cwork->bss) in wpas_start_assoc_cb. However from my understanding this is set when wpa_supplicant scans (which I am trying to avoid, as I just want to connect directly).

Is there any way round this without modifying wpa_supplicant? I have done the following, which works (possibly could be combined with the previous if statement..)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index d37a994f9..73f780145 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3787,6 +3787,12 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
                params.fixed_bssid = 1;
        }

+       if (ssid->pbss == 1 && ssid->bssid_set && wpa_s->conf->ap_scan == 2) {
+               params.bssid = ssid->bssid;
+               params.fixed_bssid = 1;
+               params.freq.freq = ssid->frequency;
+       }
+
        /* Initial frequency for IBSS/mesh */
        if ((ssid->mode == WPAS_MODE_IBSS || ssid->mode == WPAS_MODE_MESH) &&
            ssid->frequency > 0 && params.freq.freq == 0)

Many thanks,
Chris

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux