iw: survey: Mark frequency in use
PATCH 1/4 iw: survey: Mark frequency in use
Survey: Mark frequency in use according to NL80211_SURVEY_INFO_IN_USE.
This patch comes from OpenWRT. Original author: Felix Fietkau
--- survey.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
survey.c +3 -2
@@ -44,8 +44,9 @@ static int print_survey_handler(struct nl_msg *msg, void *arg) }if (sinfo[NL80211_SURVEY_INFO_FREQUENCY ]) -printf ("\tfrequency:\t%u MHz\n" , -nla_get_u32 (sinfo[NL80211_SURVEY_INFO_FREQUENCY ])); +printf ("\tfrequency:\t%u MHz%s\n" , +nla_get_u32 (sinfo[NL80211_SURVEY_INFO_FREQUENCY ]), + sinfo[NL80211_SURVEY_INFO_IN_USE ] ?" [in use]" :"" );if (sinfo[NL80211_SURVEY_INFO_NOISE ])printf ("\tnoise:\t\t%d dBm\n" , (int8_t )nla_get_u8 (sinfo[NL80211_SURVEY_INFO_NOISE ]));
PATCH 2/4 iw: Add channel busy time to survey
Print channel busy time in survey dump.
This patch comes from OpenWRT. Original author: Felix Fietkau. Fixed up for unsigned values.
--- survey.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-)
survey.c +17 -2
@@ -44,12 +44,27 @@ static int print_survey_handler(struct nl_msg *msg, void *arg) }if (sinfo[NL80211_SURVEY_INFO_FREQUENCY ]) -printf ("\tfrequency:\t%u MHz%s\n" , +printf ("\tfrequency:\t\t\t%u MHz%s\n" ,nla_get_u32 (sinfo[NL80211_SURVEY_INFO_FREQUENCY ]), sinfo[NL80211_SURVEY_INFO_IN_USE ] ?" [in use]" :"" );if (sinfo[NL80211_SURVEY_INFO_NOISE ]) -printf ("\tnoise:\t\t%d dBm\n" , +printf ("\tnoise:\t\t\t\t%d dBm\n" , (int8_t )nla_get_u8 (sinfo[NL80211_SURVEY_INFO_NOISE ])); +if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME ]) +printf ("\tchannel active time:\t\t%llu ms\n" , + (uint64_t )nla_get_u64 (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME ])); +if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY ]) +printf ("\tchannel busy time:\t\t%llu ms\n" , + (uint64_t )nla_get_u64 (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY ])); +if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY ]) +printf ("\textension channel busy time:\t%llu ms\n" , + (uint64_t )nla_get_u64 (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY ])); +if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX ]) +printf ("\tchannel receive time:\t\t%llu ms\n" , + (uint64_t )nla_get_u64 (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX ])); +if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX ]) +printf ("\tchannel transmit time:\t\t%llu ms\n" , + (uint64_t )nla_get_u64 (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX ]));return NL_SKIP ; }
PATCH 3/4 iw: add multicast rates to IBSS join
In reply to Bruno RandolfAdd multicast rates to IBSS join command.
This patch comes from OpenWRT. Original author: Felix Fietkau.
--- ibss.c | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-)
ibss.c +18 -3
@@ -95,6 +95,20 @@ static int join_ibss(struct nl80211_state *state, argc--; } +/* multicast rate */ +if (argc >1 &&strcmp (argv[0 ],"mcast-rate" ) ==0 ) { + argv++; + argc--; + + rate =strtod (argv[0 ], &end); +if (*end !='\0' ) +return 1 ; + +NLA_PUT_U32 (msg,NL80211_ATTR_MCAST_RATE , (int ) rate *10 ); + argv++; + argc--; + } +if (!argc)return 0 ;
@@ -120,12 +134,13 @@ 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>] [beacon-interval " -"<TU>] [basic-rates <rate in Mbps,rate2,...>] [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 an IBSS is created, create\n" -"it with the specified basic-rates and beacon-interval (in TU)." ); +"it with the specified basic-rates, multicast-rate and beacon-interval." );
PATCH 4/4 iw: Add signal average to station dump information
In reply to Bruno RandolfPrint station signal average in station dump.
--- station.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
station.c +3 -0
@@ -107,6 +107,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)if (sinfo[NL80211_STA_INFO_SIGNAL ])printf ("\n\tsignal: \t%d dBm" , (int8_t )nla_get_u8 (sinfo[NL80211_STA_INFO_SIGNAL ])); +if (sinfo[NL80211_STA_INFO_SIGNAL_AVG ]) +printf ("\n\tsignal avg:\t%d dBm" , + (int8_t )nla_get_u8 (sinfo[NL80211_STA_INFO_SIGNAL_AVG ]));if (sinfo[NL80211_STA_INFO_TX_BITRATE ]) { if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,
Quoted 3 lines · Bruno Randolf
Survey: Mark frequency in use according to
NL80211_SURVEY_INFO_IN_USE.This patch comes from OpenWRT. Original author: Felix Fietkau
Can you please resend with From: so I can apply them with the proper author?
johannes
Quoted 7 lines · On Friday 07 January 2011 20:00:21 Johannes Berg wrote:
Quoted 3 lines · Bruno Randolf
Survey: Mark frequency in use according to
NL80211_SURVEY_INFO_IN_USE.This patch comes from OpenWRT. Original author: Felix Fietkau
Can you please resend with From: so I can apply them with the proper author?
Allright. Will do that next Tuesday.
bruno