46a0ef162e1e709de24a58340cb2456d28e0c4ac
[openwrt/staging/hauke.git] /
1 From ffc4445958a3ed4064f2e1bf73fa478a61c5cf7b Mon Sep 17 00:00:00 2001
2 From: Antonio Quartulli <ordex@autistici.org>
3 Date: Sun, 3 Jun 2012 18:42:25 +0200
4 Subject: [PATCHv2 602/602] driver_nl80211: use new parameters during ibss join
5
6 Signed-hostap: Antonio Quartulli <ordex@autistici.org>
7 ---
8 src/drivers/driver_nl80211.c | 33 ++++++++++++++++++++++++++++++++-
9 1 file changed, 32 insertions(+), 1 deletion(-)
10
11 --- a/src/drivers/driver_nl80211.c
12 +++ b/src/drivers/driver_nl80211.c
13 @@ -9023,7 +9023,7 @@ static int wpa_driver_nl80211_ibss(struc
14 struct wpa_driver_associate_params *params)
15 {
16 struct nl_msg *msg;
17 - int ret = -1;
18 + int ret = -1, i;
19 int count = 0;
20
21 wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
22 @@ -9069,6 +9069,37 @@ retry:
23 params->beacon_int);
24 }
25
26 + if (params->fixed_freq) {
27 + wpa_printf(MSG_DEBUG, " * fixed_freq");
28 + NLA_PUT_FLAG(msg, NL80211_ATTR_FREQ_FIXED);
29 + }
30 +
31 + if (params->beacon_interval > 0) {
32 + wpa_printf(MSG_DEBUG, " * beacon_interval=%d",
33 + params->beacon_interval);
34 + NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL,
35 + params->beacon_interval);
36 + }
37 +
38 + if (params->rates[0] > 0) {
39 + wpa_printf(MSG_DEBUG, " * basic_rates:");
40 + i = 0;
41 + while (i < NL80211_MAX_SUPP_RATES &&
42 + params->rates[i] > 0) {
43 + wpa_printf(MSG_DEBUG, " %.1f",
44 + (double)params->rates[i] / 2);
45 + i++;
46 + }
47 + NLA_PUT(msg, NL80211_ATTR_BSS_BASIC_RATES, i,
48 + params->rates);
49 + }
50 +
51 + if (params->mcast_rate > 0) {
52 + wpa_printf(MSG_DEBUG, " * mcast_rates=%.1f",
53 + (double)params->mcast_rate / 10);
54 + NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate);
55 + }
56 +
57 ret = nl80211_set_conn_keys(params, msg);
58 if (ret)
59 goto nla_put_failure;