hostapd: fix ap+sta issues
[openwrt/svn-archive/archive.git] / package / hostapd / patches / 450-reload_freq_change.patch
1 --- a/src/ap/hostapd.c
2 +++ b/src/ap/hostapd.c
3 @@ -137,6 +137,20 @@ 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->secondary_channel)) {
14 + wpa_printf(MSG_ERROR, "Could not set channel for "
15 + "kernel driver");
16 + }
17 +
18 + if (iface->current_mode)
19 + hostapd_prepare_rates(iface, iface->current_mode);
20 +
21 for (j = 0; j < iface->num_bss; j++) {
22 hapd = iface->bss[j];
23 hapd->iconf = newconf;