From de21d1d6e2e2d4114c53227cea49b80a9b07bfba Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 20 May 2019 09:55:09 +0200 Subject: [PATCH] HE: Handle HE capability in neighbor DB Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin --- src/ap/neighbor_db.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c index b3570201b..541544322 100644 --- a/src/ap/neighbor_db.c +++ b/src/ap/neighbor_db.c @@ -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);