2012-07-24 23:07:10 +00:00
|
|
|
From ffc4445958a3ed4064f2e1bf73fa478a61c5cf7b Mon Sep 17 00:00:00 2001
|
|
|
|
From: Antonio Quartulli <ordex@autistici.org>
|
|
|
|
Date: Sun, 3 Jun 2012 18:42:25 +0200
|
|
|
|
Subject: [PATCHv2 602/602] driver_nl80211: use new parameters during ibss join
|
|
|
|
|
|
|
|
Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
|
|
|
---
|
|
|
|
src/drivers/driver_nl80211.c | 33 ++++++++++++++++++++++++++++++++-
|
|
|
|
1 file changed, 32 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
--- a/src/drivers/driver_nl80211.c
|
|
|
|
+++ b/src/drivers/driver_nl80211.c
|
2016-12-14 09:04:44 +00:00
|
|
|
@@ -4962,7 +4962,7 @@ static int wpa_driver_nl80211_ibss(struc
|
2012-07-24 23:07:10 +00:00
|
|
|
struct wpa_driver_associate_params *params)
|
|
|
|
{
|
|
|
|
struct nl_msg *msg;
|
|
|
|
- int ret = -1;
|
|
|
|
+ int ret = -1, i;
|
|
|
|
int count = 0;
|
|
|
|
|
|
|
|
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
|
2016-12-14 09:04:44 +00:00
|
|
|
@@ -4989,6 +4989,37 @@ retry:
|
2015-03-26 23:33:47 +00:00
|
|
|
nl80211_put_beacon_int(msg, params->beacon_int))
|
|
|
|
goto fail;
|
2012-07-24 23:07:10 +00:00
|
|
|
|
|
|
|
+ if (params->fixed_freq) {
|
|
|
|
+ wpa_printf(MSG_DEBUG, " * fixed_freq");
|
2015-03-26 23:33:47 +00:00
|
|
|
+ nla_put_flag(msg, NL80211_ATTR_FREQ_FIXED);
|
2012-07-24 23:07:10 +00:00
|
|
|
+ }
|
|
|
|
+
|
2015-03-26 23:33:47 +00:00
|
|
|
+ if (params->beacon_int > 0) {
|
|
|
|
+ wpa_printf(MSG_DEBUG, " * beacon_int=%d",
|
|
|
|
+ params->beacon_int);
|
|
|
|
+ nla_put_u32(msg, NL80211_ATTR_BEACON_INTERVAL,
|
|
|
|
+ params->beacon_int);
|
2012-07-24 23:07:10 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (params->rates[0] > 0) {
|
|
|
|
+ wpa_printf(MSG_DEBUG, " * basic_rates:");
|
|
|
|
+ i = 0;
|
|
|
|
+ while (i < NL80211_MAX_SUPP_RATES &&
|
|
|
|
+ params->rates[i] > 0) {
|
|
|
|
+ wpa_printf(MSG_DEBUG, " %.1f",
|
|
|
|
+ (double)params->rates[i] / 2);
|
|
|
|
+ i++;
|
|
|
|
+ }
|
2015-03-26 23:33:47 +00:00
|
|
|
+ nla_put(msg, NL80211_ATTR_BSS_BASIC_RATES, i,
|
2012-07-24 23:07:10 +00:00
|
|
|
+ params->rates);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (params->mcast_rate > 0) {
|
2015-03-26 23:33:47 +00:00
|
|
|
+ wpa_printf(MSG_DEBUG, " * mcast_rate=%.1f",
|
2012-07-24 23:07:10 +00:00
|
|
|
+ (double)params->mcast_rate / 10);
|
2015-03-26 23:33:47 +00:00
|
|
|
+ nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate);
|
2012-07-24 23:07:10 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
ret = nl80211_set_conn_keys(params, msg);
|
|
|
|
if (ret)
|
2015-03-26 23:33:47 +00:00
|
|
|
goto fail;
|