]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: always notify userspace when wireless netdev is removed
authorDenis Kenzior <denkenz@gmail.com>
Wed, 3 Aug 2016 21:58:35 +0000 (16:58 -0500)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 11 Aug 2016 14:51:42 +0000 (16:51 +0200)
commitac4f27cd7f563d870079c0c87102a4b3a7339613
tree6387f94b3e3e3ecc4a80e41c0f68b16e0ce59d4d
parent3957c689b904dcbd1530546bbc767e471e20b44b
cfg80211: always notify userspace when wireless netdev is removed

This change alters the semantics of NL80211_CMD_DEL_INTERFACE events
by always sending this event whenever a net_device object associated
with a wdev is destroyed.  Prior to this change, this event was only
emitted as a result of NL80211_CMD_DEL_INTERFACE command sent from
userspace.  This allows userspace to reliably detect when wireless
interfaces have been removed, e.g. due to USB removal events, etc.

For wireless device objects without an associated net_device (e.g.
NL80211_IFTYPE_P2P_DEVICE), the NL80211_CMD_DEL_INTERFACE event is
now generated inside cfg80211_unregister_wdev.

Signed-off-by: Denis Kenzior <denkenz@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c
net/wireless/nl80211.c