linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Eliad Peller <eliad@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 15/17] cfg80211: add P2P Device abstraction
Date: Mon, 25 Jun 2012 17:48:15 +0200	[thread overview]
Message-ID: <1340639295.27437.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAB3XZEcWE46OHiigB24ezaDA3rRUYoKGtYcmvVxVgMizVK+d8w@mail.gmail.com> (sfid-20120625_172048_566221_C9431BD2)

On Mon, 2012-06-25 at 18:20 +0300, Eliad Peller wrote:

> > +void cfg80211_unregister_wdev(struct wireless_dev *wdev)

> > +       case NL80211_IFTYPE_P2P_DEVICE:
> > +               if (wdev->p2p_started) {
> > +                       wdev->p2p_started = false;
> > +                       rdev->opencount--;
> > +               }
> any reason not calling stop_p2p_device() here as well?

That would be circular? You're supposed to call this when
stop_p2p_device() gets called, or when you need to delete it for some
other reason, usually device unplug or such.


> > +static int nl80211_start_p2p_device(struct sk_buff *skb, struct genl_info *info)
> > +{
> > +       struct cfg80211_registered_device *rdev = info->user_ptr[0];
> > +       struct wireless_dev *wdev = info->user_ptr[1];
> > +       int err;
> > +
> > +       if (!rdev->ops->start_p2p_device)
> > +               return -EOPNOTSUPP;
> > +
> > +       if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
> > +               return -EOPNOTSUPP;
> > +
> > +       if (!(rdev->wiphy.interface_modes & BIT(NL80211_IFTYPE_P2P_DEVICE)))
> > +               return -EOPNOTSUPP;
> > +
> nl80211_new_interface() should already check it.

Good point. I'll remove this check.

johannes


  reply	other threads:[~2012-06-25 15:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19 14:50 [RFC 0/17] add P2P Device support Johannes Berg
2012-06-19 14:50 ` [RFC 01/17] cfg80211: make some functions static Johannes Berg
2012-06-19 14:50 ` [RFC 02/17] nl80211: refactor __cfg80211_rdev_from_info Johannes Berg
2012-06-19 14:50 ` [RFC 03/17] nl80211: fix netns separation Johannes Berg
2012-06-19 14:50 ` [RFC 04/17] nl80211: change __cfg80211_rdev_from_info Johannes Berg
2012-06-19 14:50 ` [RFC 05/17] nl80211: use __cfg80211_rdev_from_attrs for testmode Johannes Berg
2012-06-19 14:50 ` [RFC 06/17] nl80211: prepare for non-netdev wireless devs Johannes Berg
2012-06-25 13:46   ` Eliad Peller
2012-06-25 14:12     ` Johannes Berg
2012-06-19 14:50 ` [RFC 07/17] nl80211: add NL80211_FLAG_NEED_WDEV Johannes Berg
2012-06-19 14:50 ` [RFC 08/17] nl80211: retrieve interface data by wdev Johannes Berg
2012-06-19 14:50 ` [RFC 09/17] nl80211: don't assume wdev->netdev exists Johannes Berg
2012-06-19 14:50 ` [RFC 10/17] cfg80211: use wdev in some APIs Johannes Berg
2012-06-19 14:50 ` [RFC 11/17] cfg80211: use wireless_dev for interface management Johannes Berg
2012-06-19 14:50 ` [RFC 12/17] nl80211: send interface after creation Johannes Berg
2012-06-19 14:50 ` [RFC 13/17] nl80211: move scan API to wdev Johannes Berg
2012-06-19 16:49   ` Arend van Spriel
2012-06-19 16:53     ` Johannes Berg
2012-06-19 14:50 ` [RFC 14/17] mac80211: remove unused function Johannes Berg
2012-06-19 14:50 ` [RFC 15/17] cfg80211: add P2P Device abstraction Johannes Berg
2012-06-25 15:20   ` Eliad Peller
2012-06-25 15:48     ` Johannes Berg [this message]
2012-06-25 16:05       ` Eliad Peller
2012-06-25 16:16         ` Johannes Berg
2012-06-25 17:07           ` Johannes Berg
2012-06-19 14:50 ` [RFC 16/17] mac80211: make ieee80211_check_concurrent_iface netdev-independent Johannes Berg
2012-06-19 14:50 ` [RFC 17/17] mac80211: support P2P Device abstraction Johannes Berg
2012-06-25  8:06 ` [RFC 0/17] add P2P Device support 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=1340639295.27437.7.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=eliad@wizery.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 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).