summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg2014-03-24 17:57:27 +0100
committerJohannes Berg2014-04-09 10:55:28 +0200
commit78f22b6a3a9254460d23060530b48ae02a9394e3 (patch)
tree0770800533747eac02405fc01007cf719e0406f3 /include/net/cfg80211.h
parentmac80211: remove VLAIS usage from mac80211 (diff)
downloadkernel-qcow2-linux-78f22b6a3a9254460d23060530b48ae02a9394e3.tar.gz
kernel-qcow2-linux-78f22b6a3a9254460d23060530b48ae02a9394e3.tar.xz
kernel-qcow2-linux-78f22b6a3a9254460d23060530b48ae02a9394e3.zip
cfg80211: allow userspace to take ownership of interfaces
When dynamically creating interfaces from userspace, e.g. for P2P usage, such interfaces are usually owned by the process that created them, i.e. wpa_supplicant. Should wpa_supplicant crash, such interfaces will often cease operating properly and cause problems on restarting the process. To avoid this problem, introduce an ownership concept for interfaces. If an interface is owned by a netlink socket, then it will be destroyed if the netlink socket is closed for any reason, including if the process it belongs to crashed. This gives us a race-free way to get rid of any such interfaces. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f3539a15c411..6510ccf53a54 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3194,6 +3194,7 @@ struct cfg80211_cached_keys;
* @ibss_dfs_possible: (private) IBSS may change to a DFS channel
* @event_list: (private) list for internal event processing
* @event_lock: (private) lock for event list
+ * @owner_nlportid: (private) owner socket port ID
*/
struct wireless_dev {
struct wiphy *wiphy;
@@ -3241,6 +3242,8 @@ struct wireless_dev {
unsigned long cac_start_time;
unsigned int cac_time_ms;
+ u32 owner_nlportid;
+
#ifdef CONFIG_CFG80211_WEXT
/* wext data */
struct {