linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Improve wireless netdev detection
@ 2016-07-07  7:08 Denis Kenzior
  2016-07-07  7:08 ` [PATCH 1/5] nl80211: Add nl80211_notify_iface Denis Kenzior
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Denis Kenzior @ 2016-07-07  7:08 UTC (permalink / raw)
  To: linux-wireless; +Cc: Denis Kenzior

The current mechanism to detect hot-plug / unplug of wireless devices is
somewhat arcane.  One has to listen to NEW_WIPHY/DEL_WIPHY events over
nl80211 as well as RTM_NEWLINK / RTM_DELLINK events over rtnl, then
somehow find a correlation between these events.  This involves userspace
sending GET_INTERFACE or GET_WIPHY commands to the kernel, which incurs
additional roundtrips.

This patch series proposes that NEW_INTERFACE and DEL_INTERFACE events are
always emitted, regardless of whether a netdev was added/removed by the
driver or explicitly via NEW_INTERFACE/DEL_INTERFACE commands.

One side effect of this approach is that multiple NEW_INTERFACE/DEL_INTERFACE
events might be generated for P2P interfaces.  Once when a wdev is created
or destroyed, and once when the associated p2p netdev is connecte or 
disconnected.  It is likely that only the caller of P2P oriented
NEW_INTERFACE / DEL_INTERFACE commands is interested in the status of these
operations.  E.g. the caller is / should be using SOCKET_OWNER attribute.
Thus one possibility is to not emit NEW_INTERFACE/DEL_INTERFACE events in
such cases.

Denis Kenzior (5):
  nl80211: Add nl80211_notify_iface
  core: Notify of new wireless netdevs
  nl80211: Emit NEW_INTERFACE only in special cases
  core: Notify when wireless netdev is removed
  nl80211: Emit DEL_INTERFACE only in special cases

 net/wireless/core.c    |  4 ++++
 net/wireless/nl80211.c | 63 ++++++++++++++++++++++++++++++++++++++------------
 net/wireless/nl80211.h |  3 +++
 3 files changed, 55 insertions(+), 15 deletions(-)

-- 
2.7.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-08 15:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07  7:08 [PATCH 0/5] Improve wireless netdev detection Denis Kenzior
2016-07-07  7:08 ` [PATCH 1/5] nl80211: Add nl80211_notify_iface Denis Kenzior
2016-07-07  7:08 ` [PATCH 2/5] core: Notify of new wireless netdevs Denis Kenzior
2016-07-07  7:08 ` [PATCH 3/5] nl80211: Emit NEW_INTERFACE only in special cases Denis Kenzior
2016-07-07  7:08 ` [PATCH 4/5] core: Notify when wireless netdev is removed Denis Kenzior
2016-07-07  7:08 ` [PATCH 5/5] nl80211: Emit DEL_INTERFACE only in special cases Denis Kenzior
2016-07-08 10:32 ` [PATCH 0/5] Improve wireless netdev detection Johannes Berg
2016-07-08 15:22   ` Denis Kenzior
2016-07-08 15:26     ` Johannes Berg
2016-07-08 15:31       ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).