aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2014-11-13 10:25:14 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-19 12:54:40 -0500
commit18e5ca65e55da4cacd9deb4e934eb5429bb4b79d (patch)
treec55b6e1753e7304a4a5527a07a7e0e8df236ecb1
parent6b67e01fc0c4f7759a3e6e75fdcf17195daa482e (diff)
nl80211: Replace interface socket owner attribute with more generic one
Replace NL80211_ATTR_IFACE_SOCKET_OWNER attribute with more generic NL80211_ATTR_SOCKET_OWNER that can be used with other commands that interface creation. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--include/uapi/linux/nl80211.h7
-rw-r--r--net/wireless/nl80211.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index a99081efc2d4..d77524510435 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1652,9 +1652,9 @@ enum nl80211_commands {
1652 * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32. 1652 * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32.
1653 * As specified in the &enum nl80211_tdls_peer_capability. 1653 * As specified in the &enum nl80211_tdls_peer_capability.
1654 * 1654 *
1655 * @NL80211_ATTR_IFACE_SOCKET_OWNER: flag attribute, if set during interface 1655 * @NL80211_ATTR_SOCKET_OWNER: Flag attribute, if set during interface
1656 * creation then the new interface will be owned by the netlink socket 1656 * creation then the new interface will be owned by the netlink socket
1657 * that created it and will be destroyed when the socket is closed 1657 * that created it and will be destroyed when the socket is closed.
1658 * 1658 *
1659 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is 1659 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
1660 * the TDLS link initiator. 1660 * the TDLS link initiator.
@@ -2024,7 +2024,7 @@ enum nl80211_attrs {
2024 2024
2025 NL80211_ATTR_TDLS_PEER_CAPABILITY, 2025 NL80211_ATTR_TDLS_PEER_CAPABILITY,
2026 2026
2027 NL80211_ATTR_IFACE_SOCKET_OWNER, 2027 NL80211_ATTR_SOCKET_OWNER,
2028 2028
2029 NL80211_ATTR_CSA_C_OFFSETS_TX, 2029 NL80211_ATTR_CSA_C_OFFSETS_TX,
2030 NL80211_ATTR_MAX_CSA_COUNTERS, 2030 NL80211_ATTR_MAX_CSA_COUNTERS,
@@ -2055,6 +2055,7 @@ enum nl80211_attrs {
2055/* source-level API compatibility */ 2055/* source-level API compatibility */
2056#define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION 2056#define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
2057#define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG 2057#define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
2058#define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
2058 2059
2059/* 2060/*
2060 * Allow user space programs to use #ifdef on new attributes by defining them 2061 * Allow user space programs to use #ifdef on new attributes by defining them
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 5cfd75dfff67..c81491b1f737 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -388,7 +388,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
388 [NL80211_ATTR_MAC_HINT] = { .len = ETH_ALEN }, 388 [NL80211_ATTR_MAC_HINT] = { .len = ETH_ALEN },
389 [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 }, 389 [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 },
390 [NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 }, 390 [NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 },
391 [NL80211_ATTR_IFACE_SOCKET_OWNER] = { .type = NLA_FLAG }, 391 [NL80211_ATTR_SOCKET_OWNER] = { .type = NLA_FLAG },
392 [NL80211_ATTR_CSA_C_OFFSETS_TX] = { .type = NLA_BINARY }, 392 [NL80211_ATTR_CSA_C_OFFSETS_TX] = { .type = NLA_BINARY },
393 [NL80211_ATTR_USE_RRM] = { .type = NLA_FLAG }, 393 [NL80211_ATTR_USE_RRM] = { .type = NLA_FLAG },
394 [NL80211_ATTR_TSID] = { .type = NLA_U8 }, 394 [NL80211_ATTR_TSID] = { .type = NLA_U8 },
@@ -2653,7 +2653,7 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
2653 return PTR_ERR(wdev); 2653 return PTR_ERR(wdev);
2654 } 2654 }
2655 2655
2656 if (info->attrs[NL80211_ATTR_IFACE_SOCKET_OWNER]) 2656 if (info->attrs[NL80211_ATTR_SOCKET_OWNER])
2657 wdev->owner_nlportid = info->snd_portid; 2657 wdev->owner_nlportid = info->snd_portid;
2658 2658
2659 switch (type) { 2659 switch (type) {