Backport of the following commmit... commit edb342286e18c5bec6d3ac325851a9cba28061b9 Author: Mohamed Abbas Date: Thu Dec 11 10:33:37 2008 -0800 iwlwifi: fix resume while txpower off This patch take care of coming out rfkill when the driver is up while rfkill is on by restarting interface. Signed-off-by: Mohamed Abbas Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c.orig 2009-03-10 15:34:54.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-03-10 15:40:50.000000000 -0400 @@ -1658,8 +1658,11 @@ static void iwl4965_irq_tasklet(struct i * 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; } --- linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-core.c.orig 2009-03-10 15:34:45.000000000 -0400 +++ linux-2.6.18.noarch/drivers/net/wireless/iwlwifi/iwl-core.c 2009-03-10 15:40:50.000000000 -0400 @@ -1441,6 +1441,16 @@ int iwl_radio_kill_sw_enable_radio(struc 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.