diff --git a/hostapd/driver.h b/hostapd/driver.h index bede01d18..8cfca8a64 100644 --- a/hostapd/driver.h +++ b/hostapd/driver.h @@ -131,9 +131,7 @@ struct wpa_driver_ops { int (*get_inact_sec)(void *priv, const u8 *addr); int (*sta_clear_stats)(void *priv, const u8 *addr); - /* note: set_freq() is deprecated; use set_freq2() instead */ - int (*set_freq)(void *priv, int mode, int freq); - int (*set_freq2)(void *priv, struct hostapd_freq_params *freq); + int (*set_freq)(void *priv, struct hostapd_freq_params *freq); int (*set_rts)(void *priv, int rts); int (*get_rts)(void *priv, int *rts); int (*set_frag)(void *priv, int frag); diff --git a/hostapd/driver_i.h b/hostapd/driver_i.h index f6716b794..c01ca22a4 100644 --- a/hostapd/driver_i.h +++ b/hostapd/driver_i.h @@ -249,21 +249,17 @@ static inline int hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, int ht_enabled, int sec_channel_offset) { + struct hostapd_freq_params data; if (hapd->driver == NULL) return 0; - if (hapd->driver->set_freq2) { - struct hostapd_freq_params data; - os_memset(&data, 0, sizeof(data)); - data.mode = mode; - data.freq = freq; - data.ht_enabled = ht_enabled; - data.sec_channel_offset = sec_channel_offset; - return hapd->driver->set_freq2(hapd->drv_priv, &data); - } - if (hapd->driver->set_freq == NULL) return 0; - return hapd->driver->set_freq(hapd->drv_priv, mode, freq); + os_memset(&data, 0, sizeof(data)); + data.mode = mode; + data.freq = freq; + data.ht_enabled = ht_enabled; + data.sec_channel_offset = sec_channel_offset; + return hapd->driver->set_freq(hapd->drv_priv, &data); } static inline int diff --git a/hostapd/driver_nl80211.c b/hostapd/driver_nl80211.c index 4355996bf..f8c314dc2 100644 --- a/hostapd/driver_nl80211.c +++ b/hostapd/driver_nl80211.c @@ -509,7 +509,7 @@ static int i802_send_mgmt_frame(void *priv, const void *data, size_t len, } /* Set kernel driver on given frequency (MHz) */ -static int i802_set_freq2(void *priv, struct hostapd_freq_params *freq) +static int i802_set_freq(void *priv, struct hostapd_freq_params *freq) { struct i802_driver_data *drv = priv; struct nl_msg *msg; @@ -3056,7 +3056,7 @@ static void i802_deinit(void *priv) struct hostapd_freq_params freq; os_memset(&freq, 0, sizeof(freq)); freq.freq = drv->last_freq; - i802_set_freq2(priv, &freq); + i802_set_freq(priv, &freq); } i802_del_beacon(drv); @@ -3120,7 +3120,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = { .sta_add2 = i802_sta_add2, .get_inact_sec = i802_get_inact_sec, .sta_clear_stats = i802_sta_clear_stats, - .set_freq2 = i802_set_freq2, + .set_freq = i802_set_freq, .set_rts = i802_set_rts, .get_rts = i802_get_rts, .set_frag = i802_set_frag,