From patchwork Tue Oct 19 07:31:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Randolf X-Patchwork-Id: 264781 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9J7Vl1u022943 for ; Tue, 19 Oct 2010 07:31:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933458Ab0JSHbq (ORCPT ); Tue, 19 Oct 2010 03:31:46 -0400 Received: from mail30s.wh2.ocn.ne.jp ([125.206.180.198]:44826 "HELO mail30s.wh2.ocn.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757835Ab0JSHbq (ORCPT ); Tue, 19 Oct 2010 03:31:46 -0400 Received: from vs3014.wh2.ocn.ne.jp (125.206.180.187) by mail30s.wh2.ocn.ne.jp (RS ver 1.0.95vs) with SMTP id 1-0332923503 for ; Tue, 19 Oct 2010 16:31:43 +0900 (JST) Received: (qmail 55894 invoked from network); 19 Oct 2010 07:31:42 -0000 Received: from unknown (HELO localhost6.localdomain6) (220.110.201.18) by with SMTP; 19 Oct 2010 07:31:42 -0000 Subject: [PATCH] iw: Add ibss join parameter for beacon interval To: johannes@sipsolutions.net, linville@tuxdriver.com From: Bruno Randolf Cc: linux-wireless@vger.kernel.org Date: Tue, 19 Oct 2010 16:31:41 +0900 Message-ID: <20101019073141.14128.29518.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 X-SF-Loop: 1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 19 Oct 2010 07:31:47 +0000 (UTC) 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, - " [fixed-freq] [] " + " [fixed-freq] [] [bintval ] " "[basic-rates ] [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"