diff options
author | Denis Kenzior <denkenz@gmail.com> | 2016-08-03 16:58:33 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-08-11 16:51:41 +0200 |
commit | 896ff0635a312022c91e2bef30c80abc27af62e8 (patch) | |
tree | aa28f1eb1bbb97da2ef565117e79f8d51087cc56 /net/wireless/core.c | |
parent | eae4430ee7c5ea1152400cfc070f3746d41fa134 (diff) | |
download | linux-896ff0635a312022c91e2bef30c80abc27af62e8.tar.bz2 |
cfg80211: always notify userspace of new wireless netdevs
This change alters the semantics of NL80211_CMD_NEW_INTERFACE events
by always sending this event whenever a new net_device object
associated with a wdev is registered. Prior to this change, this event
was only sent as a result of NL80211_CMD_NEW_INTERFACE command sent
from userspace. This allows userspace to reliably detect new wireless
interfaces (e.g. due to hardware hot-plug events, etc).
For wdevs created without an associated net_device object (e.g.
NL80211_IFTYPE_P2P_DEVICE), the NL80211_CMD_NEW_INTERFACE event is
still generated inside the relevant nl80211 command handler.
Signed-off-by: Denis Kenzior <denkenz@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 7645e97362c0..7758c0fe781a 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1079,6 +1079,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, wdev->iftype == NL80211_IFTYPE_P2P_CLIENT || wdev->iftype == NL80211_IFTYPE_ADHOC) && !wdev->use_4addr) dev->priv_flags |= IFF_DONT_BRIDGE; + + nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE); break; case NETDEV_GOING_DOWN: cfg80211_leave(rdev, wdev); |