From: Dan Williams <dcbw@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 20/24] iwlegacy: only enable rfkill interrupt during UP
Date: Mon, 13 Feb 2012 10:19:18 -0600 [thread overview]
Message-ID: <1329149958.2094.4.camel@dcbw.foobar.com> (raw)
In-Reply-To: <1329128611-6815-21-git-send-email-sgruszka@redhat.com>
On Mon, 2012-02-13 at 11:23 +0100, Stanislaw Gruszka wrote:
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/iwlegacy/4965-mac.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
By UP here I'll assume IFF_UP; did the previous code enable the
interrupt while the interface was down too? The problem we have here is
that if there's no platform rfkill switch, but only the iwlwifi one,
then we don't get notifications of rfkill changes, which breaks showing
in the UI when you can and cannot use the card.
There are various complexities with rfkill here; for example I think for
3945 it used to be that you couldn't UP the interface when it was
rfkilled, so when it was killed (and thus down) you couldn't get
notifications of rfkill change at all, and thus you wouldn't know if you
could start using it again, except to poll (which sucks).
Dan
> diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
> index 24a3bbc..cf14861 100644
> --- a/drivers/net/wireless/iwlegacy/4965-mac.c
> +++ b/drivers/net/wireless/iwlegacy/4965-mac.c
> @@ -5523,13 +5523,11 @@ __il4965_up(struct il_priv *il)
> /* If platform's RF_KILL switch is NOT set to KILL */
> if (_il_rd(il, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
> clear_bit(S_RF_KILL_HW, &il->status);
> - else
> + else {
> set_bit(S_RF_KILL_HW, &il->status);
> -
> - if (il_is_rfkill(il)) {
> wiphy_rfkill_set_hw_state(il->hw->wiphy, true);
>
> - il_enable_interrupts(il);
> + il_enable_rfkill_int(il);
> IL_WARN("Radio disabled by HW RF Kill switch\n");
> return 0;
> }
next prev parent reply other threads:[~2012-02-13 16:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 10:23 [PATCH 00/24] iwlegacy update 2012-02-13 Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 01/24] iwlegacy: dump stack when fail to gain access to the device Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 02/24] iwlegacy: always check if got h/w access before write Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 03/24] iwlegacy: cleanup/fix memory barriers Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 04/24] iwlegacy: use writeb,writel,readl directly Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 05/24] iwlegacy: regulatory_bands is not an ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 06/24] iwlegacy: gather all 4965 handlers in one place Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 07/24] iwlegacy: move debugfs_ops to il_priv Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 08/24] iwlegacy: remove temp_ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 09/24] iwlegacy: merge eeprom_ops into lib_ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 10/24] iwlegacy: remove il_apm_ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 11/24] iwlegacy: merge il_lib_ops into il_ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 12/24] iwlegacy: merge all ops structures into one Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 13/24] iwlegacy: get rid of tx/rx traffic log Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 14/24] iwlegacy: improve mac operation debuggability a bit Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 15/24] iwleagcy: remove old comments Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 16/24] iwleagcy: fix ident code damage Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 17/24] iwlegacy: do not grab nic access if rfkill Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 18/24] iwlegacy: check correct il_poll_bit error value Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 19/24] iwlegacy: small il4965_set_hw_ready cleanup Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 20/24] iwlegacy: only enable rfkill interrupt during UP Stanislaw Gruszka
2012-02-13 16:19 ` Dan Williams [this message]
2012-02-13 16:43 ` Stanislaw Gruszka
2012-02-14 7:50 ` [PATCH 20/24 v2] iwlegacy: enable only rfkill interrupt when rfkill switch is on during IFF_UP Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 21/24] iwlegacy: small queue initializations cleanup Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 22/24] iwlegacy: s/S_RF_KILL_HW/S_RFKILL/g Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 23/24] iwlegacy: s/il_txq_mem/il_free_txq_mem/g Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 24/24] iwlegacy: remove il_is_rfkill_hw Stanislaw Gruszka
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=1329149958.2094.4.camel@dcbw.foobar.com \
--to=dcbw@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=sgruszka@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.