diff options
author | Jouni Malinen <j@w1.fi> | 2009-12-09 21:57:50 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-12-09 21:57:50 +0200 |
commit | fb7842aa5131c9a0b5e044432c4030e71e04918b (patch) | |
tree | b888a7d2d40aea15b97a729a0795fcacb7f63517 /wpa_supplicant | |
parent | 217e7eeaf070cc47c25712937cc84a75c77b44f8 (diff) | |
download | external_wpa_supplicant_8_ti-fb7842aa5131c9a0b5e044432c4030e71e04918b.zip external_wpa_supplicant_8_ti-fb7842aa5131c9a0b5e044432c4030e71e04918b.tar.gz external_wpa_supplicant_8_ti-fb7842aa5131c9a0b5e044432c4030e71e04918b.tar.bz2 |
Remove struct hostapd_rate_data from driver API
In addition to the bitrate, the only other variable in this structure
is used internally in hostapd. Move this structure into hostapd.h and
make the driver API use simpler data structure (array of bitrates).
Diffstat (limited to 'wpa_supplicant')
-rw-r--r-- | wpa_supplicant/mlme.c | 19 | ||||
-rw-r--r-- | wpa_supplicant/wpa_supplicant_i.h | 2 |
2 files changed, 8 insertions, 13 deletions
diff --git a/wpa_supplicant/mlme.c b/wpa_supplicant/mlme.c index 898a707..c71cdd3 100644 --- a/wpa_supplicant/mlme.c +++ b/wpa_supplicant/mlme.c @@ -391,20 +391,16 @@ static void ieee80211_send_assoc(struct wpa_supplicant *wpa_s) blen += len + 2; *pos++ = WLAN_EID_SUPP_RATES; *pos++ = len; - for (i = 0; i < len; i++) { - int rate = wpa_s->mlme.curr_rates[i].rate; - *pos++ = (u8) (rate / 5); - } + for (i = 0; i < len; i++) + *pos++ = (u8) (wpa_s->mlme.curr_rates[i] / 5); if (wpa_s->mlme.num_curr_rates > len) { pos = buf + blen; blen += wpa_s->mlme.num_curr_rates - len + 2; *pos++ = WLAN_EID_EXT_SUPP_RATES; *pos++ = wpa_s->mlme.num_curr_rates - len; - for (i = len; i < wpa_s->mlme.num_curr_rates; i++) { - int rate = wpa_s->mlme.curr_rates[i].rate; - *pos++ = (u8) (rate / 5); - } + for (i = len; i < wpa_s->mlme.num_curr_rates; i++) + *pos++ = (u8) (wpa_s->mlme.curr_rates[i] / 5); } if (wpa_s->mlme.extra_ie && wpa_s->mlme.auth_alg != WLAN_AUTH_FT) { @@ -671,7 +667,6 @@ static void ieee80211_send_probe_req(struct wpa_supplicant *wpa_s, supp_rates[0] = WLAN_EID_SUPP_RATES; supp_rates[1] = 0; for (i = 0; i < wpa_s->mlme.num_curr_rates; i++) { - struct hostapd_rate_data *rate = &wpa_s->mlme.curr_rates[i]; if (esupp_rates) { pos = buf + len; len++; @@ -687,7 +682,7 @@ static void ieee80211_send_probe_req(struct wpa_supplicant *wpa_s, len++; supp_rates[1]++; } - *pos++ = rate->rate / 5; + *pos++ = wpa_s->mlme.curr_rates[i] / 5; } if (wpa_s->mlme.extra_probe_ie) { @@ -2399,7 +2394,7 @@ static int ieee80211_sta_join_ibss(struct wpa_supplicant *wpa_s, if (local->conf.phymode == MODE_ATHEROS_TURBO) rate *= 2; for (j = 0; j < local->num_curr_rates; j++) - if (local->curr_rates[j].rate == rate) + if (local->curr_rates[j] == rate) rates |= BIT(j); } wpa_s->mlme.supp_rates_bits = rates; @@ -2468,7 +2463,7 @@ static int ieee80211_sta_create_ibss(struct wpa_supplicant *wpa_s) pos = bss->supp_rates; #if 0 /* FIX */ for (i = 0; i < local->num_curr_rates; i++) { - int rate = local->curr_rates[i].rate; + int rate = local->curr_rates[i]; if (local->conf.phymode == MODE_ATHEROS_TURBO) rate /= 2; *pos++ = (u8) (rate / 5); diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 177380e..377f4c8 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -275,7 +275,7 @@ struct wpa_client_mlme { unsigned int hw_modes; /* bitfield of allowed hardware modes; * (1 << HOSTAPD_MODE_*) */ int num_curr_rates; - struct hostapd_rate_data *curr_rates; + int *curr_rates; int freq; /* The current frequency in MHz */ int channel; /* The current IEEE 802.11 channel number */ |