diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index ab7b9ed00b8f..7ff3f1430678 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c | |||
@@ -862,7 +862,8 @@ void iwl_down(struct iwl_priv *priv) | |||
862 | * No race since we hold the mutex here and a new one | 862 | * No race since we hold the mutex here and a new one |
863 | * can't come in at this time. | 863 | * can't come in at this time. |
864 | */ | 864 | */ |
865 | ieee80211_remain_on_channel_expired(priv->hw); | 865 | if (priv->ucode_loaded && priv->cur_ucode != IWL_UCODE_INIT) |
866 | ieee80211_remain_on_channel_expired(priv->hw); | ||
866 | 867 | ||
867 | exit_pending = | 868 | exit_pending = |
868 | test_and_set_bit(STATUS_EXIT_PENDING, &priv->status); | 869 | test_and_set_bit(STATUS_EXIT_PENDING, &priv->status); |
@@ -994,7 +995,11 @@ static void iwl_bg_restart(struct work_struct *data) | |||
994 | iwlagn_prepare_restart(priv); | 995 | iwlagn_prepare_restart(priv); |
995 | mutex_unlock(&priv->mutex); | 996 | mutex_unlock(&priv->mutex); |
996 | iwl_cancel_deferred_work(priv); | 997 | iwl_cancel_deferred_work(priv); |
997 | ieee80211_restart_hw(priv->hw); | 998 | if (priv->mac80211_registered) |
999 | ieee80211_restart_hw(priv->hw); | ||
1000 | else | ||
1001 | IWL_ERR(priv, | ||
1002 | "Cannot request restart before registrating with mac80211"); | ||
998 | } else { | 1003 | } else { |
999 | WARN_ON(1); | 1004 | WARN_ON(1); |
1000 | } | 1005 | } |