diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-devices.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tt.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 70 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 34 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-testmode.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-ucode.c | 14 |
15 files changed, 123 insertions, 122 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-devices.c b/drivers/net/wireless/iwlwifi/iwl-agn-devices.c index 08718caf4aa9..ae4a21620c4f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-devices.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-devices.c | |||
@@ -60,13 +60,13 @@ static void iwl1000_set_ct_threshold(struct iwl_priv *priv) | |||
60 | static void iwl1000_nic_config(struct iwl_priv *priv) | 60 | static void iwl1000_nic_config(struct iwl_priv *priv) |
61 | { | 61 | { |
62 | /* set CSR_HW_CONFIG_REG for uCode use */ | 62 | /* set CSR_HW_CONFIG_REG for uCode use */ |
63 | iwl_set_bit(trans(priv), CSR_HW_IF_CONFIG_REG, | 63 | iwl_set_bit(priv->trans, CSR_HW_IF_CONFIG_REG, |
64 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | | 64 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | |
65 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); | 65 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); |
66 | 66 | ||
67 | /* Setting digital SVR for 1000 card to 1.32V */ | 67 | /* Setting digital SVR for 1000 card to 1.32V */ |
68 | /* locking is acquired in iwl_set_bits_mask_prph() function */ | 68 | /* locking is acquired in iwl_set_bits_mask_prph() function */ |
69 | iwl_set_bits_mask_prph(trans(priv), APMG_DIGITAL_SVR_REG, | 69 | iwl_set_bits_mask_prph(priv->trans, APMG_DIGITAL_SVR_REG, |
70 | APMG_SVR_DIGITAL_VOLTAGE_1_32, | 70 | APMG_SVR_DIGITAL_VOLTAGE_1_32, |
71 | ~APMG_SVR_VOLTAGE_CONFIG_BIT_MSK); | 71 | ~APMG_SVR_VOLTAGE_CONFIG_BIT_MSK); |
72 | } | 72 | } |
@@ -222,7 +222,7 @@ static void iwl2000_nic_config(struct iwl_priv *priv) | |||
222 | { | 222 | { |
223 | iwl_rf_config(priv); | 223 | iwl_rf_config(priv); |
224 | 224 | ||
225 | iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG, | 225 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, |
226 | CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER); | 226 | CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER); |
227 | } | 227 | } |
228 | 228 | ||
@@ -318,7 +318,7 @@ static void iwl5000_nic_config(struct iwl_priv *priv) | |||
318 | * (PCIe power is lost before PERST# is asserted), | 318 | * (PCIe power is lost before PERST# is asserted), |
319 | * causing ME FW to lose ownership and not being able to obtain it back. | 319 | * causing ME FW to lose ownership and not being able to obtain it back. |
320 | */ | 320 | */ |
321 | iwl_set_bits_mask_prph(trans(priv), APMG_PS_CTRL_REG, | 321 | iwl_set_bits_mask_prph(priv->trans, APMG_PS_CTRL_REG, |
322 | APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, | 322 | APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, |
323 | ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); | 323 | ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); |
324 | } | 324 | } |
@@ -580,21 +580,21 @@ static void iwl6000_nic_config(struct iwl_priv *priv) | |||
580 | break; | 580 | break; |
581 | case IWL_DEVICE_FAMILY_6000i: | 581 | case IWL_DEVICE_FAMILY_6000i: |
582 | /* 2x2 IPA phy type */ | 582 | /* 2x2 IPA phy type */ |
583 | iwl_write32(trans(priv), CSR_GP_DRIVER_REG, | 583 | iwl_write32(priv->trans, CSR_GP_DRIVER_REG, |
584 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); | 584 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); |
585 | break; | 585 | break; |
586 | case IWL_DEVICE_FAMILY_6050: | 586 | case IWL_DEVICE_FAMILY_6050: |
587 | /* Indicate calibration version to uCode. */ | 587 | /* Indicate calibration version to uCode. */ |
588 | if (iwl_eeprom_calib_version(priv) >= 6) | 588 | if (iwl_eeprom_calib_version(priv) >= 6) |
589 | iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG, | 589 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, |
590 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | 590 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); |
591 | break; | 591 | break; |
592 | case IWL_DEVICE_FAMILY_6150: | 592 | case IWL_DEVICE_FAMILY_6150: |
593 | /* Indicate calibration version to uCode. */ | 593 | /* Indicate calibration version to uCode. */ |
594 | if (iwl_eeprom_calib_version(priv) >= 6) | 594 | if (iwl_eeprom_calib_version(priv) >= 6) |
595 | iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG, | 595 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, |
596 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | 596 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); |
597 | iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG, | 597 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, |
598 | CSR_GP_DRIVER_REG_BIT_6050_1x2); | 598 | CSR_GP_DRIVER_REG_BIT_6050_1x2); |
599 | break; | 599 | break; |
600 | default: | 600 | default: |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 4e0c248a0050..ab36344ee7c0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -189,7 +189,7 @@ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | |||
189 | goto done; | 189 | goto done; |
190 | } | 190 | } |
191 | IWL_DEBUG_INFO(priv, "wait transmit/flush all frames\n"); | 191 | IWL_DEBUG_INFO(priv, "wait transmit/flush all frames\n"); |
192 | iwl_trans_wait_tx_queue_empty(trans(priv)); | 192 | iwl_trans_wait_tx_queue_empty(priv->trans); |
193 | done: | 193 | done: |
194 | ieee80211_wake_queues(priv->hw); | 194 | ieee80211_wake_queues(priv->hw); |
195 | mutex_unlock(&priv->mutex); | 195 | mutex_unlock(&priv->mutex); |
@@ -1132,7 +1132,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan) | |||
1132 | memcpy(&rxon, &ctx->active, sizeof(rxon)); | 1132 | memcpy(&rxon, &ctx->active, sizeof(rxon)); |
1133 | 1133 | ||
1134 | priv->ucode_loaded = false; | 1134 | priv->ucode_loaded = false; |
1135 | iwl_trans_stop_device(trans(priv)); | 1135 | iwl_trans_stop_device(priv->trans); |
1136 | 1136 | ||
1137 | priv->wowlan = true; | 1137 | priv->wowlan = true; |
1138 | 1138 | ||
@@ -1260,7 +1260,7 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
1260 | return -EIO; | 1260 | return -EIO; |
1261 | } | 1261 | } |
1262 | 1262 | ||
1263 | return iwl_trans_send_cmd(trans(priv), cmd); | 1263 | return iwl_trans_send_cmd(priv->trans, cmd); |
1264 | } | 1264 | } |
1265 | 1265 | ||
1266 | int iwl_dvm_send_cmd_pdu(struct iwl_priv *priv, u8 id, | 1266 | int iwl_dvm_send_cmd_pdu(struct iwl_priv *priv, u8 id, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index db6c90f6affe..e321a294abde 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -604,16 +604,16 @@ static int iwlagn_rx_card_state_notif(struct iwl_priv *priv, | |||
604 | if (flags & (SW_CARD_DISABLED | HW_CARD_DISABLED | | 604 | if (flags & (SW_CARD_DISABLED | HW_CARD_DISABLED | |
605 | CT_CARD_DISABLED)) { | 605 | CT_CARD_DISABLED)) { |
606 | 606 | ||
607 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_SET, | 607 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_SET, |
608 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); | 608 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); |
609 | 609 | ||
610 | iwl_write_direct32(trans(priv), HBUS_TARG_MBX_C, | 610 | iwl_write_direct32(priv->trans, HBUS_TARG_MBX_C, |
611 | HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); | 611 | HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); |
612 | 612 | ||
613 | if (!(flags & RXON_CARD_DISABLED)) { | 613 | if (!(flags & RXON_CARD_DISABLED)) { |
614 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR, | 614 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_CLR, |
615 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); | 615 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); |
616 | iwl_write_direct32(trans(priv), HBUS_TARG_MBX_C, | 616 | iwl_write_direct32(priv->trans, HBUS_TARG_MBX_C, |
617 | HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); | 617 | HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); |
618 | } | 618 | } |
619 | if (flags & CT_CARD_DISABLED) | 619 | if (flags & CT_CARD_DISABLED) |
@@ -636,7 +636,7 @@ static int iwlagn_rx_card_state_notif(struct iwl_priv *priv, | |||
636 | wiphy_rfkill_set_hw_state(priv->hw->wiphy, | 636 | wiphy_rfkill_set_hw_state(priv->hw->wiphy, |
637 | test_bit(STATUS_RF_KILL_HW, &priv->status)); | 637 | test_bit(STATUS_RF_KILL_HW, &priv->status)); |
638 | else | 638 | else |
639 | wake_up(&trans(priv)->wait_command_queue); | 639 | wake_up(&priv->trans->wait_command_queue); |
640 | return 0; | 640 | return 0; |
641 | } | 641 | } |
642 | 642 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c index baaf5ba2fc38..18276db5b72d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c | |||
@@ -179,19 +179,19 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data) | |||
179 | 179 | ||
180 | if (tt->state == IWL_TI_CT_KILL) { | 180 | if (tt->state == IWL_TI_CT_KILL) { |
181 | if (priv->thermal_throttle.ct_kill_toggle) { | 181 | if (priv->thermal_throttle.ct_kill_toggle) { |
182 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR, | 182 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_CLR, |
183 | CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); | 183 | CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); |
184 | priv->thermal_throttle.ct_kill_toggle = false; | 184 | priv->thermal_throttle.ct_kill_toggle = false; |
185 | } else { | 185 | } else { |
186 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_SET, | 186 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_SET, |
187 | CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); | 187 | CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); |
188 | priv->thermal_throttle.ct_kill_toggle = true; | 188 | priv->thermal_throttle.ct_kill_toggle = true; |
189 | } | 189 | } |
190 | iwl_read32(trans(priv), CSR_UCODE_DRV_GP1); | 190 | iwl_read32(priv->trans, CSR_UCODE_DRV_GP1); |
191 | spin_lock_irqsave(&trans(priv)->reg_lock, flags); | 191 | spin_lock_irqsave(&priv->trans->reg_lock, flags); |
192 | if (likely(iwl_grab_nic_access(trans(priv)))) | 192 | if (likely(iwl_grab_nic_access(priv->trans))) |
193 | iwl_release_nic_access(trans(priv)); | 193 | iwl_release_nic_access(priv->trans); |
194 | spin_unlock_irqrestore(&trans(priv)->reg_lock, flags); | 194 | spin_unlock_irqrestore(&priv->trans->reg_lock, flags); |
195 | 195 | ||
196 | /* Reschedule the ct_kill timer to occur in | 196 | /* Reschedule the ct_kill timer to occur in |
197 | * CT_KILL_EXIT_DURATION seconds to ensure we get a | 197 | * CT_KILL_EXIT_DURATION seconds to ensure we get a |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index ad21b5ddf59d..f6041ca63af8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -467,7 +467,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
467 | else | 467 | else |
468 | txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)]; | 468 | txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)]; |
469 | 469 | ||
470 | if (iwl_trans_tx(trans(priv), skb, dev_cmd, txq_id)) | 470 | if (iwl_trans_tx(priv->trans, skb, dev_cmd, txq_id)) |
471 | goto drop_unlock_sta; | 471 | goto drop_unlock_sta; |
472 | 472 | ||
473 | if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc) && | 473 | if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc) && |
@@ -581,7 +581,7 @@ turn_off: | |||
581 | spin_unlock_bh(&priv->sta_lock); | 581 | spin_unlock_bh(&priv->sta_lock); |
582 | 582 | ||
583 | if (test_bit(txq_id, priv->agg_q_alloc)) { | 583 | if (test_bit(txq_id, priv->agg_q_alloc)) { |
584 | iwl_trans_tx_agg_disable(trans(priv), txq_id); | 584 | iwl_trans_tx_agg_disable(priv->trans, txq_id); |
585 | iwlagn_dealloc_agg_txq(priv, txq_id); | 585 | iwlagn_dealloc_agg_txq(priv, txq_id); |
586 | } | 586 | } |
587 | 587 | ||
@@ -665,7 +665,7 @@ int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
665 | 665 | ||
666 | fifo = ctx->ac_to_fifo[tid_to_ac[tid]]; | 666 | fifo = ctx->ac_to_fifo[tid_to_ac[tid]]; |
667 | 667 | ||
668 | iwl_trans_tx_agg_setup(trans(priv), q, fifo, | 668 | iwl_trans_tx_agg_setup(priv->trans, q, fifo, |
669 | sta_priv->sta_id, tid, | 669 | sta_priv->sta_id, tid, |
670 | buf_size, ssn); | 670 | buf_size, ssn); |
671 | 671 | ||
@@ -732,7 +732,7 @@ static void iwlagn_check_ratid_empty(struct iwl_priv *priv, int sta_id, u8 tid) | |||
732 | IWL_DEBUG_TX_QUEUES(priv, | 732 | IWL_DEBUG_TX_QUEUES(priv, |
733 | "Can continue DELBA flow ssn = next_recl =" | 733 | "Can continue DELBA flow ssn = next_recl =" |
734 | " %d", tid_data->next_reclaimed); | 734 | " %d", tid_data->next_reclaimed); |
735 | iwl_trans_tx_agg_disable(trans(priv), | 735 | iwl_trans_tx_agg_disable(priv->trans, |
736 | tid_data->agg.txq_id); | 736 | tid_data->agg.txq_id); |
737 | iwlagn_dealloc_agg_txq(priv, tid_data->agg.txq_id); | 737 | iwlagn_dealloc_agg_txq(priv, tid_data->agg.txq_id); |
738 | tid_data->agg.state = IWL_AGG_OFF; | 738 | tid_data->agg.state = IWL_AGG_OFF; |
@@ -1092,7 +1092,7 @@ static int iwl_reclaim(struct iwl_priv *priv, int sta_id, int tid, | |||
1092 | return 1; | 1092 | return 1; |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | iwl_trans_reclaim(trans(priv), txq_id, ssn, skbs); | 1095 | iwl_trans_reclaim(priv->trans, txq_id, ssn, skbs); |
1096 | return 0; | 1096 | return 0; |
1097 | } | 1097 | } |
1098 | 1098 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7db39866bdc4..81c1cd7fdc9e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -348,14 +348,14 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base, | |||
348 | ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32)); | 348 | ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32)); |
349 | 349 | ||
350 | /* Make sure device is powered up for SRAM reads */ | 350 | /* Make sure device is powered up for SRAM reads */ |
351 | spin_lock_irqsave(&trans(priv)->reg_lock, reg_flags); | 351 | spin_lock_irqsave(&priv->trans->reg_lock, reg_flags); |
352 | if (unlikely(!iwl_grab_nic_access(trans(priv)))) { | 352 | if (unlikely(!iwl_grab_nic_access(priv->trans))) { |
353 | spin_unlock_irqrestore(&trans(priv)->reg_lock, reg_flags); | 353 | spin_unlock_irqrestore(&priv->trans->reg_lock, reg_flags); |
354 | return; | 354 | return; |
355 | } | 355 | } |
356 | 356 | ||
357 | /* Set starting address; reads will auto-increment */ | 357 | /* Set starting address; reads will auto-increment */ |
358 | iwl_write32(trans(priv), HBUS_TARG_MEM_RADDR, ptr); | 358 | iwl_write32(priv->trans, HBUS_TARG_MEM_RADDR, ptr); |
359 | 359 | ||
360 | /* | 360 | /* |
361 | * Refuse to read more than would have fit into the log from | 361 | * Refuse to read more than would have fit into the log from |
@@ -371,20 +371,20 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base, | |||
371 | * place event id # at far right for easier visual parsing. | 371 | * place event id # at far right for easier visual parsing. |
372 | */ | 372 | */ |
373 | for (i = 0; i < num_events; i++) { | 373 | for (i = 0; i < num_events; i++) { |
374 | ev = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 374 | ev = iwl_read32(priv->trans, HBUS_TARG_MEM_RDAT); |
375 | time = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 375 | time = iwl_read32(priv->trans, HBUS_TARG_MEM_RDAT); |
376 | if (mode == 0) { | 376 | if (mode == 0) { |
377 | trace_iwlwifi_dev_ucode_cont_event( | 377 | trace_iwlwifi_dev_ucode_cont_event( |
378 | trans(priv)->dev, 0, time, ev); | 378 | priv->trans->dev, 0, time, ev); |
379 | } else { | 379 | } else { |
380 | data = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 380 | data = iwl_read32(priv->trans, HBUS_TARG_MEM_RDAT); |
381 | trace_iwlwifi_dev_ucode_cont_event( | 381 | trace_iwlwifi_dev_ucode_cont_event( |
382 | trans(priv)->dev, time, data, ev); | 382 | priv->trans->dev, time, data, ev); |
383 | } | 383 | } |
384 | } | 384 | } |
385 | /* Allow device to power down */ | 385 | /* Allow device to power down */ |
386 | iwl_release_nic_access(trans(priv)); | 386 | iwl_release_nic_access(priv->trans); |
387 | spin_unlock_irqrestore(&trans(priv)->reg_lock, reg_flags); | 387 | spin_unlock_irqrestore(&priv->trans->reg_lock, reg_flags); |
388 | } | 388 | } |
389 | 389 | ||
390 | static void iwl_continuous_event_trace(struct iwl_priv *priv) | 390 | static void iwl_continuous_event_trace(struct iwl_priv *priv) |
@@ -403,8 +403,7 @@ static void iwl_continuous_event_trace(struct iwl_priv *priv) | |||
403 | 403 | ||
404 | base = priv->device_pointers.log_event_table; | 404 | base = priv->device_pointers.log_event_table; |
405 | if (iwlagn_hw_valid_rtc_data_addr(base)) { | 405 | if (iwlagn_hw_valid_rtc_data_addr(base)) { |
406 | iwl_read_targ_mem_words(trans(priv), base, &read, sizeof(read)); | 406 | iwl_read_targ_mem_words(priv->trans, base, &read, sizeof(read)); |
407 | |||
408 | capacity = read.capacity; | 407 | capacity = read.capacity; |
409 | mode = read.mode; | 408 | mode = read.mode; |
410 | num_wraps = read.wrap_counter; | 409 | num_wraps = read.wrap_counter; |
@@ -444,7 +443,7 @@ static void iwl_continuous_event_trace(struct iwl_priv *priv) | |||
444 | else | 443 | else |
445 | priv->event_log.wraps_once_count++; | 444 | priv->event_log.wraps_once_count++; |
446 | 445 | ||
447 | trace_iwlwifi_dev_ucode_wrap_event(trans(priv)->dev, | 446 | trace_iwlwifi_dev_ucode_wrap_event(priv->trans->dev, |
448 | num_wraps - priv->event_log.num_wraps, | 447 | num_wraps - priv->event_log.num_wraps, |
449 | next_entry, priv->event_log.next_entry); | 448 | next_entry, priv->event_log.next_entry); |
450 | 449 | ||
@@ -670,7 +669,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
670 | struct iwl_ct_kill_throttling_config adv_cmd; | 669 | struct iwl_ct_kill_throttling_config adv_cmd; |
671 | int ret = 0; | 670 | int ret = 0; |
672 | 671 | ||
673 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR, | 672 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_CLR, |
674 | CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); | 673 | CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); |
675 | 674 | ||
676 | priv->thermal_throttle.ct_kill_toggle = false; | 675 | priv->thermal_throttle.ct_kill_toggle = false; |
@@ -949,7 +948,7 @@ void iwl_down(struct iwl_priv *priv) | |||
949 | ieee80211_stop_queues(priv->hw); | 948 | ieee80211_stop_queues(priv->hw); |
950 | 949 | ||
951 | priv->ucode_loaded = false; | 950 | priv->ucode_loaded = false; |
952 | iwl_trans_stop_device(trans(priv)); | 951 | iwl_trans_stop_device(priv->trans); |
953 | 952 | ||
954 | /* Clear out all status bits but a few that are stable across reset */ | 953 | /* Clear out all status bits but a few that are stable across reset */ |
955 | priv->status &= test_bit(STATUS_RF_KILL_HW, &priv->status) << | 954 | priv->status &= test_bit(STATUS_RF_KILL_HW, &priv->status) << |
@@ -1325,7 +1324,7 @@ static int iwl_init_geos(struct iwl_priv *priv) | |||
1325 | priv->hw_params.sku & EEPROM_SKU_CAP_BAND_52GHZ) { | 1324 | priv->hw_params.sku & EEPROM_SKU_CAP_BAND_52GHZ) { |
1326 | IWL_INFO(priv, "Incorrectly detected BG card as ABG. " | 1325 | IWL_INFO(priv, "Incorrectly detected BG card as ABG. " |
1327 | "Please send your %s to maintainer.\n", | 1326 | "Please send your %s to maintainer.\n", |
1328 | trans(priv)->hw_id_str); | 1327 | priv->trans->hw_id_str); |
1329 | priv->hw_params.sku &= ~EEPROM_SKU_CAP_BAND_52GHZ; | 1328 | priv->hw_params.sku &= ~EEPROM_SKU_CAP_BAND_52GHZ; |
1330 | } | 1329 | } |
1331 | 1330 | ||
@@ -1441,32 +1440,32 @@ void iwl_set_hw_params(struct iwl_priv *priv) | |||
1441 | 1440 | ||
1442 | void iwl_debug_config(struct iwl_priv *priv) | 1441 | void iwl_debug_config(struct iwl_priv *priv) |
1443 | { | 1442 | { |
1444 | dev_printk(KERN_INFO, trans(priv)->dev, "CONFIG_IWLWIFI_DEBUG " | 1443 | dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEBUG " |
1445 | #ifdef CONFIG_IWLWIFI_DEBUG | 1444 | #ifdef CONFIG_IWLWIFI_DEBUG |
1446 | "enabled\n"); | 1445 | "enabled\n"); |
1447 | #else | 1446 | #else |
1448 | "disabled\n"); | 1447 | "disabled\n"); |
1449 | #endif | 1448 | #endif |
1450 | dev_printk(KERN_INFO, trans(priv)->dev, "CONFIG_IWLWIFI_DEBUGFS " | 1449 | dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEBUGFS " |
1451 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 1450 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1452 | "enabled\n"); | 1451 | "enabled\n"); |
1453 | #else | 1452 | #else |
1454 | "disabled\n"); | 1453 | "disabled\n"); |
1455 | #endif | 1454 | #endif |
1456 | dev_printk(KERN_INFO, trans(priv)->dev, "CONFIG_IWLWIFI_DEVICE_TRACING " | 1455 | dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEVICE_TRACING " |
1457 | #ifdef CONFIG_IWLWIFI_DEVICE_TRACING | 1456 | #ifdef CONFIG_IWLWIFI_DEVICE_TRACING |
1458 | "enabled\n"); | 1457 | "enabled\n"); |
1459 | #else | 1458 | #else |
1460 | "disabled\n"); | 1459 | "disabled\n"); |
1461 | #endif | 1460 | #endif |
1462 | 1461 | ||
1463 | dev_printk(KERN_INFO, trans(priv)->dev, "CONFIG_IWLWIFI_DEVICE_TESTMODE " | 1462 | dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEVICE_TESTMODE " |
1464 | #ifdef CONFIG_IWLWIFI_DEVICE_TESTMODE | 1463 | #ifdef CONFIG_IWLWIFI_DEVICE_TESTMODE |
1465 | "enabled\n"); | 1464 | "enabled\n"); |
1466 | #else | 1465 | #else |
1467 | "disabled\n"); | 1466 | "disabled\n"); |
1468 | #endif | 1467 | #endif |
1469 | dev_printk(KERN_INFO, trans(priv)->dev, "CONFIG_IWLWIFI_P2P " | 1468 | dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_P2P " |
1470 | #ifdef CONFIG_IWLWIFI_P2P | 1469 | #ifdef CONFIG_IWLWIFI_P2P |
1471 | "enabled\n"); | 1470 | "enabled\n"); |
1472 | #else | 1471 | #else |
@@ -1509,6 +1508,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1509 | op_mode->ops = &iwl_dvm_ops; | 1508 | op_mode->ops = &iwl_dvm_ops; |
1510 | priv = IWL_OP_MODE_GET_DVM(op_mode); | 1509 | priv = IWL_OP_MODE_GET_DVM(op_mode); |
1511 | priv->shrd = trans->shrd; | 1510 | priv->shrd = trans->shrd; |
1511 | priv->trans = trans; | ||
1512 | priv->fw = fw; | 1512 | priv->fw = fw; |
1513 | 1513 | ||
1514 | switch (cfg(priv)->device_family) { | 1514 | switch (cfg(priv)->device_family) { |
@@ -1587,11 +1587,11 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1587 | } | 1587 | } |
1588 | 1588 | ||
1589 | /* Configure transport layer */ | 1589 | /* Configure transport layer */ |
1590 | iwl_trans_configure(trans(priv), &trans_cfg); | 1590 | iwl_trans_configure(priv->trans, &trans_cfg); |
1591 | 1591 | ||
1592 | /* At this point both hw and priv are allocated. */ | 1592 | /* At this point both hw and priv are allocated. */ |
1593 | 1593 | ||
1594 | SET_IEEE80211_DEV(priv->hw, trans(priv)->dev); | 1594 | SET_IEEE80211_DEV(priv->hw, priv->trans->dev); |
1595 | 1595 | ||
1596 | /* show what debugging capabilities we have */ | 1596 | /* show what debugging capabilities we have */ |
1597 | iwl_debug_config(priv); | 1597 | iwl_debug_config(priv); |
@@ -1615,25 +1615,25 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1615 | /* these spin locks will be used in apm_ops.init and EEPROM access | 1615 | /* these spin locks will be used in apm_ops.init and EEPROM access |
1616 | * we should init now | 1616 | * we should init now |
1617 | */ | 1617 | */ |
1618 | spin_lock_init(&trans(priv)->reg_lock); | 1618 | spin_lock_init(&priv->trans->reg_lock); |
1619 | spin_lock_init(&priv->statistics.lock); | 1619 | spin_lock_init(&priv->statistics.lock); |
1620 | 1620 | ||
1621 | /*********************** | 1621 | /*********************** |
1622 | * 2. Read REV register | 1622 | * 2. Read REV register |
1623 | ***********************/ | 1623 | ***********************/ |
1624 | IWL_INFO(priv, "Detected %s, REV=0x%X\n", | 1624 | IWL_INFO(priv, "Detected %s, REV=0x%X\n", |
1625 | cfg(priv)->name, trans(priv)->hw_rev); | 1625 | cfg(priv)->name, priv->trans->hw_rev); |
1626 | 1626 | ||
1627 | if (iwl_trans_start_hw(trans(priv))) | 1627 | if (iwl_trans_start_hw(priv->trans)) |
1628 | goto out_free_traffic_mem; | 1628 | goto out_free_traffic_mem; |
1629 | 1629 | ||
1630 | /* Read the EEPROM */ | 1630 | /* Read the EEPROM */ |
1631 | if (iwl_eeprom_init(priv, trans(priv)->hw_rev)) { | 1631 | if (iwl_eeprom_init(priv, priv->trans->hw_rev)) { |
1632 | IWL_ERR(priv, "Unable to init EEPROM\n"); | 1632 | IWL_ERR(priv, "Unable to init EEPROM\n"); |
1633 | goto out_free_traffic_mem; | 1633 | goto out_free_traffic_mem; |
1634 | } | 1634 | } |
1635 | /* Reset chip to save power until we load uCode during "up". */ | 1635 | /* Reset chip to save power until we load uCode during "up". */ |
1636 | iwl_trans_stop_hw(trans(priv)); | 1636 | iwl_trans_stop_hw(priv->trans); |
1637 | 1637 | ||
1638 | if (iwl_eeprom_check_version(priv)) | 1638 | if (iwl_eeprom_check_version(priv)) |
1639 | goto out_free_eeprom; | 1639 | goto out_free_eeprom; |
@@ -1676,7 +1676,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1676 | n_q_to_ac = ARRAY_SIZE(iwlagn_bss_queue_to_ac); | 1676 | n_q_to_ac = ARRAY_SIZE(iwlagn_bss_queue_to_ac); |
1677 | 1677 | ||
1678 | /* Configure transport layer again*/ | 1678 | /* Configure transport layer again*/ |
1679 | iwl_trans_configure(trans(priv), &trans_cfg); | 1679 | iwl_trans_configure(priv->trans, &trans_cfg); |
1680 | } | 1680 | } |
1681 | 1681 | ||
1682 | /******************* | 1682 | /******************* |
@@ -1768,7 +1768,7 @@ void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode) | |||
1768 | 1768 | ||
1769 | /*This will stop the queues, move the device to low power state */ | 1769 | /*This will stop the queues, move the device to low power state */ |
1770 | priv->ucode_loaded = false; | 1770 | priv->ucode_loaded = false; |
1771 | iwl_trans_stop_device(trans(priv)); | 1771 | iwl_trans_stop_device(priv->trans); |
1772 | 1772 | ||
1773 | iwl_eeprom_free(priv); | 1773 | iwl_eeprom_free(priv); |
1774 | 1774 | ||
@@ -1860,7 +1860,7 @@ static const char *desc_lookup(u32 num) | |||
1860 | 1860 | ||
1861 | static void iwl_dump_nic_error_log(struct iwl_priv *priv) | 1861 | static void iwl_dump_nic_error_log(struct iwl_priv *priv) |
1862 | { | 1862 | { |
1863 | struct iwl_trans *trans = trans(priv); | 1863 | struct iwl_trans *trans = priv->trans; |
1864 | u32 base; | 1864 | u32 base; |
1865 | struct iwl_error_event_table table; | 1865 | struct iwl_error_event_table table; |
1866 | 1866 | ||
@@ -1950,7 +1950,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, | |||
1950 | u32 ev, time, data; /* event log data */ | 1950 | u32 ev, time, data; /* event log data */ |
1951 | unsigned long reg_flags; | 1951 | unsigned long reg_flags; |
1952 | 1952 | ||
1953 | struct iwl_trans *trans = trans(priv); | 1953 | struct iwl_trans *trans = priv->trans; |
1954 | 1954 | ||
1955 | if (num_events == 0) | 1955 | if (num_events == 0) |
1956 | return pos; | 1956 | return pos; |
@@ -2068,7 +2068,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log, | |||
2068 | u32 logsize; | 2068 | u32 logsize; |
2069 | int pos = 0; | 2069 | int pos = 0; |
2070 | size_t bufsz = 0; | 2070 | size_t bufsz = 0; |
2071 | struct iwl_trans *trans = trans(priv); | 2071 | struct iwl_trans *trans = priv->trans; |
2072 | 2072 | ||
2073 | base = priv->device_pointers.log_event_table; | 2073 | base = priv->device_pointers.log_event_table; |
2074 | if (priv->cur_ucode == IWL_UCODE_INIT) { | 2074 | if (priv->cur_ucode == IWL_UCODE_INIT) { |
@@ -2184,7 +2184,7 @@ static void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand) | |||
2184 | * commands by clearing the ready bit */ | 2184 | * commands by clearing the ready bit */ |
2185 | clear_bit(STATUS_READY, &priv->status); | 2185 | clear_bit(STATUS_READY, &priv->status); |
2186 | 2186 | ||
2187 | wake_up(&trans(priv)->wait_command_queue); | 2187 | wake_up(&priv->trans->wait_command_queue); |
2188 | 2188 | ||
2189 | if (!ondemand) { | 2189 | if (!ondemand) { |
2190 | /* | 2190 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 20100c72ec6b..e4c0a94e189e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -472,7 +472,7 @@ static inline void iwl_dvm_set_pmi(struct iwl_priv *priv, bool state) | |||
472 | set_bit(STATUS_POWER_PMI, &priv->status); | 472 | set_bit(STATUS_POWER_PMI, &priv->status); |
473 | else | 473 | else |
474 | clear_bit(STATUS_POWER_PMI, &priv->status); | 474 | clear_bit(STATUS_POWER_PMI, &priv->status); |
475 | iwl_trans_set_pmi(trans(priv), state); | 475 | iwl_trans_set_pmi(priv->trans, state); |
476 | } | 476 | } |
477 | 477 | ||
478 | #ifdef CONFIG_IWLWIFI_DEBUG | 478 | #ifdef CONFIG_IWLWIFI_DEBUG |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 32834a797d11..a1d155a9d89a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -259,7 +259,7 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, | |||
259 | sram = priv->dbgfs_sram_offset & ~0x3; | 259 | sram = priv->dbgfs_sram_offset & ~0x3; |
260 | 260 | ||
261 | /* read the first u32 from sram */ | 261 | /* read the first u32 from sram */ |
262 | val = iwl_read_targ_mem(trans(priv), sram); | 262 | val = iwl_read_targ_mem(priv->trans, sram); |
263 | 263 | ||
264 | for (; len; len--) { | 264 | for (; len; len--) { |
265 | /* put the address at the start of every line */ | 265 | /* put the address at the start of every line */ |
@@ -278,7 +278,7 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, | |||
278 | if (++offset == 4) { | 278 | if (++offset == 4) { |
279 | sram += 4; | 279 | sram += 4; |
280 | offset = 0; | 280 | offset = 0; |
281 | val = iwl_read_targ_mem(trans(priv), sram); | 281 | val = iwl_read_targ_mem(priv->trans, sram); |
282 | } | 282 | } |
283 | 283 | ||
284 | /* put in extra spaces and split lines for human readability */ | 284 | /* put in extra spaces and split lines for human readability */ |
@@ -2071,7 +2071,7 @@ static ssize_t iwl_dbgfs_power_save_status_read(struct file *file, | |||
2071 | const size_t bufsz = sizeof(buf); | 2071 | const size_t bufsz = sizeof(buf); |
2072 | u32 pwrsave_status; | 2072 | u32 pwrsave_status; |
2073 | 2073 | ||
2074 | pwrsave_status = iwl_read32(trans(priv), CSR_GP_CNTRL) & | 2074 | pwrsave_status = iwl_read32(priv->trans, CSR_GP_CNTRL) & |
2075 | CSR_GP_REG_POWER_SAVE_STATUS_MSK; | 2075 | CSR_GP_REG_POWER_SAVE_STATUS_MSK; |
2076 | 2076 | ||
2077 | pos += scnprintf(buf + pos, bufsz - pos, "Power Save Status: "); | 2077 | pos += scnprintf(buf + pos, bufsz - pos, "Power Save Status: "); |
@@ -2594,7 +2594,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
2594 | /* Calibrations disabled/enabled status*/ | 2594 | /* Calibrations disabled/enabled status*/ |
2595 | DEBUGFS_ADD_FILE(calib_disabled, dir_rf, S_IRUSR); | 2595 | DEBUGFS_ADD_FILE(calib_disabled, dir_rf, S_IRUSR); |
2596 | 2596 | ||
2597 | if (iwl_trans_dbgfs_register(trans(priv), dir_debug)) | 2597 | if (iwl_trans_dbgfs_register(priv->trans, dir_debug)) |
2598 | goto err; | 2598 | goto err; |
2599 | return 0; | 2599 | return 0; |
2600 | 2600 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index c235a1ea71b4..faf54c434506 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -760,6 +760,7 @@ struct iwl_priv { | |||
760 | 760 | ||
761 | /*data shared among all the driver's layers */ | 761 | /*data shared among all the driver's layers */ |
762 | struct iwl_shared *shrd; | 762 | struct iwl_shared *shrd; |
763 | struct iwl_trans *trans; | ||
763 | const struct iwl_fw *fw; | 764 | const struct iwl_fw *fw; |
764 | const struct iwl_lib_ops *lib; | 765 | const struct iwl_lib_ops *lib; |
765 | unsigned long status; | 766 | unsigned long status; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index a004431d1a60..622a8f33d178 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -189,7 +189,7 @@ static void iwl_eeprom_release_semaphore(struct iwl_trans *trans) | |||
189 | 189 | ||
190 | static int iwl_eeprom_verify_signature(struct iwl_priv *priv) | 190 | static int iwl_eeprom_verify_signature(struct iwl_priv *priv) |
191 | { | 191 | { |
192 | u32 gp = iwl_read32(trans(priv), CSR_EEPROM_GP) & | 192 | u32 gp = iwl_read32(priv->trans, CSR_EEPROM_GP) & |
193 | CSR_EEPROM_GP_VALID_MSK; | 193 | CSR_EEPROM_GP_VALID_MSK; |
194 | int ret = 0; | 194 | int ret = 0; |
195 | 195 | ||
@@ -719,14 +719,14 @@ static void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv) | |||
719 | int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) | 719 | int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) |
720 | { | 720 | { |
721 | __le16 *e; | 721 | __le16 *e; |
722 | u32 gp = iwl_read32(trans(priv), CSR_EEPROM_GP); | 722 | u32 gp = iwl_read32(priv->trans, CSR_EEPROM_GP); |
723 | int sz; | 723 | int sz; |
724 | int ret; | 724 | int ret; |
725 | u16 addr; | 725 | u16 addr; |
726 | u16 validblockaddr = 0; | 726 | u16 validblockaddr = 0; |
727 | u16 cache_addr = 0; | 727 | u16 cache_addr = 0; |
728 | 728 | ||
729 | priv->nvm_device_type = iwl_get_nvm_type(trans(priv), hw_rev); | 729 | priv->nvm_device_type = iwl_get_nvm_type(priv->trans, hw_rev); |
730 | if (priv->nvm_device_type == -ENOENT) | 730 | if (priv->nvm_device_type == -ENOENT) |
731 | return -ENOENT; | 731 | return -ENOENT; |
732 | /* allocate eeprom */ | 732 | /* allocate eeprom */ |
@@ -747,7 +747,7 @@ int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) | |||
747 | } | 747 | } |
748 | 748 | ||
749 | /* Make sure driver (instead of uCode) is allowed to read EEPROM */ | 749 | /* Make sure driver (instead of uCode) is allowed to read EEPROM */ |
750 | ret = iwl_eeprom_acquire_semaphore(trans(priv)); | 750 | ret = iwl_eeprom_acquire_semaphore(priv->trans); |
751 | if (ret < 0) { | 751 | if (ret < 0) { |
752 | IWL_ERR(priv, "Failed to acquire EEPROM semaphore.\n"); | 752 | IWL_ERR(priv, "Failed to acquire EEPROM semaphore.\n"); |
753 | ret = -ENOENT; | 753 | ret = -ENOENT; |
@@ -756,22 +756,22 @@ int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) | |||
756 | 756 | ||
757 | if (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) { | 757 | if (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) { |
758 | 758 | ||
759 | ret = iwl_init_otp_access(trans(priv)); | 759 | ret = iwl_init_otp_access(priv->trans); |
760 | if (ret) { | 760 | if (ret) { |
761 | IWL_ERR(priv, "Failed to initialize OTP access.\n"); | 761 | IWL_ERR(priv, "Failed to initialize OTP access.\n"); |
762 | ret = -ENOENT; | 762 | ret = -ENOENT; |
763 | goto done; | 763 | goto done; |
764 | } | 764 | } |
765 | iwl_write32(trans(priv), CSR_EEPROM_GP, | 765 | iwl_write32(priv->trans, CSR_EEPROM_GP, |
766 | iwl_read32(trans(priv), CSR_EEPROM_GP) & | 766 | iwl_read32(priv->trans, CSR_EEPROM_GP) & |
767 | ~CSR_EEPROM_GP_IF_OWNER_MSK); | 767 | ~CSR_EEPROM_GP_IF_OWNER_MSK); |
768 | 768 | ||
769 | iwl_set_bit(trans(priv), CSR_OTP_GP_REG, | 769 | iwl_set_bit(priv->trans, CSR_OTP_GP_REG, |
770 | CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK | | 770 | CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK | |
771 | CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK); | 771 | CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK); |
772 | /* traversing the linked list if no shadow ram supported */ | 772 | /* traversing the linked list if no shadow ram supported */ |
773 | if (!cfg(priv)->base_params->shadow_ram_support) { | 773 | if (!cfg(priv)->base_params->shadow_ram_support) { |
774 | if (iwl_find_otp_image(trans(priv), &validblockaddr)) { | 774 | if (iwl_find_otp_image(priv->trans, &validblockaddr)) { |
775 | ret = -ENOENT; | 775 | ret = -ENOENT; |
776 | goto done; | 776 | goto done; |
777 | } | 777 | } |
@@ -780,7 +780,7 @@ int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) | |||
780 | addr += sizeof(u16)) { | 780 | addr += sizeof(u16)) { |
781 | __le16 eeprom_data; | 781 | __le16 eeprom_data; |
782 | 782 | ||
783 | ret = iwl_read_otp_word(trans(priv), addr, | 783 | ret = iwl_read_otp_word(priv->trans, addr, |
784 | &eeprom_data); | 784 | &eeprom_data); |
785 | if (ret) | 785 | if (ret) |
786 | goto done; | 786 | goto done; |
@@ -792,10 +792,10 @@ int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) | |||
792 | for (addr = 0; addr < sz; addr += sizeof(u16)) { | 792 | for (addr = 0; addr < sz; addr += sizeof(u16)) { |
793 | u32 r; | 793 | u32 r; |
794 | 794 | ||
795 | iwl_write32(trans(priv), CSR_EEPROM_REG, | 795 | iwl_write32(priv->trans, CSR_EEPROM_REG, |
796 | CSR_EEPROM_REG_MSK_ADDR & (addr << 1)); | 796 | CSR_EEPROM_REG_MSK_ADDR & (addr << 1)); |
797 | 797 | ||
798 | ret = iwl_poll_bit(trans(priv), CSR_EEPROM_REG, | 798 | ret = iwl_poll_bit(priv->trans, CSR_EEPROM_REG, |
799 | CSR_EEPROM_REG_READ_VALID_MSK, | 799 | CSR_EEPROM_REG_READ_VALID_MSK, |
800 | CSR_EEPROM_REG_READ_VALID_MSK, | 800 | CSR_EEPROM_REG_READ_VALID_MSK, |
801 | IWL_EEPROM_ACCESS_TIMEOUT); | 801 | IWL_EEPROM_ACCESS_TIMEOUT); |
@@ -804,7 +804,7 @@ int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) | |||
804 | "Time out reading EEPROM[%d]\n", addr); | 804 | "Time out reading EEPROM[%d]\n", addr); |
805 | goto done; | 805 | goto done; |
806 | } | 806 | } |
807 | r = iwl_read32(trans(priv), CSR_EEPROM_REG); | 807 | r = iwl_read32(priv->trans, CSR_EEPROM_REG); |
808 | e[addr / 2] = cpu_to_le16(r >> 16); | 808 | e[addr / 2] = cpu_to_le16(r >> 16); |
809 | } | 809 | } |
810 | } | 810 | } |
@@ -816,7 +816,7 @@ int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev) | |||
816 | 816 | ||
817 | ret = 0; | 817 | ret = 0; |
818 | done: | 818 | done: |
819 | iwl_eeprom_release_semaphore(trans(priv)); | 819 | iwl_eeprom_release_semaphore(priv->trans); |
820 | 820 | ||
821 | err: | 821 | err: |
822 | if (ret) | 822 | if (ret) |
@@ -1132,7 +1132,7 @@ void iwl_rf_config(struct iwl_priv *priv) | |||
1132 | 1132 | ||
1133 | /* write radio config values to register */ | 1133 | /* write radio config values to register */ |
1134 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX) { | 1134 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX) { |
1135 | iwl_set_bit(trans(priv), CSR_HW_IF_CONFIG_REG, | 1135 | iwl_set_bit(priv->trans, CSR_HW_IF_CONFIG_REG, |
1136 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) | | 1136 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) | |
1137 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) | | 1137 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) | |
1138 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); | 1138 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); |
@@ -1144,7 +1144,7 @@ void iwl_rf_config(struct iwl_priv *priv) | |||
1144 | WARN_ON(1); | 1144 | WARN_ON(1); |
1145 | 1145 | ||
1146 | /* set CSR_HW_CONFIG_REG for uCode use */ | 1146 | /* set CSR_HW_CONFIG_REG for uCode use */ |
1147 | iwl_set_bit(trans(priv), CSR_HW_IF_CONFIG_REG, | 1147 | iwl_set_bit(priv->trans, CSR_HW_IF_CONFIG_REG, |
1148 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | | 1148 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | |
1149 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); | 1149 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); |
1150 | } | 1150 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 1993a2b7ae63..18e6a36eff4f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -71,7 +71,7 @@ static const struct ieee80211_tpt_blink iwl_blink[] = { | |||
71 | /* Set led register off */ | 71 | /* Set led register off */ |
72 | void iwlagn_led_enable(struct iwl_priv *priv) | 72 | void iwlagn_led_enable(struct iwl_priv *priv) |
73 | { | 73 | { |
74 | iwl_write32(trans(priv), CSR_LED_REG, CSR_LED_REG_TRUN_ON); | 74 | iwl_write32(priv->trans, CSR_LED_REG, CSR_LED_REG_TRUN_ON); |
75 | } | 75 | } |
76 | 76 | ||
77 | /* | 77 | /* |
@@ -107,9 +107,9 @@ static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd) | |||
107 | }; | 107 | }; |
108 | u32 reg; | 108 | u32 reg; |
109 | 109 | ||
110 | reg = iwl_read32(trans(priv), CSR_LED_REG); | 110 | reg = iwl_read32(priv->trans, CSR_LED_REG); |
111 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) | 111 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) |
112 | iwl_write32(trans(priv), CSR_LED_REG, | 112 | iwl_write32(priv->trans, CSR_LED_REG, |
113 | reg & CSR_LED_BSM_CTRL_MSK); | 113 | reg & CSR_LED_BSM_CTRL_MSK); |
114 | 114 | ||
115 | return iwl_dvm_send_cmd(priv, &cmd); | 115 | return iwl_dvm_send_cmd(priv, &cmd); |
@@ -207,7 +207,7 @@ void iwl_leds_init(struct iwl_priv *priv) | |||
207 | break; | 207 | break; |
208 | } | 208 | } |
209 | 209 | ||
210 | ret = led_classdev_register(trans(priv)->dev, &priv->led); | 210 | ret = led_classdev_register(priv->trans->dev, &priv->led); |
211 | if (ret) { | 211 | if (ret) { |
212 | kfree(priv->led.name); | 212 | kfree(priv->led.name); |
213 | return; | 213 | return; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 3f82ff4f3afe..20388ec8f9db 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -198,8 +198,8 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
198 | WIPHY_FLAG_IBSS_RSN; | 198 | WIPHY_FLAG_IBSS_RSN; |
199 | 199 | ||
200 | if (priv->fw->img[IWL_UCODE_WOWLAN].sec[0].len && | 200 | if (priv->fw->img[IWL_UCODE_WOWLAN].sec[0].len && |
201 | trans(priv)->ops->wowlan_suspend && | 201 | priv->trans->ops->wowlan_suspend && |
202 | device_can_wakeup(trans(priv)->dev)) { | 202 | device_can_wakeup(priv->trans->dev)) { |
203 | hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | | 203 | hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | |
204 | WIPHY_WOWLAN_DISCONNECT | | 204 | WIPHY_WOWLAN_DISCONNECT | |
205 | WIPHY_WOWLAN_EAP_IDENTITY_REQ | | 205 | WIPHY_WOWLAN_EAP_IDENTITY_REQ | |
@@ -237,7 +237,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
237 | priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 237 | priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = |
238 | &priv->bands[IEEE80211_BAND_5GHZ]; | 238 | &priv->bands[IEEE80211_BAND_5GHZ]; |
239 | 239 | ||
240 | hw->wiphy->hw_version = trans(priv)->hw_id; | 240 | hw->wiphy->hw_version = priv->trans->hw_id; |
241 | 241 | ||
242 | iwl_leds_init(priv); | 242 | iwl_leds_init(priv); |
243 | 243 | ||
@@ -356,7 +356,7 @@ void iwlagn_mac_stop(struct ieee80211_hw *hw) | |||
356 | * even if interface is down, trans->down will leave the RF | 356 | * even if interface is down, trans->down will leave the RF |
357 | * kill interrupt enabled | 357 | * kill interrupt enabled |
358 | */ | 358 | */ |
359 | iwl_trans_stop_hw(trans(priv)); | 359 | iwl_trans_stop_hw(priv->trans); |
360 | 360 | ||
361 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 361 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
362 | } | 362 | } |
@@ -412,9 +412,9 @@ int iwlagn_mac_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) | |||
412 | if (ret) | 412 | if (ret) |
413 | goto error; | 413 | goto error; |
414 | 414 | ||
415 | device_set_wakeup_enable(trans(priv)->dev, true); | 415 | device_set_wakeup_enable(priv->trans->dev, true); |
416 | 416 | ||
417 | iwl_trans_wowlan_suspend(trans(priv)); | 417 | iwl_trans_wowlan_suspend(priv->trans); |
418 | 418 | ||
419 | goto out; | 419 | goto out; |
420 | 420 | ||
@@ -441,19 +441,19 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
441 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 441 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
442 | mutex_lock(&priv->mutex); | 442 | mutex_lock(&priv->mutex); |
443 | 443 | ||
444 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR, | 444 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_CLR, |
445 | CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE); | 445 | CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE); |
446 | 446 | ||
447 | base = priv->device_pointers.error_event_table; | 447 | base = priv->device_pointers.error_event_table; |
448 | if (iwlagn_hw_valid_rtc_data_addr(base)) { | 448 | if (iwlagn_hw_valid_rtc_data_addr(base)) { |
449 | spin_lock_irqsave(&trans(priv)->reg_lock, flags); | 449 | spin_lock_irqsave(&priv->trans->reg_lock, flags); |
450 | ret = iwl_grab_nic_access_silent(trans(priv)); | 450 | ret = iwl_grab_nic_access_silent(priv->trans); |
451 | if (likely(ret == 0)) { | 451 | if (likely(ret == 0)) { |
452 | iwl_write32(trans(priv), HBUS_TARG_MEM_RADDR, base); | 452 | iwl_write32(priv->trans, HBUS_TARG_MEM_RADDR, base); |
453 | status = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 453 | status = iwl_read32(priv->trans, HBUS_TARG_MEM_RDAT); |
454 | iwl_release_nic_access(trans(priv)); | 454 | iwl_release_nic_access(priv->trans); |
455 | } | 455 | } |
456 | spin_unlock_irqrestore(&trans(priv)->reg_lock, flags); | 456 | spin_unlock_irqrestore(&priv->trans->reg_lock, flags); |
457 | 457 | ||
458 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 458 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
459 | if (ret == 0) { | 459 | if (ret == 0) { |
@@ -468,7 +468,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
468 | 468 | ||
469 | if (priv->wowlan_sram) | 469 | if (priv->wowlan_sram) |
470 | _iwl_read_targ_mem_words( | 470 | _iwl_read_targ_mem_words( |
471 | trans(priv), 0x800000, | 471 | priv->trans, 0x800000, |
472 | priv->wowlan_sram, | 472 | priv->wowlan_sram, |
473 | img->sec[IWL_UCODE_SECTION_DATA].len / 4); | 473 | img->sec[IWL_UCODE_SECTION_DATA].len / 4); |
474 | } | 474 | } |
@@ -480,7 +480,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
480 | 480 | ||
481 | priv->wowlan = false; | 481 | priv->wowlan = false; |
482 | 482 | ||
483 | device_set_wakeup_enable(trans(priv)->dev, false); | 483 | device_set_wakeup_enable(priv->trans->dev, false); |
484 | 484 | ||
485 | iwlagn_prepare_restart(priv); | 485 | iwlagn_prepare_restart(priv); |
486 | 486 | ||
@@ -654,7 +654,7 @@ int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
654 | ret = iwl_sta_rx_agg_stop(priv, sta, tid); | 654 | ret = iwl_sta_rx_agg_stop(priv, sta, tid); |
655 | break; | 655 | break; |
656 | case IEEE80211_AMPDU_TX_START: | 656 | case IEEE80211_AMPDU_TX_START: |
657 | if (!trans(priv)->ops->tx_agg_setup) | 657 | if (!priv->trans->ops->tx_agg_setup) |
658 | break; | 658 | break; |
659 | if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_TXAGG) | 659 | if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_TXAGG) |
660 | break; | 660 | break; |
@@ -1006,7 +1006,7 @@ void iwlagn_mac_flush(struct ieee80211_hw *hw, bool drop) | |||
1006 | } | 1006 | } |
1007 | } | 1007 | } |
1008 | IWL_DEBUG_MAC80211(priv, "wait transmit/flush all frames\n"); | 1008 | IWL_DEBUG_MAC80211(priv, "wait transmit/flush all frames\n"); |
1009 | iwl_trans_wait_tx_queue_empty(trans(priv)); | 1009 | iwl_trans_wait_tx_queue_empty(priv->trans); |
1010 | done: | 1010 | done: |
1011 | mutex_unlock(&priv->mutex); | 1011 | mutex_unlock(&priv->mutex); |
1012 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1012 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 174a0f737214..2c6f3b195d62 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -378,7 +378,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) | |||
378 | /* initialize to default */ | 378 | /* initialize to default */ |
379 | void iwl_power_initialize(struct iwl_priv *priv) | 379 | void iwl_power_initialize(struct iwl_priv *priv) |
380 | { | 380 | { |
381 | priv->power_data.bus_pm = trans(priv)->pm_support; | 381 | priv->power_data.bus_pm = priv->trans->pm_support; |
382 | 382 | ||
383 | priv->power_data.debug_sleep_level_override = -1; | 383 | priv->power_data.debug_sleep_level_override = -1; |
384 | 384 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-testmode.c b/drivers/net/wireless/iwlwifi/iwl-testmode.c index c8e89cac7ea3..0c516d08121a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-testmode.c +++ b/drivers/net/wireless/iwlwifi/iwl-testmode.c | |||
@@ -218,7 +218,7 @@ static void iwl_trace_cleanup(struct iwl_priv *priv) | |||
218 | if (priv->testmode_trace.trace_enabled) { | 218 | if (priv->testmode_trace.trace_enabled) { |
219 | if (priv->testmode_trace.cpu_addr && | 219 | if (priv->testmode_trace.cpu_addr && |
220 | priv->testmode_trace.dma_addr) | 220 | priv->testmode_trace.dma_addr) |
221 | dma_free_coherent(trans(priv)->dev, | 221 | dma_free_coherent(priv->trans->dev, |
222 | priv->testmode_trace.total_size, | 222 | priv->testmode_trace.total_size, |
223 | priv->testmode_trace.cpu_addr, | 223 | priv->testmode_trace.cpu_addr, |
224 | priv->testmode_trace.dma_addr); | 224 | priv->testmode_trace.dma_addr); |
@@ -371,7 +371,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb) | |||
371 | 371 | ||
372 | switch (cmd) { | 372 | switch (cmd) { |
373 | case IWL_TM_CMD_APP2DEV_DIRECT_REG_READ32: | 373 | case IWL_TM_CMD_APP2DEV_DIRECT_REG_READ32: |
374 | val32 = iwl_read_direct32(trans(priv), ofs); | 374 | val32 = iwl_read_direct32(priv->trans, ofs); |
375 | IWL_INFO(priv, "32bit value to read 0x%x\n", val32); | 375 | IWL_INFO(priv, "32bit value to read 0x%x\n", val32); |
376 | 376 | ||
377 | skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); | 377 | skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); |
@@ -391,7 +391,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb) | |||
391 | } else { | 391 | } else { |
392 | val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]); | 392 | val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]); |
393 | IWL_INFO(priv, "32bit value to write 0x%x\n", val32); | 393 | IWL_INFO(priv, "32bit value to write 0x%x\n", val32); |
394 | iwl_write_direct32(trans(priv), ofs, val32); | 394 | iwl_write_direct32(priv->trans, ofs, val32); |
395 | } | 395 | } |
396 | break; | 396 | break; |
397 | case IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE8: | 397 | case IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE8: |
@@ -401,7 +401,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb) | |||
401 | } else { | 401 | } else { |
402 | val8 = nla_get_u8(tb[IWL_TM_ATTR_REG_VALUE8]); | 402 | val8 = nla_get_u8(tb[IWL_TM_ATTR_REG_VALUE8]); |
403 | IWL_INFO(priv, "8bit value to write 0x%x\n", val8); | 403 | IWL_INFO(priv, "8bit value to write 0x%x\n", val8); |
404 | iwl_write8(trans(priv), ofs, val8); | 404 | iwl_write8(priv->trans, ofs, val8); |
405 | } | 405 | } |
406 | break; | 406 | break; |
407 | default: | 407 | default: |
@@ -464,7 +464,7 @@ cfg_init_calib_error: | |||
464 | static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb) | 464 | static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb) |
465 | { | 465 | { |
466 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); | 466 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); |
467 | struct iwl_trans *trans = trans(priv); | 467 | struct iwl_trans *trans = priv->trans; |
468 | struct sk_buff *skb; | 468 | struct sk_buff *skb; |
469 | unsigned char *rsp_data_ptr = NULL; | 469 | unsigned char *rsp_data_ptr = NULL; |
470 | int status = 0, rsp_data_len = 0; | 470 | int status = 0, rsp_data_len = 0; |
@@ -577,7 +577,7 @@ static int iwl_testmode_driver(struct ieee80211_hw *hw, struct nlattr **tb) | |||
577 | break; | 577 | break; |
578 | 578 | ||
579 | case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID: | 579 | case IWL_TM_CMD_APP2DEV_GET_DEVICE_ID: |
580 | devid = trans(priv)->hw_id; | 580 | devid = priv->trans->hw_id; |
581 | IWL_INFO(priv, "hw version: 0x%x\n", devid); | 581 | IWL_INFO(priv, "hw version: 0x%x\n", devid); |
582 | 582 | ||
583 | skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); | 583 | skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); |
@@ -642,7 +642,7 @@ static int iwl_testmode_trace(struct ieee80211_hw *hw, struct nlattr **tb) | |||
642 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); | 642 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); |
643 | struct sk_buff *skb; | 643 | struct sk_buff *skb; |
644 | int status = 0; | 644 | int status = 0; |
645 | struct device *dev = trans(priv)->dev; | 645 | struct device *dev = priv->trans->dev; |
646 | 646 | ||
647 | switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { | 647 | switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { |
648 | case IWL_TM_CMD_APP2DEV_BEGIN_TRACE: | 648 | case IWL_TM_CMD_APP2DEV_BEGIN_TRACE: |
@@ -782,7 +782,7 @@ static int iwl_testmode_ownership(struct ieee80211_hw *hw, struct nlattr **tb) | |||
782 | 782 | ||
783 | static int iwl_testmode_indirect_read(struct iwl_priv *priv, u32 addr, u32 size) | 783 | static int iwl_testmode_indirect_read(struct iwl_priv *priv, u32 addr, u32 size) |
784 | { | 784 | { |
785 | struct iwl_trans *trans = trans(priv); | 785 | struct iwl_trans *trans = priv->trans; |
786 | unsigned long flags; | 786 | unsigned long flags; |
787 | int i; | 787 | int i; |
788 | 788 | ||
@@ -822,7 +822,7 @@ static int iwl_testmode_indirect_read(struct iwl_priv *priv, u32 addr, u32 size) | |||
822 | static int iwl_testmode_indirect_write(struct iwl_priv *priv, u32 addr, | 822 | static int iwl_testmode_indirect_write(struct iwl_priv *priv, u32 addr, |
823 | u32 size, unsigned char *buf) | 823 | u32 size, unsigned char *buf) |
824 | { | 824 | { |
825 | struct iwl_trans *trans = trans(priv); | 825 | struct iwl_trans *trans = priv->trans; |
826 | u32 val, i; | 826 | u32 val, i; |
827 | unsigned long flags; | 827 | unsigned long flags; |
828 | 828 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c index 539171945610..4056d1ff8437 100644 --- a/drivers/net/wireless/iwlwifi/iwl-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c | |||
@@ -244,7 +244,7 @@ static int iwl_alive_notify(struct iwl_priv *priv) | |||
244 | { | 244 | { |
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | iwl_trans_fw_alive(trans(priv)); | 247 | iwl_trans_fw_alive(priv->trans); |
248 | 248 | ||
249 | priv->passive_no_rx = false; | 249 | priv->passive_no_rx = false; |
250 | priv->transport_queue_stop = 0; | 250 | priv->transport_queue_stop = 0; |
@@ -282,9 +282,9 @@ static int iwl_verify_sec_sparse(struct iwl_priv *priv, | |||
282 | /* read data comes through single port, auto-incr addr */ | 282 | /* read data comes through single port, auto-incr addr */ |
283 | /* NOTE: Use the debugless read so we don't flood kernel log | 283 | /* NOTE: Use the debugless read so we don't flood kernel log |
284 | * if IWL_DL_IO is set */ | 284 | * if IWL_DL_IO is set */ |
285 | iwl_write_direct32(trans(priv), HBUS_TARG_MEM_RADDR, | 285 | iwl_write_direct32(priv->trans, HBUS_TARG_MEM_RADDR, |
286 | i + fw_desc->offset); | 286 | i + fw_desc->offset); |
287 | val = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 287 | val = iwl_read32(priv->trans, HBUS_TARG_MEM_RDAT); |
288 | if (val != le32_to_cpu(*image)) | 288 | if (val != le32_to_cpu(*image)) |
289 | return -EIO; | 289 | return -EIO; |
290 | } | 290 | } |
@@ -303,14 +303,14 @@ static void iwl_print_mismatch_sec(struct iwl_priv *priv, | |||
303 | 303 | ||
304 | IWL_DEBUG_FW(priv, "ucode inst image size is %u\n", len); | 304 | IWL_DEBUG_FW(priv, "ucode inst image size is %u\n", len); |
305 | 305 | ||
306 | iwl_write_direct32(trans(priv), HBUS_TARG_MEM_RADDR, | 306 | iwl_write_direct32(priv->trans, HBUS_TARG_MEM_RADDR, |
307 | fw_desc->offset); | 307 | fw_desc->offset); |
308 | 308 | ||
309 | for (offs = 0; | 309 | for (offs = 0; |
310 | offs < len && errors < 20; | 310 | offs < len && errors < 20; |
311 | offs += sizeof(u32), image++) { | 311 | offs += sizeof(u32), image++) { |
312 | /* read data comes through single port, auto-incr addr */ | 312 | /* read data comes through single port, auto-incr addr */ |
313 | val = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 313 | val = iwl_read32(priv->trans, HBUS_TARG_MEM_RDAT); |
314 | if (val != le32_to_cpu(*image)) { | 314 | if (val != le32_to_cpu(*image)) { |
315 | IWL_ERR(priv, "uCode INST section at " | 315 | IWL_ERR(priv, "uCode INST section at " |
316 | "offset 0x%x, is 0x%x, s/b 0x%x\n", | 316 | "offset 0x%x, is 0x%x, s/b 0x%x\n", |
@@ -402,7 +402,7 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv, | |||
402 | alive_cmd, ARRAY_SIZE(alive_cmd), | 402 | alive_cmd, ARRAY_SIZE(alive_cmd), |
403 | iwl_alive_fn, &alive_data); | 403 | iwl_alive_fn, &alive_data); |
404 | 404 | ||
405 | ret = iwl_trans_start_fw(trans(priv), fw); | 405 | ret = iwl_trans_start_fw(priv->trans, fw); |
406 | if (ret) { | 406 | if (ret) { |
407 | priv->cur_ucode = old_type; | 407 | priv->cur_ucode = old_type; |
408 | iwl_remove_notification(&priv->notif_wait, &alive_wait); | 408 | iwl_remove_notification(&priv->notif_wait, &alive_wait); |
@@ -526,7 +526,7 @@ int iwl_run_init_ucode(struct iwl_priv *priv) | |||
526 | iwl_remove_notification(&priv->notif_wait, &calib_wait); | 526 | iwl_remove_notification(&priv->notif_wait, &calib_wait); |
527 | out: | 527 | out: |
528 | /* Whatever happened, stop the device */ | 528 | /* Whatever happened, stop the device */ |
529 | iwl_trans_stop_device(trans(priv)); | 529 | iwl_trans_stop_device(priv->trans); |
530 | priv->ucode_loaded = false; | 530 | priv->ucode_loaded = false; |
531 | 531 | ||
532 | return ret; | 532 | return ret; |