iwlagn: move iwl_suspend / iwl_resume to the transport layer
[pandora-kernel.git] / drivers / net / wireless / iwlwifi / iwl-core.c
index cf376f6..d77af69 100644 (file)
 #include "iwl-io.h"
 #include "iwl-power.h"
 #include "iwl-sta.h"
+#include "iwl-agn.h"
 #include "iwl-helpers.h"
+#include "iwl-shared.h"
 #include "iwl-agn.h"
 #include "iwl-trans.h"
 
-u32 iwl_debug_level;
-
 const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
 
 #define MAX_BIT_RATE_40_MHZ 150 /* Mbps */
 #define MAX_BIT_RATE_20_MHZ 72 /* Mbps */
-static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
+static void iwl_init_ht_hw_capab(const struct iwl_priv *priv,
                              struct ieee80211_sta_ht_cap *ht_info,
                              enum ieee80211_band band)
 {
        u16 max_bit_rate = 0;
-       u8 rx_chains_num = priv->hw_params.rx_chains_num;
-       u8 tx_chains_num = priv->hw_params.tx_chains_num;
+       u8 rx_chains_num = hw_params(priv).rx_chains_num;
+       u8 tx_chains_num = hw_params(priv).tx_chains_num;
 
        ht_info->cap = 0;
        memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
@@ -68,7 +68,7 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
                ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
        ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
        max_bit_rate = MAX_BIT_RATE_20_MHZ;
-       if (priv->hw_params.ht40_channel & BIT(band)) {
+       if (hw_params(priv).ht40_channel & BIT(band)) {
                ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
                ht_info->cap |= IEEE80211_HT_CAP_SGI_40;
                ht_info->mcs.rx_mask[4] = 0x01;
@@ -106,9 +106,9 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
 }
 
 /**
- * iwlcore_init_geos - Initialize mac80211's geo/channel info based from eeprom
+ * iwl_init_geos - Initialize mac80211's geo/channel info based from eeprom
  */
-int iwlcore_init_geos(struct iwl_priv *priv)
+int iwl_init_geos(struct iwl_priv *priv)
 {
        struct iwl_channel_info *ch;
        struct ieee80211_supported_band *sband;
@@ -121,7 +121,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
        if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates ||
            priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) {
                IWL_DEBUG_INFO(priv, "Geography modes already initialized.\n");
-               set_bit(STATUS_GEO_CONFIGURED, &priv->status);
+               set_bit(STATUS_GEO_CONFIGURED, &priv->shrd->status);
                return 0;
        }
 
@@ -145,7 +145,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
        sband->n_bitrates = IWL_RATE_COUNT_LEGACY - IWL_FIRST_OFDM_RATE;
 
        if (priv->cfg->sku & EEPROM_SKU_CAP_11N_ENABLE)
-               iwlcore_init_ht_hw_capab(priv, &sband->ht_cap,
+               iwl_init_ht_hw_capab(priv, &sband->ht_cap,
                                         IEEE80211_BAND_5GHZ);
 
        sband = &priv->bands[IEEE80211_BAND_2GHZ];
@@ -155,7 +155,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
        sband->n_bitrates = IWL_RATE_COUNT_LEGACY;
 
        if (priv->cfg->sku & EEPROM_SKU_CAP_11N_ENABLE)
-               iwlcore_init_ht_hw_capab(priv, &sband->ht_cap,
+               iwl_init_ht_hw_capab(priv, &sband->ht_cap,
                                         IEEE80211_BAND_2GHZ);
 
        priv->ieee_channels = channels;
@@ -221,19 +221,19 @@ int iwlcore_init_geos(struct iwl_priv *priv)
                   priv->bands[IEEE80211_BAND_2GHZ].n_channels,
                   priv->bands[IEEE80211_BAND_5GHZ].n_channels);
 
-       set_bit(STATUS_GEO_CONFIGURED, &priv->status);
+       set_bit(STATUS_GEO_CONFIGURED, &priv->shrd->status);
 
        return 0;
 }
 
 /*
- * iwlcore_free_geos - undo allocations in iwlcore_init_geos
+ * iwl_free_geos - undo allocations in iwl_init_geos
  */
-void iwlcore_free_geos(struct iwl_priv *priv)
+void iwl_free_geos(struct iwl_priv *priv)
 {
        kfree(priv->ieee_channels);
        kfree(priv->ieee_rates);
-       clear_bit(STATUS_GEO_CONFIGURED, &priv->status);
+       clear_bit(STATUS_GEO_CONFIGURED, &priv->shrd->status);
 }
 
 static bool iwl_is_channel_extension(struct iwl_priv *priv,
@@ -325,7 +325,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
 
        conf = ieee80211_get_hw_conf(priv->hw);
 
-       lockdep_assert_held(&priv->mutex);
+       lockdep_assert_held(&priv->shrd->mutex);
 
        memset(&ctx->timing, 0, sizeof(struct iwl_rxon_time_cmd));
 
@@ -359,7 +359,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
                beacon_int = le16_to_cpu(ctx->timing.beacon_interval);
        } else {
                beacon_int = iwl_adjust_beacon_interval(beacon_int,
-                               priv->hw_params.max_beacon_itrvl * TIME_UNIT);
+                       hw_params(priv).max_beacon_itrvl * TIME_UNIT);
                ctx->timing.beacon_interval = cpu_to_le16(beacon_int);
        }
 
@@ -378,7 +378,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
                        le32_to_cpu(ctx->timing.beacon_init_val),
                        le16_to_cpu(ctx->timing.atim_window));
 
-       return trans_send_cmd_pdu(&priv->trans, ctx->rxon_timing_cmd,
+       return iwl_trans_send_cmd_pdu(trans(priv), ctx->rxon_timing_cmd,
                                CMD_SYNC, sizeof(ctx->timing), &ctx->timing);
 }
 
@@ -808,10 +808,11 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)
         */
        struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
 
-       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+       if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
                return;
 
-       if (test_and_clear_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status))
+       if (test_and_clear_bit(STATUS_CHANNEL_SWITCH_PENDING,
+                               &priv->shrd->status))
                ieee80211_chswitch_done(ctx->vif, is_success);
 }
 
@@ -856,16 +857,16 @@ void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
        unsigned long reload_jiffies;
 
        /* Set the FW error flag -- cleared on iwl_down */
-       set_bit(STATUS_FW_ERROR, &priv->status);
+       set_bit(STATUS_FW_ERROR, &priv->shrd->status);
 
        /* Cancel currently queued command. */
-       clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
+       clear_bit(STATUS_HCMD_ACTIVE, &priv->shrd->status);
 
        iwlagn_abort_notification_waits(priv);
 
        /* Keep the restart process from trying to send host
         * commands by clearing the ready bit */
-       clear_bit(STATUS_READY, &priv->status);
+       clear_bit(STATUS_READY, &priv->shrd->status);
 
        wake_up_interruptible(&priv->wait_command_queue);
 
@@ -890,13 +891,13 @@ void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
                        priv->reload_count = 0;
        }
 
-       if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) {
+       if (!test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) {
                if (iwlagn_mod_params.restart_fw) {
-                       IWL_DEBUG(priv, IWL_DL_FW_ERRORS,
+                       IWL_DEBUG_FW_ERRORS(priv,
                                  "Restarting adapter due to uCode error.\n");
-                       queue_work(priv->workqueue, &priv->restart);
+                       queue_work(priv->shrd->workqueue, &priv->restart);
                } else
-                       IWL_DEBUG(priv, IWL_DL_FW_ERRORS,
+                       IWL_DEBUG_FW_ERRORS(priv,
                                  "Detected FW error, but not restarting\n");
        }
 }
@@ -916,8 +917,8 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
                 * Keep the restart process from trying to send host
                 * commands by clearing the ready bit.
                 */
-               clear_bit(STATUS_READY, &priv->status);
-               clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
+               clear_bit(STATUS_READY, &priv->shrd->status);
+               clear_bit(STATUS_HCMD_ACTIVE, &priv->shrd->status);
                wake_up_interruptible(&priv->wait_command_queue);
                IWL_ERR(priv, "RF is used by WiMAX\n");
                return;
@@ -931,7 +932,7 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
        iwl_dump_fh(priv, NULL, false);
        iwl_dump_nic_event_log(priv, false, NULL, false);
 #ifdef CONFIG_IWLWIFI_DEBUG
-       if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS)
+       if (iwl_get_debug_level(priv->shrd) & IWL_DL_FW_ERRORS)
                iwl_print_rx_config_cmd(priv,
                                        &priv->contexts[IWL_RXON_CTX_BSS]);
 #endif
@@ -960,7 +961,7 @@ void iwl_apm_stop(struct iwl_priv *priv)
 {
        IWL_DEBUG_INFO(priv, "Stop card, put in low power state\n");
 
-       clear_bit(STATUS_DEVICE_ENABLED, &priv->status);
+       clear_bit(STATUS_DEVICE_ENABLED, &priv->shrd->status);
 
        /* Stop device's DMA activity */
        iwl_apm_stop_master(priv);
@@ -1054,7 +1055,7 @@ int iwl_apm_init(struct iwl_priv *priv)
        iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG,
                          APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
 
-       set_bit(STATUS_DEVICE_ENABLED, &priv->status);
+       set_bit(STATUS_DEVICE_ENABLED, &priv->shrd->status);
 
 out:
        return ret;
@@ -1068,7 +1069,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
        bool defer;
        struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
 
-       lockdep_assert_held(&priv->mutex);
+       lockdep_assert_held(&priv->shrd->mutex);
 
        if (priv->tx_power_user_lmt == tx_power && !force)
                return 0;
@@ -1096,7 +1097,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
        priv->tx_power_next = tx_power;
 
        /* do not set tx power when scanning or channel changing */
-       defer = test_bit(STATUS_SCANNING, &priv->status) ||
+       defer = test_bit(STATUS_SCANNING, &priv->shrd->status) ||
                memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging));
        if (defer && !force) {
                IWL_DEBUG_INFO(priv, "Deferring tx power set\n");
@@ -1134,7 +1135,7 @@ void iwl_send_bt_config(struct iwl_priv *priv)
        IWL_DEBUG_INFO(priv, "BT coex %s\n",
                (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active");
 
-       if (trans_send_cmd_pdu(&priv->trans, REPLY_BT_CONFIG,
+       if (iwl_trans_send_cmd_pdu(trans(priv), REPLY_BT_CONFIG,
                             CMD_SYNC, sizeof(struct iwl_bt_cmd), &bt_cmd))
                IWL_ERR(priv, "failed to send BT Coex Config\n");
 }
@@ -1147,12 +1148,12 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear)
        };
 
        if (flags & CMD_ASYNC)
-               return trans_send_cmd_pdu(&priv->trans, REPLY_STATISTICS_CMD,
+               return iwl_trans_send_cmd_pdu(trans(priv), REPLY_STATISTICS_CMD,
                                              CMD_ASYNC,
                                               sizeof(struct iwl_statistics_cmd),
                                               &statistics_cmd);
        else
-               return trans_send_cmd_pdu(&priv->trans, REPLY_STATISTICS_CMD,
+               return iwl_trans_send_cmd_pdu(trans(priv), REPLY_STATISTICS_CMD,
                                        CMD_SYNC,
                                        sizeof(struct iwl_statistics_cmd),
                                        &statistics_cmd);
@@ -1185,7 +1186,7 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
 
        q = AC_NUM - 1 - queue;
 
-       spin_lock_irqsave(&priv->lock, flags);
+       spin_lock_irqsave(&priv->shrd->lock, flags);
 
        /*
         * MULTI-FIXME
@@ -1203,7 +1204,7 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
                ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0;
        }
 
-       spin_unlock_irqrestore(&priv->lock, flags);
+       spin_unlock_irqrestore(&priv->shrd->lock, flags);
 
        IWL_DEBUG_MAC80211(priv, "leave\n");
        return 0;
@@ -1231,7 +1232,7 @@ static int iwl_setup_interface(struct iwl_priv *priv,
        struct ieee80211_vif *vif = ctx->vif;
        int err;
 
-       lockdep_assert_held(&priv->mutex);
+       lockdep_assert_held(&priv->shrd->mutex);
 
        /*
         * This variable will be correct only when there's just
@@ -1273,7 +1274,11 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
        IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n",
                           viftype, vif->addr);
 
-       mutex_lock(&priv->mutex);
+       cancel_delayed_work_sync(&priv->hw_roc_disable_work);
+
+       mutex_lock(&priv->shrd->mutex);
+
+       iwlagn_disable_roc(priv);
 
        if (!iwl_is_ready_rf(priv)) {
                IWL_WARN(priv, "Try to add interface when device not ready\n");
@@ -1318,7 +1323,7 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
        ctx->vif = NULL;
        priv->iw_mode = NL80211_IFTYPE_STATION;
  out:
-       mutex_unlock(&priv->mutex);
+       mutex_unlock(&priv->shrd->mutex);
 
        IWL_DEBUG_MAC80211(priv, "leave\n");
        return err;
@@ -1330,7 +1335,7 @@ static void iwl_teardown_interface(struct iwl_priv *priv,
 {
        struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif);
 
-       lockdep_assert_held(&priv->mutex);
+       lockdep_assert_held(&priv->shrd->mutex);
 
        if (priv->scan_vif == vif) {
                iwl_scan_cancel_timeout(priv, 200);
@@ -1362,14 +1367,14 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
 
        IWL_DEBUG_MAC80211(priv, "enter\n");
 
-       mutex_lock(&priv->mutex);
+       mutex_lock(&priv->shrd->mutex);
 
        WARN_ON(ctx->vif != vif);
        ctx->vif = NULL;
 
        iwl_teardown_interface(priv, vif, false);
 
-       mutex_unlock(&priv->mutex);
+       mutex_unlock(&priv->shrd->mutex);
 
        IWL_DEBUG_MAC80211(priv, "leave\n");
 
@@ -1393,7 +1398,7 @@ int iwl_alloc_traffic_mem(struct iwl_priv *priv)
 {
        u32 traffic_size = IWL_TRAFFIC_DUMP_SIZE;
 
-       if (iwl_debug_level & IWL_DL_TX) {
+       if (iwl_get_debug_level(priv->shrd) & IWL_DL_TX) {
                if (!priv->tx_traffic) {
                        priv->tx_traffic =
                                kzalloc(traffic_size, GFP_KERNEL);
@@ -1401,7 +1406,7 @@ int iwl_alloc_traffic_mem(struct iwl_priv *priv)
                                return -ENOMEM;
                }
        }
-       if (iwl_debug_level & IWL_DL_RX) {
+       if (iwl_get_debug_level(priv->shrd) & IWL_DL_RX) {
                if (!priv->rx_traffic) {
                        priv->rx_traffic =
                                kzalloc(traffic_size, GFP_KERNEL);
@@ -1428,7 +1433,7 @@ void iwl_dbg_log_tx_data_frame(struct iwl_priv *priv,
        __le16 fc;
        u16 len;
 
-       if (likely(!(iwl_debug_level & IWL_DL_TX)))
+       if (likely(!(iwl_get_debug_level(priv->shrd) & IWL_DL_TX)))
                return;
 
        if (!priv->tx_traffic)
@@ -1452,7 +1457,7 @@ void iwl_dbg_log_rx_data_frame(struct iwl_priv *priv,
        __le16 fc;
        u16 len;
 
-       if (likely(!(iwl_debug_level & IWL_DL_RX)))
+       if (likely(!(iwl_get_debug_level(priv->shrd) & IWL_DL_RX)))
                return;
 
        if (!priv->rx_traffic)
@@ -1609,7 +1614,7 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len)
 
 static void iwl_force_rf_reset(struct iwl_priv *priv)
 {
-       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+       if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
                return;
 
        if (!iwl_is_any_associated(priv)) {
@@ -1634,7 +1639,7 @@ int iwl_force_reset(struct iwl_priv *priv, int mode, bool external)
 {
        struct iwl_force_reset *force_reset;
 
-       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+       if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
                return -EINVAL;
 
        if (mode >= IWL_MAX_FORCE_RESET) {
@@ -1693,7 +1698,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 
        newtype = ieee80211_iftype_p2p(newtype, newp2p);
 
-       mutex_lock(&priv->mutex);
+       mutex_lock(&priv->shrd->mutex);
 
        if (!ctx->vif || !iwl_is_ready_rf(priv)) {
                /*
@@ -1757,7 +1762,7 @@ int iwl_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        err = 0;
 
  out:
-       mutex_unlock(&priv->mutex);
+       mutex_unlock(&priv->shrd->mutex);
        return err;
 }
 
@@ -1806,7 +1811,7 @@ void iwl_bg_watchdog(unsigned long data)
        int cnt;
        unsigned long timeout;
 
-       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+       if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
                return;
 
        timeout = priv->cfg->base_params->wd_timeout;
@@ -1814,14 +1819,14 @@ void iwl_bg_watchdog(unsigned long data)
                return;
 
        /* monitor and check for stuck cmd queue */
-       if (iwl_check_stuck_queue(priv, priv->cmd_queue))
+       if (iwl_check_stuck_queue(priv, priv->shrd->cmd_queue))
                return;
 
        /* monitor and check for other stuck queues */
        if (iwl_is_any_associated(priv)) {
-               for (cnt = 0; cnt < priv->hw_params.max_txq_num; cnt++) {
+               for (cnt = 0; cnt < hw_params(priv).max_txq_num; cnt++) {
                        /* skip as we already checked the command queue */
-                       if (cnt == priv->cmd_queue)
+                       if (cnt == priv->shrd->cmd_queue)
                                continue;
                        if (iwl_check_stuck_queue(priv, cnt))
                                return;
@@ -1860,12 +1865,12 @@ u32 iwl_usecs_to_beacons(struct iwl_priv *priv, u32 usec, u32 beacon_interval)
 
        quot = (usec / interval) &
                (iwl_beacon_time_mask_high(priv,
-               priv->hw_params.beacon_time_tsf_bits) >>
-               priv->hw_params.beacon_time_tsf_bits);
+               hw_params(priv).beacon_time_tsf_bits) >>
+               hw_params(priv).beacon_time_tsf_bits);
        rem = (usec % interval) & iwl_beacon_time_mask_low(priv,
-                                  priv->hw_params.beacon_time_tsf_bits);
+                                  hw_params(priv).beacon_time_tsf_bits);
 
-       return (quot << priv->hw_params.beacon_time_tsf_bits) + rem;
+       return (quot << hw_params(priv).beacon_time_tsf_bits) + rem;
 }
 
 /* base is usually what we get from ucode with each received frame,
@@ -1875,64 +1880,23 @@ __le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base,
                           u32 addon, u32 beacon_interval)
 {
        u32 base_low = base & iwl_beacon_time_mask_low(priv,
-                                       priv->hw_params.beacon_time_tsf_bits);
+                               hw_params(priv).beacon_time_tsf_bits);
        u32 addon_low = addon & iwl_beacon_time_mask_low(priv,
-                                       priv->hw_params.beacon_time_tsf_bits);
+                               hw_params(priv).beacon_time_tsf_bits);
        u32 interval = beacon_interval * TIME_UNIT;
        u32 res = (base & iwl_beacon_time_mask_high(priv,
-                               priv->hw_params.beacon_time_tsf_bits)) +
+                               hw_params(priv).beacon_time_tsf_bits)) +
                                (addon & iwl_beacon_time_mask_high(priv,
-                               priv->hw_params.beacon_time_tsf_bits));
+                               hw_params(priv).beacon_time_tsf_bits));
 
        if (base_low > addon_low)
                res += base_low - addon_low;
        else if (base_low < addon_low) {
                res += interval + base_low - addon_low;
-               res += (1 << priv->hw_params.beacon_time_tsf_bits);
+               res += (1 << hw_params(priv).beacon_time_tsf_bits);
        } else
-               res += (1 << priv->hw_params.beacon_time_tsf_bits);
+               res += (1 << hw_params(priv).beacon_time_tsf_bits);
 
        return cpu_to_le32(res);
 }
 
-#ifdef CONFIG_PM
-
-int iwl_suspend(struct iwl_priv *priv)
-{
-       /*
-        * This function is called when system goes into suspend state
-        * mac80211 will call iwl_mac_stop() from the mac80211 suspend function
-        * first but since iwl_mac_stop() has no knowledge of who the caller is,
-        * it will not call apm_ops.stop() to stop the DMA operation.
-        * Calling apm_ops.stop here to make sure we stop the DMA.
-        *
-        * But of course ... if we have configured WoWLAN then we did other
-        * things already :-)
-        */
-       if (!priv->wowlan)
-               iwl_apm_stop(priv);
-
-       return 0;
-}
-
-int iwl_resume(struct iwl_priv *priv)
-{
-       bool hw_rfkill = false;
-
-       iwl_enable_interrupts(priv);
-
-       if (!(iwl_read32(priv, CSR_GP_CNTRL) &
-                               CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW))
-               hw_rfkill = true;
-
-       if (hw_rfkill)
-               set_bit(STATUS_RF_KILL_HW, &priv->status);
-       else
-               clear_bit(STATUS_RF_KILL_HW, &priv->status);
-
-       wiphy_rfkill_set_hw_state(priv->hw->wiphy, hw_rfkill);
-
-       return 0;
-}
-
-#endif /* CONFIG_PM */