History

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.

Jukka Rissanen committed 12 years ago

Commit 18e5ca61 parent 6b67e012 files · +6 −5Browse files

Unified · Split

2 files
  1. include/uapi/linux/nl80211.h +4 −3
  2. net/wireless/nl80211.c +2 −2
include/uapi/linux/nl80211.h+4−3
@@ -1652,9 +1652,9 @@ enum nl80211_commands { · 1651 unmodified lines
16521652 * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32.
16531653 * As specified in the &enum nl80211_tdls_peer_capability.
16541654 *
1655− * @NL80211_ATTR_IFACE_SOCKET_OWNER: flag attribute, if set during interface
1655+ * @NL80211_ATTR_SOCKET_OWNER: Flag attribute, if set during interface
16561656 * 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.
16581658 *
16591659 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
16601660 * the TDLS link initiator.
@@ -2024,7 +2024,7 @@ enum nl80211_attrs { · 363 unmodified lines
20242024
20252025 NL80211_ATTR_TDLS_PEER_CAPABILITY,
20262026
2027− NL80211_ATTR_IFACE_SOCKET_OWNER,
2027+ NL80211_ATTR_SOCKET_OWNER,
20282028
20292029 NL80211_ATTR_CSA_C_OFFSETS_TX,
20302030 NL80211_ATTR_MAX_CSA_COUNTERS,
@@ -2055,6 +2055,7 @@ enum nl80211_attrs { · 24 unmodified lines
20552055 /* source-level API compatibility */
20562056 #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
20572057 #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
2058+#define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
20582059
20592060 /*
20602061 * Allow user space programs to use #ifdef on new attributes by defining them
net/wireless/nl80211.c+2−2
@@ -388,7 +388,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { · 387 unmodified lines
388388 [NL80211_ATTR_MAC_HINT] = { .len = ETH_ALEN },
389389 [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 },
390390 [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 },
392392 [NL80211_ATTR_CSA_C_OFFSETS_TX] = { .type = NLA_BINARY },
393393 [NL80211_ATTR_USE_RRM] = { .type = NLA_FLAG },
394394 [NL80211_ATTR_TSID] = { .type = NLA_U8 },
@@ -2653,7 +2653,7 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info) · 2258 unmodified lines
26532653 return PTR_ERR(wdev);
26542654 }
26552655
2656− if (info->attrs[NL80211_ATTR_IFACE_SOCKET_OWNER])
2656+ if (info->attrs[NL80211_ATTR_SOCKET_OWNER])
26572657 wdev->owner_nlportid = info->snd_portid;
26582658
26592659 switch (type) {