Search Linux Wireless

Re: [PATCH 5/5 v4] mac80211: New notification to discover mesh peer candidates.

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

 



On Fri, 2011-03-18 at 13:22 -0700, Javier Cardona wrote:

> @@ -1170,6 +1182,7 @@ enum nl80211_iftype {
>   * @NL80211_STA_FLAG_WME: station is WME/QoS capable
>   * @NL80211_STA_FLAG_MFP: station uses management frame protection
>   * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
> + * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated
>   * @__NL80211_STA_FLAG_AFTER_LAST: internal use

This looks a little odd, but doesn't really matter.


> +void cfg80211_notify_new_peer_candidate(struct net_device *dev,
> +		const u8 *macaddr, const u8* ie, u8 ie_len, gfp_t gfp)
> +{
> +	struct wireless_dev *wdev = dev->ieee80211_ptr;
> +	struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
> +	struct cfg80211_event *ev;
> +	unsigned long flags;
> +
> +	ev = kzalloc(sizeof(*ev), gfp);
> +	if (!ev)
> +		return;
> +	ev->type = EVENT_NEW_CANDIDATE;
> +	memcpy(ev->nc.macaddr, macaddr, ETH_ALEN);
> +	if (ie_len && ie) {
> +		ev->nc.ie = kmemdup(ie, ie_len, gfp);
> +		ev->nc.ie_len = (ev->nc.ie) ? ie_len : 0;
> +	}
> +
> +	spin_lock_irqsave(&wdev->event_lock, flags);
> +	list_add_tail(&ev->list, &wdev->event_list);
> +	spin_unlock_irqrestore(&wdev->event_lock, flags);
> +	queue_work(cfg80211_wq, &rdev->event_work);

Why schedule out here and all the complexity with that? Seems pointless,
just pass the gfp through to nl80211?


Also, this changes the APIs again. Do you think you could collect the
API changes into a separate patch and combine them in nl80211/cfg80211?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux