iwlwifi: fix software rf_kill problem when interface is down
authorZhu Yi <yi.zhu@intel.com>
Thu, 12 Jun 2008 01:47:17 +0000 (09:47 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 14 Jun 2008 16:18:09 +0000 (12:18 -0400)
The patch fixes the problem that software rf_kill messes up the
card status when it is disabled if the interface is down.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 72279e07fe325d9b8d68e1b5c6482d646867366a..d0084bcb1eca40b99b13856fe9ad2817338686cd 100644 (file)
@@ -2875,7 +2875,8 @@ static void iwl3945_radio_kill_sw(struct iwl3945_priv *priv, int disable_radio)
                return;
        }
 
-       queue_work(priv->workqueue, &priv->restart);
+       if (priv->is_open)
+               queue_work(priv->workqueue, &priv->restart);
        return;
 }
 
index 8f1ab23e9d612d7b9d10d9a4c018b74fa329aaaa..5aec7d5fb9cc67638120aaeca6581ee09e8a069e 100644 (file)
@@ -970,7 +970,8 @@ int iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
                return 0;
        }
 
-       queue_work(priv->workqueue, &priv->restart);
+       if (priv->is_open)
+               queue_work(priv->workqueue, &priv->restart);
        return 1;
 }