linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: "Michał Kudła" <michal.kudla@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [2.6.26-rc5] iwlwifi 4965 not working - last on 2.6.23
Date: Tue, 24 Jun 2008 10:41:15 +0800	[thread overview]
Message-ID: <1214275275.14590.194.camel@debian.sh.intel.com> (raw)
In-Reply-To: <200806232103.31283.Michal.Kudla@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

On Mon, 2008-06-23 at 21:03 +0200, Michał Kudła wrote:
> 
> I attached files form console log and dmesg
> console-rfkill-0.txt
> dmesg-2.6.26-rc7_2008-06-23-rfkill-0.txt
> console-rfkill-1.txt
> dmesg-2.6.26-rc7_2008-06-23-rfkill-1.txt

Please try attached patch.

Thanks,
-yi

[-- Attachment #2: linux-2.6.26-rc7-sw-rfkill.patch --]
[-- Type: text/x-patch, Size: 1525 bytes --]

diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 883b42f..39cab88 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2444,7 +2444,8 @@ void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
 	spin_lock_irqsave(&priv->lock, flags);
 	iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
 
-	clear_bit(STATUS_RF_KILL_SW, &priv->status);
+	if (!priv->is_open)
+		clear_bit(STATUS_RF_KILL_SW, &priv->status);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 	/* wake up ucode */
@@ -2462,7 +2463,6 @@ void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
 		return;
 	}
 
-	queue_work(priv->workqueue, &priv->restart);
 	return;
 }
 
@@ -5534,13 +5534,15 @@ static int __iwl4965_up(struct iwl_priv *priv)
 	if (iwl_read32(priv, CSR_GP_CNTRL) &
 				CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
 		clear_bit(STATUS_RF_KILL_HW, &priv->status);
-	else {
+	else
 		set_bit(STATUS_RF_KILL_HW, &priv->status);
-		if (!test_bit(STATUS_IN_SUSPEND, &priv->status)) {
-			iwl_rfkill_set_hw_state(priv);
-			IWL_WARNING("Radio disabled by HW RF Kill switch\n");
-			return -ENODEV;
-		}
+
+	if (!test_bit(STATUS_IN_SUSPEND, &priv->status) &&
+	    iwl_is_rfkill(priv)) {
+		iwl_rfkill_set_hw_state(priv);
+		IWL_WARNING("Radio disabled by %s RF Kill switch\n",
+		    test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW");
+		return -ENODEV;
 	}
 
 	iwl_rfkill_set_hw_state(priv);

  reply	other threads:[~2008-06-24  2:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200806060039.48488.m1k0@wp.pl>
2008-06-06 10:47 ` [2.6.26-rc5] iwlwifi 4965 not working - last on 2.6.23 Andrew Morton
2008-06-06 19:37   ` Michał Kudła
2008-06-11  2:31   ` Zhu Yi
2008-06-11 19:17     ` Michał Kudła
2008-06-13  7:54       ` Zhu Yi
2008-06-13 17:37     ` Michał Kudła
2008-06-16  1:51       ` Zhu Yi
2008-06-16 18:21         ` Michał Kudła
2008-06-17  1:11           ` Zhu Yi
2008-06-23  3:30             ` Michał Kudła
2008-06-23  5:05               ` Zhu Yi
2008-06-23  5:32                 ` Michał Kudła
2008-06-23  5:52                   ` Zhu Yi
2008-06-23 19:03                     ` Michał Kudła
2008-06-24  2:41                       ` Zhu Yi [this message]
2008-06-24  3:37                         ` Michał Kudła
2008-06-24  3:51                           ` Zhu Yi
2008-06-24  6:12                             ` Michał Kudła
2008-06-27 18:01                             ` Michał Kudła
2008-07-06 20:44                             ` Michał Kudła
2008-07-07  1:45                               ` Zhu Yi
2008-06-06 10:47 ` Rafael J. Wysocki

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=1214275275.14590.194.camel@debian.sh.intel.com \
    --to=yi.zhu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kudla@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;
as well as URLs for NNTP newsgroup(s).