diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-12-04 03:42:17 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-12-04 03:42:17 +0000 |
commit | cf716c04e697f13d8fd6373a76a5ba57f540f64e (patch) | |
tree | a6a2ff8f2ef405ee8a79e1e5ba92689d9d485512 /package/iwinfo/src/iwinfo_madwifi.c | |
parent | 0f2f3e734d6a4460e2002a0a98136c92ebb8450f (diff) | |
download | master-187ad058-cf716c04e697f13d8fd6373a76a5ba57f540f64e.tar.gz master-187ad058-cf716c04e697f13d8fd6373a76a5ba57f540f64e.tar.bz2 master-187ad058-cf716c04e697f13d8fd6373a76a5ba57f540f64e.zip |
[package] iwinfo: add initial hardware detection capabilities
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29421 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iwinfo/src/iwinfo_madwifi.c')
-rw-r--r-- | package/iwinfo/src/iwinfo_madwifi.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/package/iwinfo/src/iwinfo_madwifi.c b/package/iwinfo/src/iwinfo_madwifi.c index 54082c7371..feb98e25a2 100644 --- a/package/iwinfo/src/iwinfo_madwifi.c +++ b/package/iwinfo/src/iwinfo_madwifi.c @@ -987,3 +987,26 @@ int madwifi_get_mbssid_support(const char *ifname, int *buf) return -1; } + +int madwifi_get_hardware_id(const char *ifname, char *buf) +{ + return wext_get_hardware_id(ifname, buf); +} + +int madwifi_get_hardware_name(const char *ifname, char *buf) +{ + struct iwinfo_hardware_id id; + struct iwinfo_hardware_entry *hw; + + if (madwifi_get_hardware_id(ifname, (char *)&id)) + return -1; + + hw = iwinfo_hardware(&id); + + if (hw) + sprintf(buf, "%s %s", hw->vendor_name, hw->device_name); + else + sprintf(buf, "Generic Atheros"); + + return 0; +} |