From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Michael Braun <michael-dev-1SGGS//iJ+Y38rf8aCqVIw@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
projekt-wlan-3kN+8DYepx7zMJDuovMtMLNAH6kLmebB@public.gmane.org
Subject: Re: [PATCH v7 2/2] mac80211: multicast to unicast conversion
Date: Mon, 21 Nov 2016 14:24:43 +0100 [thread overview]
Message-ID: <1479734683.8662.27.camel@sipsolutions.net> (raw)
In-Reply-To: <1477921260-24556-2-git-send-email-michael-dev-1SGGS//iJ+Y38rf8aCqVIw@public.gmane.org>
On Mon, 2016-10-31 at 14:41 +0100, Michael Braun wrote:
> +static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy,
> + struct net_device
> *dev,
> + const bool enabled)
> +{
> + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> +
> + /* not supported with P2P_GO for now */
> + if (sdata->vif.type != NL80211_IFTYPE_AP)
> + return -EOPNOTSUPP;
This check is completely inefficient, since vif.type is == AP for GO.
Also, I see no reason to restrict it that way, why not remove the
check? There's no difference.
> +static inline int
> +ieee80211_multicast_to_unicast(struct sk_buff *skb, struct
> net_device *dev)
use bool return?
johannes
next prev parent reply other threads:[~2016-11-21 13:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 13:40 [PATCH v7 1/2] nl80211: multicast_to_unicast can be changed while IFF_UP Michael Braun
[not found] ` <1477921260-24556-1-git-send-email-michael-dev-1SGGS//iJ+Y38rf8aCqVIw@public.gmane.org>
2016-10-31 13:41 ` [PATCH v7 2/2] mac80211: multicast to unicast conversion Michael Braun
[not found] ` <1477921260-24556-2-git-send-email-michael-dev-1SGGS//iJ+Y38rf8aCqVIw@public.gmane.org>
2016-11-21 13:24 ` Johannes Berg [this message]
2016-11-21 12:50 ` [PATCH v7 1/2] nl80211: multicast_to_unicast can be changed while IFF_UP 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=1479734683.8662.27.camel@sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michael-dev-1SGGS//iJ+Y38rf8aCqVIw@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=projekt-wlan-3kN+8DYepx7zMJDuovMtMLNAH6kLmebB@public.gmane.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).