Search Linux Wireless

Re: Comparison of wpa_supplicant with -Dnl80211 and -Dwext, WEP and WPA

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

 



> wep_nl80211
> -----------
>  0.00000  0.00000: Initializing interface ...
>  0.03985  0.03985: ##ERROR: nl80211: set_key failed; err=-67 Link has been severed)
>  0.03992  0.00007: ##ERROR: nl80211: set_key failed; err=-67 Link has been severed)
>  0.03998  0.00006: ##ERROR: nl80211: set_key failed; err=-67 Link has been severed)
>  0.04004  0.00006: ##ERROR: nl80211: set_key failed; err=-67 Link has been severed)

This is because of net/wireless/nl80211.c, function nl80211_key_allowed():

        switch (wdev->iftype) {
	...
        case NL80211_IFTYPE_STATION:
                if (wdev->sme_state != CFG80211_SME_CONNECTED)
                        return -ENOLINK;
                break;


> wep_wext
> --------
>  0.00000  0.00000: Initializing interface ...
>  0.08801  0.08801: Setting scan request: 0 sec 100000 usec
>  0.25167  0.16365: ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

This is because wpa_supplicant very early - in
wpa_driver_wext_finish_drv_init() - calls
wpa_driver_wext_disconnect(). This in turn sets a random 32
character long ESSID, as a desparate means to disconnect.

Now that an essid is set, the calling chain in the kernel

   cfg80211_netdev_notifier_call(), case NETDEV_UP
   cfg80211_mgd_wext_connect()
   __cfg80211_connect()
  cfg80211_conn_scan(

get's executed. This starts a scan.

Later, when wpa_supplicant tries to get a scan result, it will
only get an -EBUSY because of net/wireless/scan.c, function
cfg80211_wext_siwscan():

        if (rdev->scan_req) {
                err = -EBUSY;
                goto out;
        }



However, I'm wondering: if several scan commands are
supposed to add up into the BSS list anyway (and each BSS list
entry by default pruned after 15 seconds), why is it an error
to access the current state of the BSS list while a scan is
in progress?

In other words, I think the following sequence should be ok:

Request Scan
scan finishes
get scan result (2 BSS entries)
request scan
get scan result (2 BSS entries)
scan finishes   (the scan is still in process)
get scan result (5 BSS entries)

If user-space ask for intermediate results, it should be
allowed to do so at any time. If user-space wants full
results, it can wait for the scan-done event.



This would mean that the BSS entries get individual locks
and that rdev->scan_req isn't used as an implicit lock.

-- 
http://www.holgerschurig.de
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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