From: Matthew Garrett <mjg@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, Matthew Garrett <mjg@redhat.com>
Subject: [PATCH 2/2] ipw2200: Set core hw rfkill status when hardware changes state
Date: Wed, 11 Nov 2009 14:36:31 -0500 [thread overview]
Message-ID: <1257968191-495-2-git-send-email-mjg@redhat.com> (raw)
In-Reply-To: <1257968191-495-1-git-send-email-mjg@redhat.com>
ipw2200 is able to detect when it's been hard-killed, but doesn't update
the core rfkill state or update userspace. Ensure that the state is updated,
allowing the rfkill core to notify userspace.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
drivers/net/wireless/ipw2x00/ipw2200.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 827824d..1029138 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -1753,10 +1753,13 @@ static DEVICE_ATTR(direct_dword, S_IWUSR | S_IRUGO,
static int rf_kill_active(struct ipw_priv *priv)
{
- if (0 == (ipw_read32(priv, 0x30) & 0x10000))
+ if (0 == (ipw_read32(priv, 0x30) & 0x10000)) {
priv->status |= STATUS_RF_KILL_HW;
- else
+ wiphy_rfkill_set_hw_state(priv->ieee->wdev.wiphy, true);
+ } else {
priv->status &= ~STATUS_RF_KILL_HW;
+ wiphy_rfkill_set_hw_state(priv->ieee->wdev.wiphy, false);
+ }
return (priv->status & STATUS_RF_KILL_HW) ? 1 : 0;
}
@@ -2039,6 +2042,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv)
if (inta & IPW_INTA_BIT_RF_KILL_DONE) {
IPW_DEBUG_RF_KILL("RF_KILL_DONE\n");
priv->status |= STATUS_RF_KILL_HW;
+ wiphy_rfkill_set_hw_state(priv->ieee->wdev.wiphy, true);
wake_up_interruptible(&priv->wait_command_queue);
priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING);
cancel_delayed_work(&priv->request_scan);
--
1.6.5.2
next prev parent reply other threads:[~2009-11-11 19:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 19:36 [PATCH 1/2] ipw2100: Register the wiphy device Matthew Garrett
2009-11-11 19:36 ` Matthew Garrett [this message]
2009-11-12 6:17 ` [PATCH 2/2] ipw2200: Set core hw rfkill status when hardware changes state Zhu Yi
2009-11-12 6:19 ` [PATCH 1/2] ipw2100: Register the wiphy device Zhu Yi
2009-11-13 1:16 ` Zhu Yi
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=1257968191-495-2-git-send-email-mjg@redhat.com \
--to=mjg@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).