]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/drivers/driver_nl80211.c
nl80211/SME: Use reassociation when roaming within the ESS
[thirdparty/hostap.git] / src / drivers / driver_nl80211.c
index 626d74fb7fe8ad6a8cdfd57a1575f645805ab3fc..ac3f4dd123fdafdae70214f3c36ce0e5f4ab33af 100644 (file)
@@ -2229,6 +2229,13 @@ static int phy_info_handler(struct nl_msg *msg, void *arg)
                                tb_band[NL80211_BAND_ATTR_HT_CAPA]);
                }
 
+               if (tb_band[NL80211_BAND_ATTR_HT_MCS_SET] &&
+                   nla_len(tb_band[NL80211_BAND_ATTR_HT_MCS_SET])) {
+                       u8 *mcs;
+                       mcs = nla_data(tb_band[NL80211_BAND_ATTR_HT_MCS_SET]);
+                       os_memcpy(mode->mcs_set, mcs, 16);
+               }
+
                nla_for_each_nested(nl_freq, tb_band[NL80211_BAND_ATTR_FREQS], rem_freq) {
                        nla_parse(tb_freq, NL80211_FREQUENCY_ATTR_MAX, nla_data(nl_freq),
                                  nla_len(nl_freq), freq_policy);
@@ -3592,6 +3599,13 @@ static int wpa_driver_nl80211_associate(
 
        NLA_PUT_FLAG(msg, NL80211_ATTR_CONTROL_PORT);
 
+       if (params->prev_bssid) {
+               wpa_printf(MSG_DEBUG, "  * prev_bssid=" MACSTR,
+                          MAC2STR(params->prev_bssid));
+               NLA_PUT(msg, NL80211_ATTR_PREV_BSSID, ETH_ALEN,
+                       params->prev_bssid);
+       }
+
        ret = send_and_recv_msgs(drv, msg, NULL, NULL);
        msg = NULL;
        if (ret) {
@@ -4411,10 +4425,10 @@ static void *i802_init(struct hostapd_data *hapd,
        /* start listening for EAPOL on the default AP interface */
        add_ifidx(drv, drv->ifindex);
 
-       if (params->bssid) {
-               if (hostapd_set_iface_flags(drv, drv->ifname, 0))
-                       goto failed;
+       if (hostapd_set_iface_flags(drv, drv->ifname, 0))
+               goto failed;
 
+       if (params->bssid) {
                if (set_ifhwaddr(drv, drv->ifname, params->bssid))
                        goto failed;
        }