From d5475938321ce38e3a8f1d7bb2e66426d937d30f Mon Sep 17 00:00:00 2001 From: Mohamed Abbas Date: Thu, 11 Dec 2008 10:33:37 -0800 Subject: [PATCH] --- yaml --- r: 122687 b: refs/heads/master c: edb342286e18c5bec6d3ac325851a9cba28061b9 h: refs/heads/master i: 122685: 1c4f34be2ee3053db0d977a9bf272b4f54434483 122683: 7cf46649d78baa7e723cf1a7aef792cf494f3f4b 122679: a936a6c0b151d313f5d13390c2d021530ff3844c 122671: 8832a9d097171ba41ff68052cde5ba84713427d2 122655: f76f47c14f4b732599e470ad9892e65c12d972e1 122623: 79e62ae95698e34f4644399f9231b62c2f6bc052 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/iwlwifi/iwl-agn.c | 5 ++++- trunk/drivers/net/wireless/iwlwifi/iwl-core.c | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index a0a8a7d9ef01..0d78cc9d1965 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3d5717ade01ce22511f2992f150bf6644b21c377 +refs/heads/master: edb342286e18c5bec6d3ac325851a9cba28061b9 diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c index 06e268245077..cc4b6eba8a11 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -1402,8 +1402,11 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) * the driver as well won't allow loading if RFKILL is set * therefore no need to restart the driver from this handler */ - if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) + if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) { clear_bit(STATUS_RF_KILL_HW, &priv->status); + if (priv->is_open && !iwl_is_rfkill(priv)) + queue_work(priv->workqueue, &priv->up); + } handled |= CSR_INT_BIT_RF_KILL; } diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-core.c b/trunk/drivers/net/wireless/iwlwifi/iwl-core.c index 6fc395092dfe..ced79112ed01 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-core.c @@ -1446,6 +1446,16 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) return 0; } + /* when driver is up while rfkill is on, it wont receive + * any CARD_STATE_NOTIFICATION notifications so we have to + * restart it in here + */ + if (priv->is_open && !test_bit(STATUS_ALIVE, &priv->status)) { + clear_bit(STATUS_RF_KILL_SW, &priv->status); + if (!iwl_is_rfkill(priv)) + queue_work(priv->workqueue, &priv->up); + } + /* If the driver is already loaded, it will receive * CARD_STATE_NOTIFICATION notifications and the handler will * call restart to reload the driver.