Antonio Quartulli | 5 Jun 2012 20:05
Gravatar

wpa_supplicant: add more parameters for the IBSS JOIN command

Since nobody complained that much about the RFC, here are the patches :-)

Currently, wpa_supplicant does not accept as many parameters as possible for the
IBSS JOIN command. Some of the arguments that it is possible to pass using the
command line "iw dev wlan0 ibss join.." command are not matched in any of the
network block attribute in wpa_s configuration. This set of patches aim to add
some params to the config that can then be passed to the ibss join command.
Actually this parameters are handled by the nl80211 driver only and ignored by
all the others.

Changes from RFC:
 - fixed a typo in printf in 2/2

 Best Regards,
Antonio Quartulli | 5 Jun 2012 20:05
Gravatar

[PATCH 1/2] wpa_supplicant: add new config params to be used with the ibss join command

Signed-hostap: Antonio Quartulli <ordex <at> autistici.org>
---
 src/drivers/driver.h            |    6 +++
 wpa_supplicant/config.c         |   96 +++++++++++++++++++++++++++++++++++++++
 wpa_supplicant/config_ssid.h    |    6 +++
 wpa_supplicant/wpa_supplicant.c |   23 +++++++---
 4 files changed, 124 insertions(+), 7 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index f7fb2ef..dda2fbc 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
 <at>  <at>  -19,6 +19,7  <at>  <at> 

 #define WPA_SUPPLICANT_DRIVER_VERSION 4

+#include "drivers/nl80211_copy.h"
 #include "common/defs.h"

 #define HOSTAPD_CHAN_DISABLED 0x00000001
 <at>  <at>  -332,6 +333,11  <at>  <at>  struct wpa_driver_associate_params {
 	 */
 	int freq;

+	int beacon_interval;
+	int fixed_freq;
+	unsigned char rates[NL80211_MAX_SUPP_RATES];
+	int mcast_rate;
+
 	/**
(Continue reading)

Antonio Quartulli | 5 Jun 2012 20:05
Gravatar

[PATCH 2/2] driver_nl80211: use new parameters during ibss join

Signed-hostap: Antonio Quartulli <ordex <at> autistici.org>
---
 src/drivers/driver_nl80211.c |   33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 693a885..9783c96 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
 <at>  <at>  -6429,7 +6429,7  <at>  <at>  static int wpa_driver_nl80211_ibss(struct wpa_driver_nl80211_data *drv,
 				   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);
 <at>  <at>  -6462,6 +6462,37  <at>  <at>  retry:
 	wpa_printf(MSG_DEBUG, "  * freq=%d", params->freq);
 	NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);

+	if (params->fixed_freq) {
+		wpa_printf(MSG_DEBUG, "  * fixed_freq");
+		NLA_PUT_FLAG(msg, NL80211_ATTR_FREQ_FIXED);
+	}
+
+	if (params->beacon_interval > 0) {
+		wpa_printf(MSG_DEBUG, "  * beacon_interval=%d",
+			   params->beacon_interval);
(Continue reading)


Gmane