projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix sstrip compile on mac os x
[openwrt.git]
/
package
/
hostapd
/
patches
/
006-use-nl80211-for-sta.patch
diff --git
a/package/hostapd/patches/006-use-nl80211-for-sta.patch
b/package/hostapd/patches/006-use-nl80211-for-sta.patch
index
f94ba42
..
133a750
100644
(file)
--- a/
package/hostapd/patches/006-use-nl80211-for-sta.patch
+++ b/
package/hostapd/patches/006-use-nl80211-for-sta.patch
@@
-1,9
+1,9
@@
---
---
- hostapd/driver_devicescape.c | 33
0
++++++++++++++++++++++++++++++++-----------
- 1 file changed, 2
49
insertions(+), 81 deletions(-)
+ hostapd/driver_devicescape.c | 33
2
++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 2
51
insertions(+), 81 deletions(-)
---- hostap.orig/hostapd/driver_devicescape.c 2007-11-
09 13:4
1:15.000000000 +0100
-+++ hostap/hostapd/driver_devicescape.c 2007-11-
09 13:4
1:16.000000000 +0100
+--- hostap.orig/hostapd/driver_devicescape.c 2007-11-
14 17:3
1:15.000000000 +0100
++++ hostap/hostapd/driver_devicescape.c 2007-11-
14 17:3
1:16.000000000 +0100
@@ -75,8 +75,14 @@ struct i802_driver_data {
#define HAPD_DECL struct hostapd_data *hapd = iface->bss[0]
@@ -75,8 +75,14 @@ struct i802_driver_data {
#define HAPD_DECL struct hostapd_data *hapd = iface->bss[0]
@@
-128,12
+128,15
@@
+ int ret = -1;
+ int err = 0;
+ int finished = 0;
+ int ret = -1;
+ int err = 0;
+ int finished = 0;
-
-- memset(data, 0, sizeof(*data));
++
+ msg = nlmsg_alloc();
+ if (!msg)
+ goto out;
+ msg = nlmsg_alloc();
+ if (!msg)
+ goto out;
+- memset(data, 0, sizeof(*data));
++ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
++ 0, NL80211_CMD_GET_STATION, 0);
+
- memset(¶m, 0, sizeof(param));
- param.cmd = PRISM2_HOSTAPD_GET_INFO_STA;
- memcpy(param.sta_addr, addr, ETH_ALEN);
- memset(¶m, 0, sizeof(param));
- param.cmd = PRISM2_HOSTAPD_GET_INFO_STA;
- memcpy(param.sta_addr, addr, ETH_ALEN);
@@
-141,9
+144,6
@@
- printf(" Could not get station info from kernel driver.\n");
- return -1;
- }
- printf(" Could not get station info from kernel driver.\n");
- return -1;
- }
-+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
-+ 0, NL80211_CMD_GET_STATION, 0);
-+
+ NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
+ NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(drv->iface));
+
+ NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
+ NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(drv->iface));
+
@@
-189,7
+189,7
@@
}
}
-@@ -744,35 +825,
68
@@ static int i802_sta_add(const char *ifna
+@@ -744,35 +825,
70
@@ static int i802_sta_add(const char *ifna
size_t supp_rates_len, int flags)
{
struct i802_driver_data *drv = priv;
size_t supp_rates_len, int flags)
{
struct i802_driver_data *drv = priv;
@@
-223,12
+223,14
@@
+ supp_rates);
+ NLA_PUT_U16(msg, NL80211_ATTR_STA_LISTEN_INTERVAL, 0);
+
+ supp_rates);
+ NLA_PUT_U16(msg, NL80211_ATTR_STA_LISTEN_INTERVAL, 0);
+
-+ ret = 0;
++ ret = nl_send_auto_complete(drv->nl_handle, msg);
++ if (ret < 0)
++ goto nla_put_failure;
+
+
-+
if (nl_send_auto_complete(drv->nl_handle, msg) < 0 ||
-+
nl_wait_for_ack(drv->nl_handle) < 0) {
-+
ret = -1;
-+
}
++
ret = nl_wait_for_ack(drv->nl_handle);
++
/* ignore EEXIST, this happens if a STA associates while associated */
++
if (ret == -EEXIST || ret >= 0)
++
ret = 0;
+
+ nla_put_failure:
+ nlmsg_free(msg);
+
+ nla_put_failure:
+ nlmsg_free(msg);
@@
-278,7
+280,7
@@
}
}
-@@ -780,14 +89
4
,51 @@ static int i802_sta_set_flags(void *priv
+@@ -780,14 +89
6
,51 @@ static int i802_sta_set_flags(void *priv
int total_flags, int flags_or, int flags_and)
{
struct i802_driver_data *drv = priv;
int total_flags, int flags_or, int flags_and)
{
struct i802_driver_data *drv = priv;
@@
-337,7
+339,7
@@
}
}
-@@ -1257,18 +14
08
,38 @@ static struct hostapd_hw_modes * i802_ge
+@@ -1257,18 +14
10
,38 @@ static struct hostapd_hw_modes * i802_ge
}
}
@@
-385,7
+387,7
@@
}
}
-@@ -175
0,17 +1921
,14 @@ static int i802_init_sockets(struct i802
+@@ -175
2,17 +1925
,14 @@ static int i802_init_sockets(struct i802
static int i802_get_inact_sec(void *priv, const u8 *addr)
{
static int i802_get_inact_sec(void *priv, const u8 *addr)
{
This page took
0.021953 seconds
and
4
git commands to generate.