diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-01-17 03:07:55 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-01-17 03:07:55 +0000 |
commit | 6f78b03bcb57124738def2e38fdd3e87bd8b5119 (patch) | |
tree | 0df078130159bb1d9ab3f5aeae795795f10865bb /package/iw/patches | |
parent | 9f0c2d0a5b114e1988f540c8fe2d8d88206c2ee0 (diff) | |
download | mtk-20170518-6f78b03bcb57124738def2e38fdd3e87bd8b5119.zip mtk-20170518-6f78b03bcb57124738def2e38fdd3e87bd8b5119.tar.gz mtk-20170518-6f78b03bcb57124738def2e38fdd3e87bd8b5119.tar.bz2 |
iw: print the current operating frequency in the phy info
SVN-Revision: 19179
Diffstat (limited to 'package/iw/patches')
-rw-r--r-- | package/iw/patches/110-freq.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/package/iw/patches/110-freq.patch b/package/iw/patches/110-freq.patch new file mode 100644 index 0000000..9a00a65 --- /dev/null +++ b/package/iw/patches/110-freq.patch @@ -0,0 +1,30 @@ +--- a/info.c ++++ b/info.c +@@ -62,6 +62,27 @@ static int print_phy_handler(struct nl_m + if (tb_msg[NL80211_ATTR_WIPHY_NAME]) + printf("Wiphy %s\n", nla_get_string(tb_msg[NL80211_ATTR_WIPHY_NAME])); + ++ if (tb_msg[NL80211_ATTR_WIPHY_FREQ]) { ++ const char *mode; ++ ++ if (tb_msg[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) ++ switch(nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_CHANNEL_TYPE])) { ++ case NL80211_CHAN_HT20: ++ mode = "HT20"; ++ break; ++ case NL80211_CHAN_HT40PLUS: ++ mode = "HT40+"; ++ break; ++ case NL80211_CHAN_HT40MINUS: ++ mode = "HT40-"; ++ break; ++ default: ++ mode = ""; ++ } ++ ++ printf("\tCurrent frequency: %d MHz %s\n", nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_FREQ]), mode); ++ } ++ + nla_for_each_nested(nl_band, tb_msg[NL80211_ATTR_WIPHY_BANDS], rem_band) { + printf("\tBand %d:\n", bandidx); + bandidx++; |