Skip to contentSkip to conversation

iw: Add set/get for frag/rts threshold and retry limits

PATCH Superseded Jouni Malinen 3 participants 4 messages Apr 17, 2009

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iw: Add set/get for frag/rts threshold and retry limits

Add commands to use the new wiphy parameter attributes with NL80211_CMD_SET_WIPHY and NL80211_CMD_GET_WIPHY to manage fragmentation/RTS threshold and retry limits.

---
 info.c    |   25 ++++++++
 nl80211.h |  182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 phy.c     |   62 +++++++++++++++++++++
 3 files changed, 264 insertions(+), 5 deletions(-)
info.c +25 -0
@@ -254,6 +254,31 @@ static int print_phy_handler(struct nl_m
 	nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SUPPORTED_IFTYPES], rem_mode)
 		printf("\t\t * %s\n", iftype_name(nl_mode->nla_type));
 
+	if (tb_msg[NL80211_ATTR_WIPHY_RETRY_SHORT])
+		printf("\tShort retry limit: %d\n",
+		       nla_get_u8(tb_msg[NL80211_ATTR_WIPHY_RETRY_SHORT]));
+	if (tb_msg[NL80211_ATTR_WIPHY_RETRY_LONG])
+		printf("\tLong retry limit: %d\n",
+		       nla_get_u8(tb_msg[NL80211_ATTR_WIPHY_RETRY_LONG]));
+	if (tb_msg[NL80211_ATTR_WIPHY_FRAG_THRESHOLD]) {
+		uint32_t t;
+		t = nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_FRAG_THRESHOLD]);
+		printf("\tFragmentation threshold: ");
+		if (t == (uint32_t) -1)
+			printf("disabled\n");
+		else
+			printf("%d\n", t);
+	}
+	if (tb_msg[NL80211_ATTR_WIPHY_RTS_THRESHOLD]) {
+		uint32_t t;
+		t = nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_RTS_THRESHOLD]);
+		printf("\tRTS/CTS threshold: ");
+		if (t == (uint32_t) -1)
+			printf("disabled\n");
+		else
+			printf("%d\n", t);
+	}
+
 	return NL_SKIP;
 }
 
nl80211.h +177 -5

259 lines not on this page · raw message

phy.c +62 -0

65 lines not on this page · raw message

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#1 lore raw

PATCH 1/1 iw: Add set/get for frag/rts threshold and retry limits

nl80211.h line 12

Quoted 10 lines · Jouni Malinen
nl80211.h +1 -1
@@ -7,7 +7,7 @@
  * Copyright 2008 Michael Wu <[email protected]>
  * Copyright 2008 Luis Carlos Cobo <[email protected]>
  * Copyright 2008 Michael Buesch <[email protected]>
- * Copyright 2008 Luis R. Rodriguez <[email protected]>
+ * Copyright 2008, 2009 Luis R. Rodriguez <[email protected]>
  * Copyright 2008 Jouni Malinen <[email protected]>
  * Copyright 2008 Colin McCabe <[email protected]>

I don't think Luis would complain, but still... :-)

Sujith

#2 lore raw
Quoted 13 lines · Sujith

nl80211.h line 12

Quoted 10 lines · Jouni Malinen
nl80211.h +1 -1
@@ -7,7 +7,7 @@
  * Copyright 2008 Michael Wu <[email protected]>
  * Copyright 2008 Luis Carlos Cobo <[email protected]>
  * Copyright 2008 Michael Buesch <[email protected]>
- * Copyright 2008 Luis R. Rodriguez <[email protected]>
+ * Copyright 2008, 2009 Luis R. Rodriguez <[email protected]>
  * Copyright 2008 Jouni Malinen <[email protected]>
  * Copyright 2008 Colin McCabe <[email protected]>

I don't think Luis would complain, but still... :-)

He just copied the kernel file in ...

johannes

#3 lore raw
Quoted 15 lines · Johannes Berg
Quoted 13 lines · Sujith

nl80211.h line 12

Quoted 10 lines · Jouni Malinen
nl80211.h +1 -1
@@ -7,7 +7,7 @@
  * Copyright 2008 Michael Wu <[email protected]>
  * Copyright 2008 Luis Carlos Cobo <[email protected]>
  * Copyright 2008 Michael Buesch <[email protected]>
- * Copyright 2008 Luis R. Rodriguez <[email protected]>
+ * Copyright 2008, 2009 Luis R. Rodriguez <[email protected]>
  * Copyright 2008 Jouni Malinen <[email protected]>
  * Copyright 2008 Colin McCabe <[email protected]>

I don't think Luis would complain, but still... :-)

Quoted 2 lines

He just copied the kernel file in ...

Ah, ok.
Sorry. :)

Sujith