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 19:07:58 +0200	[thread overview]
Message-ID: <1340644078.956.2.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1340640972.27437.19.camel@jlt3.sipsolutions.net> (sfid-20120625_181620_114407_E2D6F840)

On Mon, 2012-06-25 at 18:16 +0200, Johannes Berg wrote:
> On Mon, 2012-06-25 at 19:05 +0300, Eliad Peller wrote:
> > On Mon, Jun 25, 2012 at 6:48 PM, Johannes Berg
> > <johannes@sipsolutions.net> wrote:
> > > 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.
> > >
> > hmm... so where stop_p2p_device is being called when userspace doesn't call it?
> 
> Why should it be called? The stop can either originate from userspace,
> or from the driver in case the device is unplugged etc. In that case,
> the driver is expected to clean up its own status before it calls
> unregister_wdev().
> 
> I guess this is a bit different from the netdevs where we do call the
> relevant stop functions when the interface goes down, and it goes down
> when it is unregistered, etc.
> 
> Then again, if we do call stop_p2p_device here, it's not actually that
> circular because it will only happen the first time around. Hmm.

Wait, it's not actually circular, I'm confusing stop_p2p_device and
del_virtual_intf... So I guess it makes sense and we could just call it
here, and drivers don't need to stop anything etc. I'll change it.

johannes


  reply	other threads:[~2012-06-25 17:08 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
2012-06-25 16:05       ` Eliad Peller
2012-06-25 16:16         ` Johannes Berg
2012-06-25 17:07           ` Johannes Berg [this message]
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=1340644078.956.2.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).