rk: revert 20f3d0b+v3.0.66 to v3.0
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / iwlegacy / iwl3945-base.c
index 101a2c2fe177b49b5f140d885214885e23ab66a2..0ee6be6a9c5db74c4b8b603e8b5e705641393d8f 100644 (file)
@@ -841,7 +841,7 @@ static void iwl3945_rx_card_state_notif(struct iwl_priv *priv,
                wiphy_rfkill_set_hw_state(priv->hw->wiphy,
                                test_bit(STATUS_RF_KILL_HW, &priv->status));
        else
-               wake_up(&priv->wait_command_queue);
+               wake_up_interruptible(&priv->wait_command_queue);
 }
 
 /**
@@ -2518,7 +2518,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
        iwl3945_reg_txpower_periodic(priv);
 
        IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
-       wake_up(&priv->wait_command_queue);
+       wake_up_interruptible(&priv->wait_command_queue);
 
        return;
 
@@ -2549,7 +2549,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
        iwl_legacy_clear_driver_stations(priv);
 
        /* Unblock any waiting calls */
-       wake_up_all(&priv->wait_command_queue);
+       wake_up_interruptible_all(&priv->wait_command_queue);
 
        /* Wipe out the EXIT_PENDING status bit if we are not actually
         * exiting the module */
@@ -2763,7 +2763,7 @@ static void iwl3945_bg_alive_start(struct work_struct *data)
            container_of(data, struct iwl_priv, alive_start.work);
 
        mutex_lock(&priv->mutex);
-       if (test_bit(STATUS_EXIT_PENDING, &priv->status) || priv->txq == NULL)
+       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
                goto out;
 
        iwl3945_alive_start(priv);
@@ -2910,13 +2910,14 @@ int iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
                IWL_WARN(priv, "Invalid scan band\n");
                return -EIO;
        }
+
        /*
-        * If active scaning is requested but a certain channel is marked
-        * passive, we can do active scanning if we detect transmissions. For
-        * passive only scanning disable switching to active on any channel.
+        * If active scaning is requested but a certain channel
+        * is marked passive, we can do active scanning if we
+        * detect transmissions.
         */
        scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH_DEFAULT :
-                                       IWL_GOOD_CRC_TH_NEVER;
+                                       IWL_GOOD_CRC_TH_DISABLED;
 
        if (!priv->is_internal_short_scan) {
                scan->tx_cmd.len = cpu_to_le16(
@@ -3124,7 +3125,7 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
 
        /* Wait for START_ALIVE from ucode. Otherwise callbacks from
         * mac80211 will not be run successfully. */
-       ret = wait_event_timeout(priv->wait_command_queue,
+       ret = wait_event_interruptible_timeout(priv->wait_command_queue,
                        test_bit(STATUS_READY, &priv->status),
                        UCODE_READY_TIMEOUT);
        if (!ret) {