Remove deprecated version of set_freq() and rename the new version

This commit is contained in:
Jouni Malinen 2009-03-25 16:48:22 +02:00 committed by Jouni Malinen
parent 4f86ca6870
commit 909a6ef00c
3 changed files with 11 additions and 17 deletions

View file

@ -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);

View file

@ -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

View file

@ -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,