iw: Fix data types for iw survey channel time
[openwrt.git] / package / iw / patches / 110-survey_phy_stats.patch
1 --- a/survey.c
2 +++ b/survey.c
3 @@ -44,12 +44,27 @@ static int print_survey_handler(struct n
4 }
5
6 if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
7 - printf("\tfrequency:\t%u MHz%s\n",
8 + printf("\tfrequency:\t\t\t%u MHz%s\n",
9 nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]),
10 sinfo[NL80211_SURVEY_INFO_IN_USE] ? " [in use]" : "");
11 if (sinfo[NL80211_SURVEY_INFO_NOISE])
12 - printf("\tnoise:\t\t%d dBm\n",
13 + printf("\tnoise:\t\t\t\t%d dBm\n",
14 (int8_t)nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]));
15 + if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME])
16 + printf("\tchannel active time:\t\t%llu ms\n",
17 + (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME]));
18 + if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY])
19 + printf("\tchannel busy time:\t\t%llu ms\n",
20 + (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY]));
21 + if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY])
22 + printf("\textension channel busy time:\t%llu ms\n",
23 + (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY]));
24 + if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX])
25 + printf("\tchannel receive time:\t\t%llu ms\n",
26 + (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_RX]));
27 + if (sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX])
28 + printf("\tchannel transmit time:\t\t%llu ms\n",
29 + (uint64_t)nla_get_u64(sinfo[NL80211_SURVEY_INFO_CHANNEL_TIME_TX]));
30 return NL_SKIP;
31 }
32
This page took 0.045266 seconds and 5 git commands to generate.