]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HE: Handle HE capability in neighbor DB
authorJohn Crispin <john@phrozen.org>
Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 27 May 2019 14:40:33 +0000 (17:40 +0300)
Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
src/ap/neighbor_db.c

index b3570201b612d7a53022cd906fd9d6fd959bd190..54154432286b30a628f6e79ed401297ec141adc2 100644 (file)
@@ -139,15 +139,15 @@ void hostapd_free_neighbor_db(struct hostapd_data *hapd)
 
 #ifdef NEED_AP_MLME
 static enum nr_chan_width hostapd_get_nr_chan_width(struct hostapd_data *hapd,
-                                                   int ht, int vht)
+                                                   int ht, int vht, int he)
 {
        u8 oper_chwidth = hostapd_get_oper_chwidth(hapd->iconf);
 
-       if (!ht && !vht)
+       if (!ht && !vht && !he)
                return NR_CHAN_WIDTH_20;
        if (!hapd->iconf->secondary_channel)
                return NR_CHAN_WIDTH_20;
-       if (!vht || oper_chwidth == CHANWIDTH_USE_HT)
+       if ((!vht && !he) || oper_chwidth == CHANWIDTH_USE_HT)
                return NR_CHAN_WIDTH_40;
        if (oper_chwidth == CHANWIDTH_80MHZ)
                return NR_CHAN_WIDTH_80;
@@ -166,6 +166,7 @@ void hostapd_neighbor_set_own_report(struct hostapd_data *hapd)
        u16 capab = hostapd_own_capab_info(hapd);
        int ht = hapd->iconf->ieee80211n && !hapd->conf->disable_11n;
        int vht = hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac;
+       int he = hapd->iconf->ieee80211ax;
        struct wpa_ssid_value ssid;
        u8 channel, op_class;
        u8 center_freq1_idx = 0, center_freq2_idx = 0;
@@ -211,7 +212,7 @@ void hostapd_neighbor_set_own_report(struct hostapd_data *hapd)
                                          &op_class, &channel) ==
            NUM_HOSTAPD_MODES)
                return;
-       width = hostapd_get_nr_chan_width(hapd, ht, vht);
+       width = hostapd_get_nr_chan_width(hapd, ht, vht, he);
        if (vht) {
                center_freq1_idx = hostapd_get_oper_centr_freq_seg0_idx(
                        hapd->iconf);