linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: change check triggering device restart after rfkill change
@ 2009-03-27 19:45 Reinette Chatre
  2009-03-27 23:51 ` Helmut Schaa
  0 siblings, 1 reply; 2+ messages in thread
From: Reinette Chatre @ 2009-03-27 19:45 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Reinette Chatre, Helmut Schaa

The STATUS_ALIVE value cannot be used because it is cleared when
interface is brought down and will not be set if rfkill is enabled when
interface is started again. The interface can thus not be brought up if
rfkill was enabled before stopping the interface and disabled after
starting the interface.

Change the test to use priv->is_open instead, this will be set when
interface is started whether rfkill is enabled or not.

Thanks to Helmut Schaa for the suggested fix.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Helmut Schaa <helmut.schaa@googlemail.com>
---
 drivers/net/wireless/iwlwifi/iwl-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 18ef713..970c4fd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2058,7 +2058,7 @@ void iwl_bg_rf_kill(struct work_struct *work)
 			  "HW and/or SW RF Kill no longer active, restarting "
 			  "device\n");
 		if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
-		    test_bit(STATUS_ALIVE, &priv->status))
+		    priv->is_open)
 			queue_work(priv->workqueue, &priv->restart);
 	} else {
 		/* make sure mac80211 stop sending Tx frame */
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-27 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 19:45 [PATCH] iwlwifi: change check triggering device restart after rfkill change Reinette Chatre
2009-03-27 23:51 ` Helmut Schaa

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).