summaryrefslogtreecommitdiff
path: root/package/network/utils/iwinfo/src/iwinfo_wl.c
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-09 14:39:14 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-09 14:39:14 +0000
commitc263a155875d0d68a21ef3ada65dd0e92fbb9933 (patch)
tree746495933f37bdd922b3e2d7bb7e0848d334efa2 /package/network/utils/iwinfo/src/iwinfo_wl.c
parent62b32c53435deabb77d850b7ac492f7d25c3c830 (diff)
iwinfo: add phyname attribute, this is useful to group networks by radio phy
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36889 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/iwinfo/src/iwinfo_wl.c')
-rw-r--r--package/network/utils/iwinfo/src/iwinfo_wl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/package/network/utils/iwinfo/src/iwinfo_wl.c b/package/network/utils/iwinfo/src/iwinfo_wl.c
index 3d15fc9ca7..0a1439bb89 100644
--- a/package/network/utils/iwinfo/src/iwinfo_wl.c
+++ b/package/network/utils/iwinfo/src/iwinfo_wl.c
@@ -321,6 +321,18 @@ int wl_get_encryption(const char *ifname, char *buf)
return 0;
}
+int wl_get_phyname(const char *ifname, char *buf)
+{
+ char *p;
+
+ strcpy(buf, ifname);
+
+ if ((p = strchr(buf, '.')) != NULL)
+ *p = 0;
+
+ return 0;
+}
+
int wl_get_enctype(const char *ifname, char *buf)
{
uint32_t wsec, wpa;