iwlwifi: clean up iwl-core.h inclusions
[pandora-kernel.git] / drivers / net / wireless / iwlwifi / iwl-trans-pcie-rx.c
index c3c2de3..f145621 100644 (file)
@@ -30,8 +30,7 @@
 #include <linux/wait.h>
 #include <linux/gfp.h>
 
-/*TODO: Remove include to iwl-core.h*/
-#include "iwl-core.h"
+#include "iwl-prph.h"
 #include "iwl-io.h"
 #include "iwl-trans-pcie-int.h"
 #include "iwl-op-mode.h"
@@ -141,7 +140,7 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
        if (q->need_update == 0)
                goto exit_unlock;
 
-       if (hw_params(trans).shadow_reg_enable) {
+       if (cfg(trans)->base_params->shadow_reg_enable) {
                /* shadow register enabled */
                /* Device expects a multiple of 8 */
                q->write_actual = (q->write & ~0x7);
@@ -388,7 +387,7 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans,
 
        len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
        len += sizeof(u32); /* account for status word */
-       trace_iwlwifi_dev_rx(priv(trans), pkt, len);
+       trace_iwlwifi_dev_rx(trans->dev, pkt, len);
 
        /* Reclaim a command buffer only if this packet is a response
         *   to a (driver-originated) command.
@@ -632,7 +631,7 @@ static void iwl_dump_nic_error_log(struct iwl_trans *trans)
 
        trans_pcie->isr_stats.err_code = table.error_id;
 
-       trace_iwlwifi_dev_ucode_error(priv(trans), table.error_id, table.tsf_low,
+       trace_iwlwifi_dev_ucode_error(trans->dev, table.error_id, table.tsf_low,
                                      table.data1, table.data2, table.line,
                                      table.blink1, table.blink2, table.ilink1,
                                      table.ilink2, table.bcon_time, table.gp1,
@@ -764,7 +763,7 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx,
                                                "EVT_LOG:0x%08x:%04u\n",
                                                time, ev);
                        } else {
-                               trace_iwlwifi_dev_ucode_event(priv(trans), 0,
+                               trace_iwlwifi_dev_ucode_event(trans->dev, 0,
                                        time, ev);
                                IWL_ERR(trans, "EVT_LOG:0x%08x:%04u\n",
                                        time, ev);
@@ -778,7 +777,7 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx,
                        } else {
                                IWL_ERR(trans, "EVT_LOGT:%010u:0x%08x:%04u\n",
                                        time, data, ev);
-                               trace_iwlwifi_dev_ucode_event(priv(trans), time,
+                               trace_iwlwifi_dev_ucode_event(trans->dev, time,
                                        data, ev);
                        }
                }
@@ -1016,30 +1015,16 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
 
        /* HW RF KILL switch toggled */
        if (inta & CSR_INT_BIT_RF_KILL) {
-               int hw_rf_kill = 0;
-               if (!(iwl_read32(trans, CSR_GP_CNTRL) &
-                               CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW))
-                       hw_rf_kill = 1;
+               bool hw_rfkill;
 
+               hw_rfkill = !(iwl_read32(trans, CSR_GP_CNTRL) &
+                               CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW);
                IWL_WARN(trans, "RF_KILL bit toggled to %s.\n",
-                               hw_rf_kill ? "disable radio" : "enable radio");
+                               hw_rfkill ? "disable radio" : "enable radio");
 
                isr_stats->rfkill++;
 
-               /* driver only loads ucode once setting the interface up.
-                * the driver allows loading the ucode even if the radio
-                * is killed. Hence update the killswitch state here. The
-                * rfkill handler will care about restarting if needed.
-                */
-               if (!test_bit(STATUS_ALIVE, &trans->shrd->status)) {
-                       if (hw_rf_kill)
-                               set_bit(STATUS_RF_KILL_HW,
-                                       &trans->shrd->status);
-                       else
-                               clear_bit(STATUS_RF_KILL_HW,
-                                         &trans->shrd->status);
-                       iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rf_kill);
-               }
+               iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill);
 
                handled |= CSR_INT_BIT_RF_KILL;
        }
@@ -1276,7 +1261,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
        if (!trans)
                return IRQ_NONE;
 
-       trace_iwlwifi_dev_irq(priv(trans));
+       trace_iwlwifi_dev_irq(trans->dev);
 
        trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
 
@@ -1366,7 +1351,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
        if (!trans_pcie->use_ict)
                return iwl_isr(irq, data);
 
-       trace_iwlwifi_dev_irq(priv(trans));
+       trace_iwlwifi_dev_irq(trans->dev);
 
        spin_lock_irqsave(&trans_pcie->irq_lock, flags);
 
@@ -1383,7 +1368,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
         * This may be due to IRQ shared with another device,
         * or due to sporadic interrupts thrown from our NIC. */
        read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]);
-       trace_iwlwifi_dev_ict_read(priv(trans), trans_pcie->ict_index, read);
+       trace_iwlwifi_dev_ict_read(trans->dev, trans_pcie->ict_index, read);
        if (!read) {
                IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n");
                goto none;
@@ -1402,7 +1387,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data)
                        iwl_queue_inc_wrap(trans_pcie->ict_index, ICT_COUNT);
 
                read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]);
-               trace_iwlwifi_dev_ict_read(priv(trans), trans_pcie->ict_index,
+               trace_iwlwifi_dev_ict_read(trans->dev, trans_pcie->ict_index,
                                           read);
        } while (read);