[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1479734683.8662.27.camel@sipsolutions.net>
Date: Mon, 21 Nov 2016 14:24:43 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Michael Braun <michael-dev@...i-braun.de>
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
projekt-wlan@....tu-ilmenau.de
Subject: Re: [PATCH v7 2/2] mac80211: multicast to unicast conversion
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
Powered by blists - more mailing lists