diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c index cec13adb018e..44e2f911f89b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans.c | |||
@@ -604,9 +604,8 @@ error: | |||
604 | return ret; | 604 | return ret; |
605 | } | 605 | } |
606 | 606 | ||
607 | static void iwl_set_pwr_vmain(struct iwl_priv *priv) | 607 | static void iwl_set_pwr_vmain(struct iwl_trans *trans) |
608 | { | 608 | { |
609 | struct iwl_trans *trans = trans(priv); | ||
610 | /* | 609 | /* |
611 | * (for documentation purposes) | 610 | * (for documentation purposes) |
612 | * to set power to V_AUX, do: | 611 | * to set power to V_AUX, do: |
@@ -625,11 +624,10 @@ static void iwl_set_pwr_vmain(struct iwl_priv *priv) | |||
625 | static int iwl_nic_init(struct iwl_trans *trans) | 624 | static int iwl_nic_init(struct iwl_trans *trans) |
626 | { | 625 | { |
627 | unsigned long flags; | 626 | unsigned long flags; |
628 | struct iwl_priv *priv = priv(trans); | ||
629 | 627 | ||
630 | /* nic_init */ | 628 | /* nic_init */ |
631 | spin_lock_irqsave(&trans->shrd->lock, flags); | 629 | spin_lock_irqsave(&trans->shrd->lock, flags); |
632 | iwl_apm_init(priv); | 630 | iwl_apm_init(priv(trans)); |
633 | 631 | ||
634 | /* Set interrupt coalescing calibration timer to default (512 usecs) */ | 632 | /* Set interrupt coalescing calibration timer to default (512 usecs) */ |
635 | iwl_write8(bus(trans), CSR_INT_COALESCING, | 633 | iwl_write8(bus(trans), CSR_INT_COALESCING, |
@@ -637,9 +635,9 @@ static int iwl_nic_init(struct iwl_trans *trans) | |||
637 | 635 | ||
638 | spin_unlock_irqrestore(&trans->shrd->lock, flags); | 636 | spin_unlock_irqrestore(&trans->shrd->lock, flags); |
639 | 637 | ||
640 | iwl_set_pwr_vmain(priv); | 638 | iwl_set_pwr_vmain(trans); |
641 | 639 | ||
642 | priv->cfg->lib->nic_config(priv); | 640 | priv(trans)->cfg->lib->nic_config(priv(trans)); |
643 | 641 | ||
644 | /* Allocate the RX queue, or reset if it is already allocated */ | 642 | /* Allocate the RX queue, or reset if it is already allocated */ |
645 | iwl_rx_init(trans); | 643 | iwl_rx_init(trans); |
@@ -764,7 +762,6 @@ static const u8 iwlagn_pan_ac_to_queue[] = { | |||
764 | static int iwl_trans_pcie_start_device(struct iwl_trans *trans) | 762 | static int iwl_trans_pcie_start_device(struct iwl_trans *trans) |
765 | { | 763 | { |
766 | int ret; | 764 | int ret; |
767 | struct iwl_priv *priv = priv(trans); | ||
768 | struct iwl_trans_pcie *trans_pcie = | 765 | struct iwl_trans_pcie *trans_pcie = |
769 | IWL_TRANS_GET_PCIE_TRANS(trans); | 766 | IWL_TRANS_GET_PCIE_TRANS(trans); |
770 | 767 | ||
@@ -792,7 +789,7 @@ static int iwl_trans_pcie_start_device(struct iwl_trans *trans) | |||
792 | set_bit(STATUS_RF_KILL_HW, &trans->shrd->status); | 789 | set_bit(STATUS_RF_KILL_HW, &trans->shrd->status); |
793 | 790 | ||
794 | if (iwl_is_rfkill(trans->shrd)) { | 791 | if (iwl_is_rfkill(trans->shrd)) { |
795 | wiphy_rfkill_set_hw_state(priv->hw->wiphy, true); | 792 | iwl_set_hw_rfkill_state(priv(trans), true); |
796 | iwl_enable_interrupts(trans); | 793 | iwl_enable_interrupts(trans); |
797 | return -ERFKILL; | 794 | return -ERFKILL; |
798 | } | 795 | } |
@@ -1397,7 +1394,7 @@ static int iwl_trans_pcie_resume(struct iwl_trans *trans) | |||
1397 | else | 1394 | else |
1398 | clear_bit(STATUS_RF_KILL_HW, &trans->shrd->status); | 1395 | clear_bit(STATUS_RF_KILL_HW, &trans->shrd->status); |
1399 | 1396 | ||
1400 | wiphy_rfkill_set_hw_state(priv(trans)->hw->wiphy, hw_rfkill); | 1397 | iwl_set_hw_rfkill_state(priv(trans), hw_rfkill); |
1401 | 1398 | ||
1402 | return 0; | 1399 | return 0; |
1403 | } | 1400 | } |
@@ -1674,7 +1671,6 @@ static ssize_t iwl_dbgfs_tx_queue_read(struct file *file, | |||
1674 | { | 1671 | { |
1675 | struct iwl_trans *trans = file->private_data; | 1672 | struct iwl_trans *trans = file->private_data; |
1676 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 1673 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
1677 | struct iwl_priv *priv = priv(trans); | ||
1678 | struct iwl_tx_queue *txq; | 1674 | struct iwl_tx_queue *txq; |
1679 | struct iwl_queue *q; | 1675 | struct iwl_queue *q; |
1680 | char *buf; | 1676 | char *buf; |
@@ -1684,7 +1680,7 @@ static ssize_t iwl_dbgfs_tx_queue_read(struct file *file, | |||
1684 | const size_t bufsz = sizeof(char) * 64 * hw_params(trans).max_txq_num; | 1680 | const size_t bufsz = sizeof(char) * 64 * hw_params(trans).max_txq_num; |
1685 | 1681 | ||
1686 | if (!trans_pcie->txq) { | 1682 | if (!trans_pcie->txq) { |
1687 | IWL_ERR(priv, "txq not ready\n"); | 1683 | IWL_ERR(trans, "txq not ready\n"); |
1688 | return -EAGAIN; | 1684 | return -EAGAIN; |
1689 | } | 1685 | } |
1690 | buf = kzalloc(bufsz, GFP_KERNEL); | 1686 | buf = kzalloc(bufsz, GFP_KERNEL); |