Merge set_rate_sets() driver_ops into set_ap()
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
5f17b3ee9f
commit
e5693c4775
8 changed files with 36 additions and 52 deletions
|
@ -475,14 +475,6 @@ int hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
|
|||
}
|
||||
|
||||
|
||||
int hostapd_set_rate_sets(struct hostapd_data *hapd, int *basic_rates)
|
||||
{
|
||||
if (hapd->driver == NULL || hapd->driver->set_rate_sets == NULL)
|
||||
return 0;
|
||||
return hapd->driver->set_rate_sets(hapd->drv_priv, basic_rates);
|
||||
}
|
||||
|
||||
|
||||
int hostapd_set_country(struct hostapd_data *hapd, const char *country)
|
||||
{
|
||||
if (hapd->driver == NULL ||
|
||||
|
|
|
@ -66,7 +66,6 @@ int hostapd_set_rts(struct hostapd_data *hapd, int rts);
|
|||
int hostapd_set_frag(struct hostapd_data *hapd, int frag);
|
||||
int hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
|
||||
int total_flags, int flags_or, int flags_and);
|
||||
int hostapd_set_rate_sets(struct hostapd_data *hapd, int *basic_rates);
|
||||
int hostapd_set_country(struct hostapd_data *hapd, const char *country);
|
||||
int hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
|
||||
int cw_min, int cw_max, int burst_time);
|
||||
|
|
|
@ -567,6 +567,7 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
|
|||
params.tail_len = tail_len;
|
||||
params.dtim_period = hapd->conf->dtim_period;
|
||||
params.beacon_int = hapd->iconf->beacon_int;
|
||||
params.basic_rates = hapd->iconf->basic_rates;
|
||||
params.ssid = (u8 *) hapd->conf->ssid.ssid;
|
||||
params.ssid_len = hapd->conf->ssid.ssid_len;
|
||||
params.pairwise_ciphers = hapd->conf->rsn_pairwise ?
|
||||
|
|
|
@ -291,6 +291,8 @@ static void hostapd_cleanup_iface(struct hostapd_iface *iface)
|
|||
iface->hw_features = NULL;
|
||||
os_free(iface->current_rates);
|
||||
iface->current_rates = NULL;
|
||||
os_free(iface->basic_rates);
|
||||
iface->basic_rates = NULL;
|
||||
ap_list_deinit(iface);
|
||||
hostapd_config_free(iface->conf);
|
||||
iface->conf = NULL;
|
||||
|
|
|
@ -199,6 +199,7 @@ struct hostapd_iface {
|
|||
* current_mode->channels */
|
||||
int num_rates;
|
||||
struct hostapd_rate_data *current_rates;
|
||||
int *basic_rates;
|
||||
int freq;
|
||||
|
||||
u16 hw_flags;
|
||||
|
|
|
@ -126,10 +126,14 @@ int hostapd_prepare_rates(struct hostapd_data *hapd,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (hostapd_set_rate_sets(hapd, basic_rates)) {
|
||||
wpa_printf(MSG_ERROR, "Failed to update rate sets in kernel "
|
||||
"module");
|
||||
}
|
||||
i = 0;
|
||||
while (basic_rates[i] >= 0)
|
||||
i++;
|
||||
os_free(hapd->iface->basic_rates);
|
||||
hapd->iface->basic_rates = os_malloc(i * sizeof(int *));
|
||||
if (hapd->iface->basic_rates)
|
||||
os_memcpy(hapd->iface->basic_rates, basic_rates,
|
||||
i * sizeof(int *));
|
||||
|
||||
os_free(hapd->iface->current_rates);
|
||||
hapd->iface->num_rates = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue