From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org,
Ahmad Kholaif <akholaif@qca.qualcomm.com>
Subject: Re: [PATCH 1/2] cfg80211: Allow NL80211_ATTR_IFINDEX to be added to vendor events
Date: Mon, 23 Feb 2015 16:37:26 +0100 [thread overview]
Message-ID: <1424705846.3075.3.camel@sipsolutions.net> (raw)
In-Reply-To: <1424442925-10778-1-git-send-email-jouni@qca.qualcomm.com>
In addition to what Arend said,
> @@ -4263,7 +4263,8 @@ struct sk_buff *__cfg80211_alloc_event_skb(struct wiphy *wiphy,
> enum nl80211_commands cmd,
> enum nl80211_attrs attr,
> int vendor_event_idx,
> - int approxlen, gfp_t gfp);
> + int approxlen, gfp_t gfp,
> + struct wireless_dev *wdev);
This is really strange. IMHO the wdev should be the second argument -
certainly usually gfp is the last one so it shouldn't be after that.
> +/**
> + * cfg80211_vendor_event_alloc_ext - allocate vendor-specific event skb
> + * @wiphy: the wiphy
> + * @event_idx: index of the vendor event in the wiphy's vendor_events
> + * @approxlen: an upper bound of the length of the data that will
> + * be put into the skb
> + * @gfp: allocation flags
> + * @wdev: the wireless device
> + *
> + * This function allocates and pre-fills an skb for an event on the
> + * vendor-specific multicast group. This is otherwise identical to
> + * cfg80211_vendor_event_alloc(), but ifindex of the specified wireless device
> + * is added to the event message before the vendor data attribute.
> + *
> + * When done filling the skb, call cfg80211_vendor_event() with the
> + * skb to send the event.
> + *
> + * Return: An allocated and pre-filled skb. %NULL if any errors happen.
> + */
> +static inline struct sk_buff *
> +cfg80211_vendor_event_alloc_ext(struct wiphy *wiphy, int approxlen,
> + int event_idx, gfp_t gfp,
> + struct wireless_dev *wdev)
> +{
> + return __cfg80211_alloc_event_skb(wiphy, NL80211_CMD_VENDOR,
> + NL80211_ATTR_VENDOR_DATA,
> + event_idx, approxlen, gfp, wdev);
> }
This doesn't seem necessary, why not just update the original function
to add and document the new optional argument?
[however, in the unlikely even that you can convince me otherwise we may
have to add this to the documentation?]
johannes
next prev parent reply other threads:[~2015-02-23 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 14:35 [PATCH 1/2] cfg80211: Allow NL80211_ATTR_IFINDEX to be added to vendor events Jouni Malinen
2015-02-20 14:35 ` [PATCH 2/2] mac80211_hwsim: Add ifindex to the example vendor event Jouni Malinen
2015-02-20 19:28 ` [PATCH 1/2] cfg80211: Allow NL80211_ATTR_IFINDEX to be added to vendor events Arend van Spriel
2015-02-23 15:37 ` Johannes Berg [this message]
2015-02-23 19:51 ` Kholaif, Ahmad
2015-02-24 8:05 ` 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=1424705846.3075.3.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=akholaif@qca.qualcomm.com \
--cc=jouni@qca.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.