Search Linux Wireless

Re: [PATCH v7 2/2] mac80211: multicast to unicast conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux