From: Marcel Holtmann <marcel@holtmann.org>
To: Denis Kenzior <denkenz@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC v2 1/3] nl80211: Add nl80211_notify_iface
Date: Sat, 9 Jul 2016 16:05:33 +0200 [thread overview]
Message-ID: <1601C89F-62D4-42F5-B5A4-2C9E2F02A673@holtmann.org> (raw)
In-Reply-To: <1468044967-9236-2-git-send-email-denkenz@gmail.com>
Hi Denis,
> This function emits NL80211_CMD_NEW_INTERFACE or
> NL80211_CMD_DEL_INTERFACE events. This is meant to be used by the core
> to notify userspace applications such as wpa_supplicant when a netdev
> related to a wireless device has been added or removed.
>
> Signed-off-by: Denis Kenzior <denkenz@gmail.com>
> ---
> net/wireless/nl80211.c | 28 ++++++++++++++++++++++++++++
> net/wireless/nl80211.h | 3 +++
> 2 files changed, 31 insertions(+)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index f39fd4d..da03e17 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -11855,6 +11855,34 @@ void nl80211_notify_wiphy(struct cfg80211_registered_device *rdev,
> NL80211_MCGRP_CONFIG, GFP_KERNEL);
> }
>
> +void nl80211_notify_iface(struct cfg80211_registered_device *rdev,
> + struct wireless_dev *wdev,
> + enum nl80211_commands cmd)
> +{
> + struct sk_buff *msg;
> + bool removal;
> +
> + WARN_ON(cmd != NL80211_CMD_NEW_INTERFACE &&
> + cmd != NL80211_CMD_DEL_INTERFACE);
I would assume that BUILD_BUG_ON does a way job better here.
Regards
Marcel
next prev parent reply other threads:[~2016-07-09 14:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-09 6:16 [RFC v2 0/3] Improve wireless netdev detection Denis Kenzior
2016-07-09 6:16 ` [RFC v2 1/3] nl80211: Add nl80211_notify_iface Denis Kenzior
2016-07-09 14:05 ` Marcel Holtmann [this message]
2016-07-10 18:42 ` Arend Van Spriel
2016-07-10 19:47 ` Marcel Holtmann
2016-07-10 23:49 ` Julian Calaby
2016-07-11 7:39 ` Marcel Holtmann
2016-07-11 9:34 ` Arend Van Spriel
2016-07-09 6:16 ` [RFC v2 2/3] core: Always notify of new wireless netdevs Denis Kenzior
2016-07-09 6:16 ` [RFC v2 3/3] core: Always notify when wireless netdev is removed Denis Kenzior
2016-08-03 6:59 ` [RFC v2 0/3] Improve wireless netdev detection Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1601C89F-62D4-42F5-B5A4-2C9E2F02A673@holtmann.org \
--to=marcel@holtmann.org \
--cc=denkenz@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).