Add new drv_flag for indicating user space AP MLME
authorJouni Malinen <j@w1.fi>
Wed, 1 Aug 2012 07:34:35 +0000 (10:34 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 1 Aug 2012 07:34:35 +0000 (10:34 +0300)
This makes it easier for hostapd to determine at runtime which
operations to use.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/drivers/driver.h
src/drivers/driver_nl80211.c

index 4a8604d..d510882 100644 (file)
@@ -831,6 +831,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_AP_UAPSD                      0x00400000
 /* Driver supports inactivity timer in AP mode */
 #define WPA_DRIVER_FLAGS_INACTIVITY_TIMER              0x00800000
+/* Driver expects user space implementation of MLME in AP mode */
+#define WPA_DRIVER_FLAGS_AP_MLME                       0x01000000
        unsigned int flags;
 
        int max_scan_ssids;
index a30f2e3..8b0a5f7 100644 (file)
@@ -2631,9 +2631,16 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
        drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
        drv->capa.flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
 
-       if (!info.device_ap_sme)
+       if (!info.device_ap_sme) {
                drv->capa.flags |= WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS;
 
+               /*
+                * No AP SME is currently assumed to also indicate no AP MLME
+                * in the driver/firmware.
+                */
+               drv->capa.flags |= WPA_DRIVER_FLAGS_AP_MLME;
+       }
+
        drv->device_ap_sme = info.device_ap_sme;
        drv->poll_command_supported = info.poll_command_supported;
        drv->data_tx_status = info.data_tx_status;