3 @@ -707,6 +707,14 @@ int hostapd_setup_interface_complete(str
7 + if (hostapd_prepare_rates(hapd, iface->current_mode)) {
8 + wpa_printf(MSG_ERROR, "Failed to prepare rates table.");
9 + hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
10 + HOSTAPD_LEVEL_WARNING,
11 + "Failed to prepare rates table.");
15 if (hapd->iconf->rts_threshold > -1 &&
16 hostapd_set_rts(hapd, hapd->iconf->rts_threshold)) {
17 wpa_printf(MSG_ERROR, "Could not set RTS threshold for "
18 --- a/src/ap/hw_features.c
19 +++ b/src/ap/hw_features.c
20 @@ -101,8 +101,8 @@ int hostapd_get_hw_features(struct hosta
24 -static int hostapd_prepare_rates(struct hostapd_data *hapd,
25 - struct hostapd_hw_modes *mode)
26 +int hostapd_prepare_rates(struct hostapd_data *hapd,
27 + struct hostapd_hw_modes *mode)
29 int i, num_basic_rates = 0;
30 int basic_rates_a[] = { 60, 120, 240, -1 };
31 @@ -668,14 +668,6 @@ int hostapd_select_hw_mode(struct hostap
35 - if (hostapd_prepare_rates(iface->bss[0], iface->current_mode)) {
36 - wpa_printf(MSG_ERROR, "Failed to prepare rates table.");
37 - hostapd_logger(iface->bss[0], NULL, HOSTAPD_MODULE_IEEE80211,
38 - HOSTAPD_LEVEL_WARNING,
39 - "Failed to prepare rates table.");
46 --- a/src/ap/hw_features.h
47 +++ b/src/ap/hw_features.h
48 @@ -25,6 +25,8 @@ const char * hostapd_hw_mode_txt(int mod
49 int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
50 int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
51 int hostapd_check_ht_capab(struct hostapd_iface *iface);
52 +int hostapd_prepare_rates(struct hostapd_data *hapd,
53 + struct hostapd_hw_modes *mode);
54 #else /* NEED_AP_MLME */
56 hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
57 @@ -56,6 +58,11 @@ static inline int hostapd_check_ht_capab
61 +static inline int hostapd_prepare_rates(struct hostapd_data *hapd,
62 + struct hostapd_hw_modes *mode)
67 #endif /* NEED_AP_MLME */