Merge set_rate_sets() driver_ops into set_ap()

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2011-12-03 12:16:03 +02:00
parent 5f17b3ee9f
commit e5693c4775
8 changed files with 36 additions and 52 deletions

View file

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