diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-02-17 00:36:25 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-02-17 00:36:25 +0000 |
commit | 018d69c3b3421ff86be0004a25943068cd54aace (patch) | |
tree | 25f3ffdfbd017853efe69fecf8793dca16212075 /package/iwinfo/src/iwinfo_nl80211.c | |
parent | e17a3ffbbde8622189a4514f864f8241fb1ed485 (diff) | |
download | upstream-018d69c3b3421ff86be0004a25943068cd54aace.tar.gz upstream-018d69c3b3421ff86be0004a25943068cd54aace.tar.bz2 upstream-018d69c3b3421ff86be0004a25943068cd54aace.zip |
iwinfo: implement proper hardware detection for ar23xx SoC devices like the NanoStation 2
SVN-Revision: 30605
Diffstat (limited to 'package/iwinfo/src/iwinfo_nl80211.c')
-rw-r--r-- | package/iwinfo/src/iwinfo_nl80211.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/package/iwinfo/src/iwinfo_nl80211.c b/package/iwinfo/src/iwinfo_nl80211.c index e8cfb902f0..5c6f7a8ef8 100644 --- a/package/iwinfo/src/iwinfo_nl80211.c +++ b/package/iwinfo/src/iwinfo_nl80211.c @@ -1646,7 +1646,7 @@ int nl80211_get_hardware_id(const char *ifname, char *buf) /* Reuse existing interface */ if ((res = nl80211_phy2ifname(ifname)) != NULL) { - return wext_get_hardware_id(res, buf); + rv = wext_get_hardware_id(res, buf); } /* Need to spawn a temporary iface for finding IDs */ @@ -1654,11 +1654,20 @@ int nl80211_get_hardware_id(const char *ifname, char *buf) { rv = wext_get_hardware_id(res, buf); nl80211_ifdel(res); - return rv; } } + else + { + rv = wext_get_hardware_id(ifname, buf); + } - return wext_get_hardware_id(ifname, buf); + /* Failed to obtain hardware IDs, search board config */ + if (rv) + { + rv = iwinfo_hardware_id_from_mtd(buf); + } + + return rv; } static const struct iwinfo_hardware_entry * |