diff --git a/hostapd/driver.h b/hostapd/driver.h index 6db7d37db..f695da1ca 100644 --- a/hostapd/driver.h +++ b/hostapd/driver.h @@ -47,6 +47,7 @@ struct hostapd_sta_add_params { struct hostapd_freq_params { int mode; int freq; + int channel; int ht_enabled; int sec_channel_offset; /* 0 = HT40 disabled, -1 = HT40 enabled, * secondary channel below primary, 1 = HT40 diff --git a/hostapd/driver_i.h b/hostapd/driver_i.h index fcf08f0f5..a38f2abc3 100644 --- a/hostapd/driver_i.h +++ b/hostapd/driver_i.h @@ -242,8 +242,8 @@ hostapd_get_inact_sec(struct hostapd_data *hapd, const u8 *addr) } static inline int -hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, int ht_enabled, - int sec_channel_offset) +hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, int channel, + int ht_enabled, int sec_channel_offset) { struct hostapd_freq_params data; if (hapd->driver == NULL) @@ -253,6 +253,7 @@ hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, int ht_enabled, os_memset(&data, 0, sizeof(data)); data.mode = mode; data.freq = freq; + data.channel = channel; data.ht_enabled = ht_enabled; data.sec_channel_offset = sec_channel_offset; return hapd->driver->set_freq(hapd->drv_priv, &data); diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c index aa43eacac..f2272424f 100644 --- a/hostapd/hostapd.c +++ b/hostapd/hostapd.c @@ -1391,6 +1391,7 @@ static int setup_interface(struct hostapd_iface *iface) hapd->iconf->channel, freq); if (hostapd_set_freq(hapd, hapd->iconf->hw_mode, freq, + hapd->iconf->channel, hapd->iconf->ieee80211n, hapd->iconf->secondary_channel)) { wpa_printf(MSG_ERROR, "Could not set channel for "