projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ramips: raeth: add missing Kconfig and Makefile
[openwrt.git]
/
package
/
iwinfo
/
src
/
iwinfo_nl80211.c
diff --git
a/package/iwinfo/src/iwinfo_nl80211.c
b/package/iwinfo/src/iwinfo_nl80211.c
index
4672b9d
..
5c6f7a8
100644
(file)
--- a/
package/iwinfo/src/iwinfo_nl80211.c
+++ b/
package/iwinfo/src/iwinfo_nl80211.c
@@
-387,10
+387,13
@@
static char * nl80211_wpactl_info(const char *ifname, const char *cmd,
goto out;
goto out;
- send(sock, "ATTACH", 6, 0);
+ if (event)
+ {
+ send(sock, "ATTACH", 6, 0);
- if (nl80211_wpactl_recv(sock, buffer, sizeof(buffer)) <= 0)
- goto out;
+ if (nl80211_wpactl_recv(sock, buffer, sizeof(buffer)) <= 0)
+ goto out;
+ }
send(sock, cmd, strlen(cmd), 0);
send(sock, cmd, strlen(cmd), 0);
@@
-405,7
+408,7
@@
static char * nl80211_wpactl_info(const char *ifname, const char *cmd,
break;
}
break;
}
- if ((!event && buffer[0] != '<') ||
strstr(buffer, event
))
+ if ((!event && buffer[0] != '<') ||
(event && strstr(buffer, event)
))
break;
}
break;
}
@@
-559,6
+562,9
@@
void nl80211_close(void)
{
if (nls)
{
{
if (nls)
{
+ if (nls->nl80211)
+ genl_family_put(nls->nl80211);
+
if (nls->nl_sock)
nl_socket_free(nls->nl_sock);
if (nls->nl_sock)
nl_socket_free(nls->nl_sock);
@@
-1640,7
+1646,7
@@
int nl80211_get_hardware_id(const char *ifname, char *buf)
/* Reuse existing interface */
if ((res = nl80211_phy2ifname(ifname)) != NULL)
{
/* Reuse existing interface */
if ((res = nl80211_phy2ifname(ifname)) != NULL)
{
- r
eturn
wext_get_hardware_id(res, buf);
+ r
v =
wext_get_hardware_id(res, buf);
}
/* Need to spawn a temporary iface for finding IDs */
}
/* Need to spawn a temporary iface for finding IDs */
@@
-1648,11
+1654,20
@@
int nl80211_get_hardware_id(const char *ifname, char *buf)
{
rv = wext_get_hardware_id(res, buf);
nl80211_ifdel(res);
{
rv = wext_get_hardware_id(res, buf);
nl80211_ifdel(res);
- return rv;
}
}
}
}
+ else
+ {
+ rv = wext_get_hardware_id(ifname, buf);
+ }
+
+ /* Failed to obtain hardware IDs, search board config */
+ if (rv)
+ {
+ rv = iwinfo_hardware_id_from_mtd(buf);
+ }
- return
wext_get_hardware_id(ifname, buf)
;
+ return
rv
;
}
static const struct iwinfo_hardware_entry *
}
static const struct iwinfo_hardware_entry *
This page took
0.027653 seconds
and
4
git commands to generate.