Rename NL80211_[ATTR]_STA_STAT_* to NL80211_[ATTR_]STA_INFO_

adapt to change 72141605e9f9d856418bbed9dc47e5ad42aabb42
nl80211/cfg80211: support for mesh, sta dumping

Signed-off-by: Daniel Wagner <wagi@monom.org>
This commit is contained in:
Daniel Wagner 2008-03-31 12:39:52 +03:00 committed by Jouni Malinen
parent 0e5776f673
commit 913cf1caec

View file

@ -598,11 +598,11 @@ static int get_sta_handler(struct nl_msg *msg, void *arg)
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 @@ static int get_sta_handler(struct nl_msg *msg, void *arg)
* 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;
}