]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add driver flag for firmware-based BSS selection
authorVivek Natarajan <nataraja@qca.qualcomm.com>
Mon, 26 Sep 2011 11:26:55 +0000 (14:26 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 26 Sep 2011 11:26:55 +0000 (14:26 +0300)
This new flag can be used to change wpa_supplicant behavior in the
default ap_scan=1 mode to move BSS selection into the driver (likely
firmware). This commit is only adding the flag; separate commits
will be used to change the actual connection/roaming behavior.

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

index 08623e75bb8497f902b4b275651f3c83f34c1e33..1a5fe05ce81b11ab6813543eb7eb734178c6b2ef 100644 (file)
@@ -689,6 +689,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS               0x00010000
 /* Driver indicates TX status events for Deauth/Disassoc frames */
 #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS              0x00020000
+/* Driver supports roaming (BSS selection) in firmware */
+#define WPA_DRIVER_FLAGS_BSS_SELECTION                 0x00040000
        unsigned int flags;
 
        int max_scan_ssids;
index eaafae78764cd78c0d12be9f4e5d189c80cea62c..6dfad0ac8cf865212d8e810760489692f9abb991 100644 (file)
@@ -1688,6 +1688,7 @@ struct wiphy_info_data {
        int connect_supported;
        int offchan_tx_supported;
        int max_remain_on_chan;
+       int firmware_roam;
 };
 
 
@@ -1811,6 +1812,9 @@ broken_combination:
        if (tb[NL80211_ATTR_OFFCHANNEL_TX_OK])
                info->offchan_tx_supported = 1;
 
+       if (tb[NL80211_ATTR_ROAM_SUPPORT])
+               info->firmware_roam = 1;
+
        if (tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION])
                info->max_remain_on_chan =
                        nla_get_u32(tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION]);
@@ -1884,6 +1888,11 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
                drv->capa.flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_TX;
        }
 
+       if (info.firmware_roam) {
+               wpa_printf(MSG_DEBUG, "nl80211: Using driver-based roaming");
+               drv->capa.flags |= WPA_DRIVER_FLAGS_BSS_SELECTION;
+       }
+
        drv->capa.flags |= WPA_DRIVER_FLAGS_SANE_ERROR_CODES;
        drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
        if (info.p2p_supported)