X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fap%2Fbeacon.c;h=38600e6ff83d10c851e9de7f2eb7a25cb1037e31;hb=196c9c7cd2c6f0ac3fe14ff6cad0ae0b2b6e3402;hp=56df3182e4028aa24a5c6d70d7c536451001821a;hpb=19318861a527bf09f6deb02579597d4e95aaeeb4;p=mech_eap.git diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 56df318..38600e6 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -951,6 +951,9 @@ void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params) int ieee802_11_set_beacon(struct hostapd_data *hapd) { struct wpa_driver_ap_params params; + struct hostapd_freq_params freq; + struct hostapd_iface *iface = hapd->iface; + struct hostapd_config *iconf = iface->conf; struct wpabuf *beacon, *proberesp, *assocresp; int res, ret = -1; @@ -972,6 +975,17 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd) params.proberesp_ies = proberesp; params.assocresp_ies = assocresp; + if (iface->current_mode && + hostapd_set_freq_params(&freq, iconf->hw_mode, iface->freq, + iconf->channel, iconf->ieee80211n, + iconf->ieee80211ac, + iconf->secondary_channel, + iconf->vht_oper_chwidth, + iconf->vht_oper_centr_freq_seg0_idx, + iconf->vht_oper_centr_freq_seg1_idx, + iface->current_mode->vht_capab) == 0) + params.freq = &freq; + res = hostapd_drv_set_ap(hapd, ¶ms); hostapd_free_ap_extra_ies(hapd, beacon, proberesp, assocresp); if (res)