aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2008-04-10 14:28:14 +0000
committerFlorian Fainelli <florian@openwrt.org>2008-04-10 14:28:14 +0000
commitf0e627da9768946da62855fd4c51e23cbae048a5 (patch)
tree947d66d22235a6f95edc5c76c638932028f74787 /package
parent1063bac7d44500b84d702f3a0fa1fac154b3e4ac (diff)
downloadupstream-f0e627da9768946da62855fd4c51e23cbae048a5.tar.gz
upstream-f0e627da9768946da62855fd4c51e23cbae048a5.tar.bz2
upstream-f0e627da9768946da62855fd4c51e23cbae048a5.zip
Fix hostapd compilation errors on STA_INFO (#3308)
SVN-Revision: 10784
Diffstat (limited to 'package')
-rw-r--r--package/hostapd/patches/004-nl80211-rename-STAT-to-INFO.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/package/hostapd/patches/004-nl80211-rename-STAT-to-INFO.patch b/package/hostapd/patches/004-nl80211-rename-STAT-to-INFO.patch
new file mode 100644
index 0000000000..7664a8633a
--- /dev/null
+++ b/package/hostapd/patches/004-nl80211-rename-STAT-to-INFO.patch
@@ -0,0 +1,55 @@
+Index: hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/driver_nl80211.c
+===================================================================
+--- hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576.orig/hostapd/driver_nl80211.c.orig 2008-04-09 14:03:17.000000000 +1200
++++ hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/driver_nl80211.c 2008-04-09 14:06:37.000000000 +1200
+@@ -598,11 +598,11 @@
+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
+ struct hostap_sta_driver_data *data = arg;
+- struct nlattr *stats[NL80211_STA_STAT_MAX + 1];
+- static struct nla_policy stats_policy[NL80211_STA_STAT_MAX + 1] = {
+- [NL80211_STA_STAT_INACTIVE_TIME] = { .type = NLA_U32 },
+- [NL80211_STA_STAT_RX_BYTES] = { .type = NLA_U32 },
+- [NL80211_STA_STAT_TX_BYTES] = { .type = NLA_U32 },
++ struct nlattr *stats[NL80211_STA_INFO_MAX + 1];
++ static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = {
++ [NL80211_STA_INFO_INACTIVE_TIME] = { .type = NLA_U32 },
++ [NL80211_STA_INFO_RX_BYTES] = { .type = NLA_U32 },
++ [NL80211_STA_INFO_TX_BYTES] = { .type = NLA_U32 },
+ };
+
+ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
+@@ -614,24 +614,24 @@
+ * the kernel starts sending station notifications.
+ */
+
+- if (!tb[NL80211_ATTR_STA_STATS]) {
++ if (!tb[NL80211_ATTR_STA_INFO]) {
+ wpa_printf(MSG_DEBUG, "sta stats missing!");
+ return NL_SKIP;
+ }
+- if (nla_parse_nested(stats, NL80211_STA_STAT_MAX,
+- tb[NL80211_ATTR_STA_STATS],
++ if (nla_parse_nested(stats, NL80211_STA_INFO_MAX,
++ tb[NL80211_ATTR_STA_INFO],
+ stats_policy)) {
+ wpa_printf(MSG_DEBUG, "failed to parse nested attributes!");
+ return NL_SKIP;
+ }
+
+- if (stats[NL80211_STA_STAT_INACTIVE_TIME])
++ if (stats[NL80211_STA_INFO_INACTIVE_TIME])
+ data->inactive_msec =
+- nla_get_u32(stats[NL80211_STA_STAT_INACTIVE_TIME]);
+- if (stats[NL80211_STA_STAT_RX_BYTES])
+- data->rx_bytes = nla_get_u32(stats[NL80211_STA_STAT_RX_BYTES]);
+- if (stats[NL80211_STA_STAT_TX_BYTES])
+- data->rx_bytes = nla_get_u32(stats[NL80211_STA_STAT_TX_BYTES]);
++ nla_get_u32(stats[NL80211_STA_INFO_INACTIVE_TIME]);
++ if (stats[NL80211_STA_INFO_RX_BYTES])
++ data->rx_bytes = nla_get_u32(stats[NL80211_STA_INFO_RX_BYTES]);
++ if (stats[NL80211_STA_INFO_TX_BYTES])
++ data->rx_bytes = nla_get_u32(stats[NL80211_STA_INFO_TX_BYTES]);
+
+ return NL_SKIP;
+ }