]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Use a separate variable to track whether HT is enabled
authorJouni Malinen <j@w1.fi>
Sat, 10 Jan 2015 10:52:50 +0000 (12:52 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 10 Jan 2015 15:35:53 +0000 (17:35 +0200)
A network profile parameter should not be used to check whether the
currently operating mesh has HT enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/mesh.c
wpa_supplicant/mesh_mpm.c
wpa_supplicant/wpa_supplicant_i.h

index 7a4f3de0648123eeb2bca25bb1f4856937216324..8c5713f9d44e952c76267bcf5840287e122b020d 100644 (file)
@@ -319,6 +319,7 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
        params.meshid = ssid->ssid;
        params.meshid_len = ssid->ssid_len;
        params.freq = ssid->frequency;
+       wpa_s->mesh_ht_enabled = ssid->mesh_ht_mode > CHAN_NO_HT;
        if (ssid->beacon_int > 0)
                params.beacon_int = ssid->beacon_int;
        else if (wpa_s->conf->beacon_int > 0)
index e7c53eacebfc781d5471b64e522b9704a2f58175..4a259ff4ef3219cca8d4dc8202bd14b82f5ce11a 100644 (file)
@@ -229,8 +229,7 @@ static void mesh_mpm_send_plink_action(struct wpa_supplicant *wpa_s,
                  2 + 96 + /* AMPE */
                  2 + 16;  /* MIC */
 #ifdef CONFIG_IEEE80211N
-       if (type != PLINK_CLOSE &&
-           wpa_s->current_ssid->mesh_ht_mode > CHAN_NO_HT) {
+       if (type != PLINK_CLOSE && wpa_s->mesh_ht_enabled) {
                buf_len += 2 + 26 + /* HT capabilities */
                           2 + 22;  /* HT operation */
        }
@@ -323,8 +322,7 @@ static void mesh_mpm_send_plink_action(struct wpa_supplicant *wpa_s,
        }
 
 #ifdef CONFIG_IEEE80211N
-       if (type != PLINK_CLOSE &&
-           wpa_s->current_ssid->mesh_ht_mode > CHAN_NO_HT) {
+       if (type != PLINK_CLOSE && wpa_s->mesh_ht_enabled) {
                pos = hostapd_eid_ht_capabilities(bss, ht_capa_oper);
                pos = hostapd_eid_ht_operation(bss, pos);
                wpabuf_put_data(buf, ht_capa_oper, pos - ht_capa_oper);
index c541ccb4e41e2e4ab96f9b1c0ed20b6ecc453b2e..68bdf51a5f2ef3371161d8ad66193ed5a13041fc 100644 (file)
@@ -703,6 +703,7 @@ struct wpa_supplicant {
        struct mesh_rsn *mesh_rsn;
        int mesh_if_idx;
        unsigned int mesh_if_created:1;
+       unsigned int mesh_ht_enabled:1;
 #endif /* CONFIG_MESH */
 
        unsigned int off_channel_freq;