3 @@ -43,7 +43,7 @@ static void print_power_mode(struct nlat
7 -void parse_tx_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen)
8 +void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen)
12 @@ -107,6 +107,7 @@ static int print_sta_handler(struct nl_m
13 [NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
14 [NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 },
15 [NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
16 + [NL80211_STA_INFO_RX_BITRATE] = { .type = NLA_NESTED },
17 [NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
18 [NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
19 [NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 },
20 @@ -177,10 +178,17 @@ static int print_sta_handler(struct nl_m
21 if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
24 - parse_tx_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
25 + parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
26 printf("\n\ttx bitrate:\t%s", buf);
29 + if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
32 + parse_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE], buf, sizeof(buf));
33 + printf("\n\trx bitrate:\t%s", buf);
36 if (sinfo[NL80211_STA_INFO_LLID])
37 printf("\n\tmesh llid:\t%d",
38 nla_get_u16(sinfo[NL80211_STA_INFO_LLID]));
41 @@ -170,7 +170,7 @@ enum print_ie_type {
42 void print_ies(unsigned char *ie, int ielen, bool unknown,
43 enum print_ie_type ptype);
45 -void parse_tx_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen);
46 +void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen);
52 @@ -165,7 +165,7 @@ static int print_link_sta(struct nl_msg
53 if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
56 - parse_tx_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
57 + parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
58 printf("\ttx bitrate: %s\n", buf);