All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iw: Add ibss join parameter for beacon interval
@ 2010-10-19  7:31 Bruno Randolf
  2010-10-25  8:26 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Randolf @ 2010-10-19  7:31 UTC (permalink / raw)
  To: johannes, linville; +Cc: linux-wireless

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"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iw: Add ibss join parameter for beacon interval
  2010-10-19  7:31 [PATCH] iw: Add ibss join parameter for beacon interval Bruno Randolf
@ 2010-10-25  8:26 ` Johannes Berg
  2010-10-26  2:37   ` Bruno Randolf
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2010-10-25  8:26 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless

On Tue, 2010-10-19 at 16:31 +0900, Bruno Randolf wrote:

> +	if (argc > 1 && strcmp(argv[0], "bintval") == 0) {

I'd prefer this to be called just "bi" or fully spelt out.

>  	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>] "

It's not in ms, but TU. *sigh*

johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iw: Add ibss join parameter for beacon interval
  2010-10-25  8:26 ` Johannes Berg
@ 2010-10-26  2:37   ` Bruno Randolf
  0 siblings, 0 replies; 3+ messages in thread
From: Bruno Randolf @ 2010-10-26  2:37 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless

On Mon October 25 2010 17:26:16 Johannes Berg wrote:
> On Tue, 2010-10-19 at 16:31 +0900, Bruno Randolf wrote:
> > +	if (argc > 1 && strcmp(argv[0], "bintval") == 0) {
> 
> I'd prefer this to be called just "bi" or fully spelt out.

o.k.
 
> >  	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>] "
> 
> It's not in ms, but TU. *sigh*

oh, true. i forgot. will change.

bruno

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-26  2:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-19  7:31 [PATCH] iw: Add ibss join parameter for beacon interval Bruno Randolf
2010-10-25  8:26 ` Johannes Berg
2010-10-26  2:37   ` Bruno Randolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.