summaryrefslogtreecommitdiff
path: root/package/iw/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-01-26 11:34:01 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-01-26 11:34:01 +0000
commit3bb98c5e1aa25056ea0e08f50405df6dcd964e30 (patch)
treed3e18832326f5ca833807eef924368b43df58787 /package/iw/patches
parent4e13b7774ea364b992cd47ea7ef6312c75003d09 (diff)
downloadmtk-20170518-3bb98c5e1aa25056ea0e08f50405df6dcd964e30.zip
mtk-20170518-3bb98c5e1aa25056ea0e08f50405df6dcd964e30.tar.gz
mtk-20170518-3bb98c5e1aa25056ea0e08f50405df6dcd964e30.tar.bz2
iw: Add ibss join parameter for beacon interval
NL80211_ATTR_BEACON_INTERVAL already exists, we just have to use it. Patch from: kentarou matsuyama <matsuyama@thinktube.com> SVN-Revision: 25107
Diffstat (limited to 'package/iw/patches')
-rw-r--r--package/iw/patches/501-ibss-bintval.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/package/iw/patches/501-ibss-bintval.patch b/package/iw/patches/501-ibss-bintval.patch
new file mode 100644
index 0000000..aa18641
--- /dev/null
+++ b/package/iw/patches/501-ibss-bintval.patch
@@ -0,0 +1,57 @@
+iw: Add ibss join parameter for beacon interval
+
+From: Bruno Randolf <br1@einfach.org>
+
+NL80211_ATTR_BEACON_INTERVAL already exists, we just have to use it.
+
+Signed-off-by: Bruno Randolf <br1@einfach.org>
+---
+ ibss.c | 19 ++++++++++++++++---
+ 1 files changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/ibss.c b/ibss.c
+index ed2c73a..9c9c133 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,17 @@ static int join_ibss(struct nl80211_state *state,
+ }
+ }
+
++ if (argc > 1 && strcmp(argv[0], "beacon-interval") == 0) {
++ argv++;
++ argc--;
++ bintval = strtoul(argv[0], &end, 10);
++ if (*end != '\0')
++ return 1;
++ NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL, bintval);
++ argv++;
++ argc--;
++ }
++
+ /* basic rates */
+ if (argc > 1 && strcmp(argv[0], "basic-rates") == 0) {
+ argv++;
+@@ -122,11 +134,12 @@ 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>] "
+- "[basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [key d:0:abcde]",
++ "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] [beacon-interval "
++ "<TU>] [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [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"
+ "it on the given frequency. When fixed frequency is requested, don't\n"
+ "join/create a cell on a different frequency. When a fixed BSSID is\n"
+ "requested use that BSSID and do not adopt another cell's BSSID even\n"
+- "if it has higher TSF and the same SSID.");
++ "if it has higher TSF and the same SSID. If an IBSS is created, create\n"
++ "it with the specified basic-rates and beacon-interval (in TU).");