diff options
| author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2014-12-15 06:25:39 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2014-12-18 08:38:44 -0500 |
| commit | 93a1e86ce10e4898f9ca9cd09d659a8a7780ee5e (patch) | |
| tree | 42155b15af02c90d9c824ffbc2d3ad8b6d4a9b34 /include | |
| parent | 31a60ed1e95ab8afbadb65599bef12b195080a0c (diff) | |
nl80211: Stop scheduled scan if netlink client disappears
An attribute NL80211_ATTR_SOCKET_OWNER can be set by the scan initiator.
If present, the attribute will cause the scan to be stopped if the client
dies.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/cfg80211.h | 3 | ||||
| -rw-r--r-- | include/uapi/linux/nl80211.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 45d4d7292e53..bd672ea08c9a 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -1517,6 +1517,8 @@ struct cfg80211_match_set { | |||
| 1517 | * are 0 in the mask should be randomised, bits that are 1 should | 1517 | * are 0 in the mask should be randomised, bits that are 1 should |
| 1518 | * be taken from the @mac_addr | 1518 | * be taken from the @mac_addr |
| 1519 | * @rcu_head: RCU callback used to free the struct | 1519 | * @rcu_head: RCU callback used to free the struct |
| 1520 | * @owner_nlportid: netlink portid of owner (if this should is a request | ||
| 1521 | * owned by a particular socket) | ||
| 1520 | */ | 1522 | */ |
| 1521 | struct cfg80211_sched_scan_request { | 1523 | struct cfg80211_sched_scan_request { |
| 1522 | struct cfg80211_ssid *ssids; | 1524 | struct cfg80211_ssid *ssids; |
| @@ -1539,6 +1541,7 @@ struct cfg80211_sched_scan_request { | |||
| 1539 | struct net_device *dev; | 1541 | struct net_device *dev; |
| 1540 | unsigned long scan_start; | 1542 | unsigned long scan_start; |
| 1541 | struct rcu_head rcu_head; | 1543 | struct rcu_head rcu_head; |
| 1544 | u32 owner_nlportid; | ||
| 1542 | 1545 | ||
| 1543 | /* keep last */ | 1546 | /* keep last */ |
| 1544 | struct ieee80211_channel *channels[0]; | 1547 | struct ieee80211_channel *channels[0]; |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index b3ada0b3a276..c0383e983544 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -1672,6 +1672,9 @@ enum nl80211_commands { | |||
| 1672 | * @NL80211_ATTR_SOCKET_OWNER: Flag attribute, if set during interface | 1672 | * @NL80211_ATTR_SOCKET_OWNER: Flag attribute, if set during interface |
| 1673 | * creation then the new interface will be owned by the netlink socket | 1673 | * creation then the new interface will be owned by the netlink socket |
| 1674 | * that created it and will be destroyed when the socket is closed. | 1674 | * that created it and will be destroyed when the socket is closed. |
| 1675 | * If set during scheduled scan start then the new scan req will be | ||
| 1676 | * owned by the netlink socket that created it and the scheduled scan will | ||
| 1677 | * be stopped when the socket is closed. | ||
| 1675 | * | 1678 | * |
| 1676 | * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is | 1679 | * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is |
| 1677 | * the TDLS link initiator. | 1680 | * the TDLS link initiator. |
