hostapd: initial prototype of an ubus binding
[openwrt/svn-archive/archive.git] / package / network / services / hostapd / patches / 450-reload_freq_change.patch
1 --- a/src/ap/hostapd.c
2 +++ b/src/ap/hostapd.c
3 @@ -140,6 +140,24 @@ int hostapd_reload_config(struct hostapd
4 oldconf = hapd->iconf;
5 iface->conf = newconf;
6
7 + hostapd_select_hw_mode(iface);
8 + iface->freq = hostapd_hw_get_freq(hapd, newconf->channel);
9 +
10 + if (hostapd_set_freq(hapd, newconf->hw_mode, iface->freq,
11 + newconf->channel,
12 + newconf->ieee80211n,
13 + newconf->ieee80211ac,
14 + newconf->secondary_channel,
15 + newconf->vht_oper_chwidth,
16 + newconf->vht_oper_centr_freq_seg0_idx,
17 + newconf->vht_oper_centr_freq_seg1_idx)) {
18 + wpa_printf(MSG_ERROR, "Could not set channel for "
19 + "kernel driver");
20 + }
21 +
22 + if (iface->current_mode)
23 + hostapd_prepare_rates(iface, iface->current_mode);
24 +
25 for (j = 0; j < iface->num_bss; j++) {
26 hapd = iface->bss[j];
27 hapd->iconf = newconf;