]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Use nl_atype() from libnl
authorRaghunathan Kailasanathan <raghunathan.kailasanathan@wipro.com>
Tue, 22 Feb 2011 19:48:49 +0000 (21:48 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 22 Feb 2011 19:48:49 +0000 (21:48 +0200)
libnl provides nla_type() which can be used to derive nla_type from
struct nlattr.

src/drivers/driver_nl80211.c

index d3b0b650c455e869e91c1f79c4886b4e8cb1daee..a64b091ab28803d7241dd770eb1a1070f3d49703 100644 (file)
@@ -1499,7 +1499,7 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
                int i;
                nla_for_each_nested(nl_mode,
                                    tb[NL80211_ATTR_SUPPORTED_IFTYPES], i) {
-                       switch (nl_mode->nla_type) {
+                       switch (nla_type(nl_mode)) {
                        case NL80211_IFTYPE_AP:
                                info->ap_supported = 1;
                                break;