From: Bruno Randolf <br1@einfach.org>
To: johannes@sipsolutions.net, linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] iw: Add ibss join parameter for beacon interval
Date: Tue, 19 Oct 2010 16:31:41 +0900 [thread overview]
Message-ID: <20101019073141.14128.29518.stgit@localhost6.localdomain6> (raw)
NL80211_ATTR_BEACON_INTERVAL already exists, we just have to use it.
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
ibss.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/ibss.c b/ibss.c
index e85ef1d..e1b6765 100644
--- a/ibss.c
+++ b/ibss.c
@@ -26,6 +26,7 @@ static int join_ibss(struct nl80211_state *state,
int n_rates = 0;
char *value = NULL, *sptr = NULL;
float rate;
+ int bintval;
if (argc < 2)
return 1;
@@ -57,6 +58,15 @@ static int join_ibss(struct nl80211_state *state,
}
}
+ if (argc > 1 && strcmp(argv[0], "bintval") == 0) {
+ argv++;
+ argc--;
+ bintval = strtoul(argv[0], &end, 10);
+ NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL, bintval);
+ argv++;
+ argc--;
+ }
+
/* basic rates */
if (argc > 1 && strcmp(argv[0], "basic-rates") == 0) {
argv++;
@@ -108,7 +118,7 @@ COMMAND(ibss, leave, NULL,
NL80211_CMD_LEAVE_IBSS, 0, CIB_NETDEV, leave_ibss,
"Leave the current IBSS cell.");
COMMAND(ibss, join,
- "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] "
+ "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] [bintval <ms>] "
"[basic-rates <rate in Mbps,rate2,...>] [key d:0:abcde]",
NL80211_CMD_JOIN_IBSS, 0, CIB_NETDEV, join_ibss,
"Join the IBSS cell with the given SSID, if it doesn't exist create\n"
next reply other threads:[~2010-10-19 7:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 7:31 Bruno Randolf [this message]
2010-10-25 8:26 ` [PATCH] iw: Add ibss join parameter for beacon interval Johannes Berg
2010-10-26 2:37 ` Bruno Randolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101019073141.14128.29518.stgit@localhost6.localdomain6 \
--to=br1@einfach.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).