Wpa Supplicant
wpa_supplicant.JPG
  • ap_scan=0
    • Driver takes care of scanning, AP selection, and IEEE 802.11 association parameters (e.g., WPA IE generation);
    • this mode can also be used with non-WPA drivers when using IEEE 802.1X mode;
    • do not try to associate with APs (i.e., external program needs to control association).
    • This mode must also be used when using wired Ethernet drivers.
  • ap_scan=1(default) (wpa_supplicant controls AP selection based on the information received from Beacon and/or Probe Response frames)
    1. wpa_supplicant has found a suitable BSS to associate with
      • wpa_supplicant requests scan with SIOCSIWSCAN
      • driver reports scan complete with wireless event SIOCGIWSCAN
      • wpa_supplicant reads scan results with SIOCGIWSCAN (multiple call if a larget buffer is needed)
      • wpa_supplicant decides which AP to use based on scan results
    2. the driver is configured to try to associate with this BSS
      • wpa_supplicant configures driver to associate with the selected BSS (SIOCSIWMODE, SIOCSIWGENIE, SIOCSIWAUTH, SIOCSIWFREQ, SIOCSIWESSID, SIOCSIWAP)
  • ap_scan=2 (drivers control WPA IE generation and roaming)
    • the driver is configured to try to associate with a network using the configured SSID and security policy
      • wpa_supplicant configures driver to associate with an SSID (SIOCSIWMODE, SIOCSIWGENIE, SIOCSIWAUTH, SIOCSIWESSID)
    • ap_scan has to be set to 2 for IBSS
    • this mode should allow such drivers to work with hidden SSIDs and optimized roaming
    • like 0, but associate with APs using security policy and SSID (but not BSSID)
  • After this, ap_scan=1 amd 2 both modes use similar steps:
    • optionally (or required for drivers that generate WPA/RSN IE for (Re)AssocReq), driver reports association parameters (AssocReq IEs) with wireless event IWEVASSOCREQIE (and optionally IWEVASSOCRESPIE)
    • driver reports association with wireless event SIOCGIWAP
    • wpa_supplicant takes care of EAPOL frame handling (validating information from associnfo and if needed, from scan results if WPA/RSN IE from the Beacon frame is not reported through associnfo)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License