iw: Add set/get for frag/rts threshold and retry limits
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.
Signed-off-by Jouni Malinen <[email protected]>
--- 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_mnla_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
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
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
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