public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Bastien Nocera <hadess@hadess.net>,
	BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] Add rfkill plugin
Date: Thu, 30 Jul 2009 04:27:48 +0200	[thread overview]
Message-ID: <1248920868.28545.245.camel@violet> (raw)
In-Reply-To: <2d5a2c100907291910k20778781m3b37e510f4a5d4c2@mail.gmail.com>

Hi Luiz,

> > adapter_up() is more of a callback that's responsible for doing the
> > necessary initializations *after* adapter has just gone up, so it's not
> > the right function to call when you want to bring it up (i.e. call the
> > ioctl). I believe all code paths for bringing the adapter up call set_mode
> > in src/adapter.c which in turn calls adapter_ops->set_powered (which calls
> > the ioctl in the case of hciops).
> >
> > So having a btd_adapter_set_powered exported to plugins (which is what
> > Bastien's patch seems to do) makes sense to me in this case. I might
> > actually need something similar for maemo in order to handle our offline
> > mode better (maemo specific plugin to catch the MCE offline mode signal
> > and then call btd_adapter_set_powered).
> 
> Yep, sounds good to me too, plugins can have references to adapters so
> I guess this is perfectly fine. Also I don't think there is much to be
> protected here since powered property is readwrite and can be changed
> by any dbus client. This also makes me wonder what is the purpose of
> rfkill when we can anyone can set powered directly?

if it is rfkilled, then hciconfig hci0 up will return -ERFKILL. We fixed
this for the 2.6.31 kernel. WiFi behaves the same now. So you can't just
go ahead and bring it up again, you do have to unblock it. And you can
only unblock softkilled devices. If it is hardkilled via a hardware
switch for example, there is nothing you can do to bring it back up
except flipping the hardware switch.

Regards

Marcel



  reply	other threads:[~2009-07-30  2:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 16:34 [PATCH] Add rfkill plugin Bastien Nocera
2009-07-28 20:06 ` Marcel Holtmann
2009-07-28 20:12   ` Bastien Nocera
2009-07-28 20:21     ` Marcel Holtmann
2009-07-29 15:13 ` Bastien Nocera
2009-07-29 19:49   ` Marcel Holtmann
2009-07-29 20:15     ` Bastien Nocera
2009-07-29 20:23       ` Marcel Holtmann
2009-07-29 20:40         ` Bastien Nocera
2009-07-29 21:44         ` Johan Hedberg
2009-07-29 21:45           ` Bastien Nocera
2009-07-30  2:10           ` Luiz Augusto von Dentz
2009-07-30  2:27             ` Marcel Holtmann [this message]
2009-07-30  2:30           ` Marcel Holtmann
2009-07-30 10:23             ` Johan Hedberg

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=1248920868.28545.245.camel@violet \
    --to=marcel@holtmann.org \
    --cc=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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