1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-20 04:00:35 +02:00
openwrt-xburst/package/iw/patches/110-freq.patch
nbd 66fdfcd513 iw, mac80211: get the frequency info per-netdev instead of per-phy
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19194 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-17 20:49:28 +00:00

31 lines
842 B
Diff

--- a/interface.c
+++ b/interface.c
@@ -260,6 +260,27 @@ static int print_iface_handler(struct nl
printf("%s\tifindex %d\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_IFINDEX]));
if (tb_msg[NL80211_ATTR_IFTYPE])
printf("%s\ttype %s\n", indent, iftype_name(nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE])));
+ 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("%s\tfrequency %d MHz %s\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_FREQ]), mode);
+ }
+
return NL_SKIP;
}