aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-03-26 11:57:01 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-04-18 10:30:42 -0400
commit035f7ff27dcfadcb6028de1bbb5d17d49ea8d804 (patch)
tree9b3400fe1494c07cf540aa1292c1278afdbcbbb0
parent68f360dcfff19e338e7d565df48d222578f55f33 (diff)
iwlwifi: transport holds its pointer to the config
Instead of using the shared area that we be killed. Remove the pointer to config from shared since it is not used any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-drv.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-pci.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie.c36
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h8
8 files changed, 32 insertions, 31 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index 69b5b1a05998..77262f2a4fd8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -890,8 +890,6 @@ struct iwl_drv *iwl_drv_start(struct iwl_shared *shrd,
890 struct iwl_drv *drv; 890 struct iwl_drv *drv;
891 int ret; 891 int ret;
892 892
893 shrd->cfg = cfg;
894
895 drv = kzalloc(sizeof(*drv), GFP_KERNEL); 893 drv = kzalloc(sizeof(*drv), GFP_KERNEL);
896 if (!drv) { 894 if (!drv) {
897 dev_printk(KERN_ERR, trans->dev, "Couldn't allocate iwl_drv"); 895 dev_printk(KERN_ERR, trans->dev, "Couldn't allocate iwl_drv");
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index 593485b4f3d8..84e23844edf5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -433,7 +433,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans)
433 * CSR auto clock gate disable bit - 433 * CSR auto clock gate disable bit -
434 * this is only applicable for HW with OTP shadow RAM 434 * this is only applicable for HW with OTP shadow RAM
435 */ 435 */
436 if (cfg(trans)->base_params->shadow_ram_support) 436 if (trans->cfg->base_params->shadow_ram_support)
437 iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, 437 iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
438 CSR_RESET_LINK_PWR_MGMT_DISABLED); 438 CSR_RESET_LINK_PWR_MGMT_DISABLED);
439 } 439 }
@@ -554,7 +554,7 @@ static int iwl_find_otp_image(struct iwl_trans *trans,
554 } 554 }
555 /* more in the link list, continue */ 555 /* more in the link list, continue */
556 usedblocks++; 556 usedblocks++;
557 } while (usedblocks <= cfg(trans)->base_params->max_ll_items); 557 } while (usedblocks <= trans->cfg->base_params->max_ll_items);
558 558
559 /* OTP has no valid blocks */ 559 /* OTP has no valid blocks */
560 IWL_DEBUG_EEPROM(trans, "OTP has no valid blocks\n"); 560 IWL_DEBUG_EEPROM(trans, "OTP has no valid blocks\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c
index 00a6dda984be..68974a996136 100644
--- a/drivers/net/wireless/iwlwifi/iwl-pci.c
+++ b/drivers/net/wireless/iwlwifi/iwl-pci.c
@@ -281,7 +281,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
281 goto out_free_bus; 281 goto out_free_bus;
282 } 282 }
283 283
284 iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent); 284 iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent, cfg);
285 if (iwl_trans == NULL) { 285 if (iwl_trans == NULL) {
286 err = -ENOMEM; 286 err = -ENOMEM;
287 goto out_free_bus; 287 goto out_free_bus;
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index d5194879988a..3ebe96eb346b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -150,16 +150,13 @@ struct iwl_mod_params {
150/** 150/**
151 * struct iwl_shared - shared fields for all the layers of the driver 151 * struct iwl_shared - shared fields for all the layers of the driver
152 * 152 *
153 * @cfg: see struct iwl_cfg
154 * @trans: pointer to the transport layer data 153 * @trans: pointer to the transport layer data
155 */ 154 */
156struct iwl_shared { 155struct iwl_shared {
157 const struct iwl_cfg *cfg;
158 struct iwl_trans *trans; 156 struct iwl_trans *trans;
159}; 157};
160 158
161/*Whatever _m is (iwl_trans, iwl_priv, these macros will work */ 159/*Whatever _m is (iwl_trans, iwl_priv, these macros will work */
162#define cfg(_m) ((_m)->shrd->cfg)
163#define trans(_m) ((_m)->shrd->trans) 160#define trans(_m) ((_m)->shrd->trans)
164 161
165static inline bool iwl_have_debug_level(u32 level) 162static inline bool iwl_have_debug_level(u32 level)
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
index de78fb8dca9f..390490bb7f10 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
@@ -140,7 +140,7 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
140 if (q->need_update == 0) 140 if (q->need_update == 0)
141 goto exit_unlock; 141 goto exit_unlock;
142 142
143 if (cfg(trans)->base_params->shadow_reg_enable) { 143 if (trans->cfg->base_params->shadow_reg_enable) {
144 /* shadow register enabled */ 144 /* shadow register enabled */
145 /* Device expects a multiple of 8 */ 145 /* Device expects a multiple of 8 */
146 q->write_actual = (q->write & ~0x7); 146 q->write_actual = (q->write & ~0x7);
@@ -543,7 +543,7 @@ static void iwl_rx_handle(struct iwl_trans *trans)
543static void iwl_irq_handle_error(struct iwl_trans *trans) 543static void iwl_irq_handle_error(struct iwl_trans *trans)
544{ 544{
545 /* W/A for WiFi/WiMAX coex and WiMAX own the RF */ 545 /* W/A for WiFi/WiMAX coex and WiMAX own the RF */
546 if (cfg(trans)->internal_wimax_coex && 546 if (trans->cfg->internal_wimax_coex &&
547 (!(iwl_read_prph(trans, APMG_CLK_CTRL_REG) & 547 (!(iwl_read_prph(trans, APMG_CLK_CTRL_REG) &
548 APMS_CLK_VAL_MRB_FUNC_MODE) || 548 APMS_CLK_VAL_MRB_FUNC_MODE) ||
549 (iwl_read_prph(trans, APMG_PS_CTRL_REG) & 549 (iwl_read_prph(trans, APMG_PS_CTRL_REG) &
@@ -680,7 +680,7 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
680 if (inta & CSR_INT_BIT_WAKEUP) { 680 if (inta & CSR_INT_BIT_WAKEUP) {
681 IWL_DEBUG_ISR(trans, "Wakeup interrupt\n"); 681 IWL_DEBUG_ISR(trans, "Wakeup interrupt\n");
682 iwl_rx_queue_update_write_ptr(trans, &trans_pcie->rxq); 682 iwl_rx_queue_update_write_ptr(trans, &trans_pcie->rxq);
683 for (i = 0; i < cfg(trans)->base_params->num_of_queues; i++) 683 for (i = 0; i < trans->cfg->base_params->num_of_queues; i++)
684 iwl_txq_update_write_ptr(trans, 684 iwl_txq_update_write_ptr(trans,
685 &trans_pcie->txq[i]); 685 &trans_pcie->txq[i]);
686 686
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
index 918874067bd3..bb0a31418521 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
@@ -99,7 +99,7 @@ void iwl_txq_update_write_ptr(struct iwl_trans *trans, struct iwl_tx_queue *txq)
99 if (txq->need_update == 0) 99 if (txq->need_update == 0)
100 return; 100 return;
101 101
102 if (cfg(trans)->base_params->shadow_reg_enable) { 102 if (trans->cfg->base_params->shadow_reg_enable) {
103 /* shadow register enabled */ 103 /* shadow register enabled */
104 iwl_write32(trans, HBUS_TARG_WRPTR, 104 iwl_write32(trans, HBUS_TARG_WRPTR,
105 txq->q.write_ptr | (txq_id << 8)); 105 txq->q.write_ptr | (txq_id << 8));
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index 14a32c420fd4..76f05ea1ad38 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -79,7 +79,7 @@
79#define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo)))) 79#define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo))))
80 80
81#define SCD_QUEUECHAIN_SEL_ALL(trans, trans_pcie) \ 81#define SCD_QUEUECHAIN_SEL_ALL(trans, trans_pcie) \
82 (((1<<cfg(trans)->base_params->num_of_queues) - 1) &\ 82 (((1<<trans->cfg->base_params->num_of_queues) - 1) &\
83 (~(1<<(trans_pcie)->cmd_queue))) 83 (~(1<<(trans_pcie)->cmd_queue)))
84 84
85static int iwl_trans_rx_alloc(struct iwl_trans *trans) 85static int iwl_trans_rx_alloc(struct iwl_trans *trans)
@@ -522,7 +522,7 @@ static void iwl_trans_pcie_tx_free(struct iwl_trans *trans)
522 /* Tx queues */ 522 /* Tx queues */
523 if (trans_pcie->txq) { 523 if (trans_pcie->txq) {
524 for (txq_id = 0; 524 for (txq_id = 0;
525 txq_id < cfg(trans)->base_params->num_of_queues; txq_id++) 525 txq_id < trans->cfg->base_params->num_of_queues; txq_id++)
526 iwl_tx_queue_free(trans, txq_id); 526 iwl_tx_queue_free(trans, txq_id);
527 } 527 }
528 528
@@ -547,7 +547,7 @@ static int iwl_trans_tx_alloc(struct iwl_trans *trans)
547 int txq_id, slots_num; 547 int txq_id, slots_num;
548 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 548 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
549 549
550 u16 scd_bc_tbls_size = cfg(trans)->base_params->num_of_queues * 550 u16 scd_bc_tbls_size = trans->cfg->base_params->num_of_queues *
551 sizeof(struct iwlagn_scd_bc_tbl); 551 sizeof(struct iwlagn_scd_bc_tbl);
552 552
553 /*It is not allowed to alloc twice, so warn when this happens. 553 /*It is not allowed to alloc twice, so warn when this happens.
@@ -571,7 +571,7 @@ static int iwl_trans_tx_alloc(struct iwl_trans *trans)
571 goto error; 571 goto error;
572 } 572 }
573 573
574 trans_pcie->txq = kcalloc(cfg(trans)->base_params->num_of_queues, 574 trans_pcie->txq = kcalloc(trans->cfg->base_params->num_of_queues,
575 sizeof(struct iwl_tx_queue), GFP_KERNEL); 575 sizeof(struct iwl_tx_queue), GFP_KERNEL);
576 if (!trans_pcie->txq) { 576 if (!trans_pcie->txq) {
577 IWL_ERR(trans, "Not enough memory for txq\n"); 577 IWL_ERR(trans, "Not enough memory for txq\n");
@@ -580,7 +580,7 @@ static int iwl_trans_tx_alloc(struct iwl_trans *trans)
580 } 580 }
581 581
582 /* Alloc and init all Tx queues, including the command queue (#4/#9) */ 582 /* Alloc and init all Tx queues, including the command queue (#4/#9) */
583 for (txq_id = 0; txq_id < cfg(trans)->base_params->num_of_queues; 583 for (txq_id = 0; txq_id < trans->cfg->base_params->num_of_queues;
584 txq_id++) { 584 txq_id++) {
585 slots_num = (txq_id == trans_pcie->cmd_queue) ? 585 slots_num = (txq_id == trans_pcie->cmd_queue) ?
586 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; 586 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
@@ -626,7 +626,7 @@ static int iwl_tx_init(struct iwl_trans *trans)
626 spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); 626 spin_unlock_irqrestore(&trans_pcie->irq_lock, flags);
627 627
628 /* Alloc and init all Tx queues, including the command queue (#4/#9) */ 628 /* Alloc and init all Tx queues, including the command queue (#4/#9) */
629 for (txq_id = 0; txq_id < cfg(trans)->base_params->num_of_queues; 629 for (txq_id = 0; txq_id < trans->cfg->base_params->num_of_queues;
630 txq_id++) { 630 txq_id++) {
631 slots_num = (txq_id == trans_pcie->cmd_queue) ? 631 slots_num = (txq_id == trans_pcie->cmd_queue) ?
632 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; 632 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
@@ -749,9 +749,9 @@ static int iwl_apm_init(struct iwl_trans *trans)
749 iwl_apm_config(trans); 749 iwl_apm_config(trans);
750 750
751 /* Configure analog phase-lock-loop before activating to D0A */ 751 /* Configure analog phase-lock-loop before activating to D0A */
752 if (cfg(trans)->base_params->pll_cfg_val) 752 if (trans->cfg->base_params->pll_cfg_val)
753 iwl_set_bit(trans, CSR_ANA_PLL_CFG, 753 iwl_set_bit(trans, CSR_ANA_PLL_CFG,
754 cfg(trans)->base_params->pll_cfg_val); 754 trans->cfg->base_params->pll_cfg_val);
755 755
756 /* 756 /*
757 * Set "initialization complete" bit to move adapter from 757 * Set "initialization complete" bit to move adapter from
@@ -861,7 +861,7 @@ static int iwl_nic_init(struct iwl_trans *trans)
861 if (iwl_tx_init(trans)) 861 if (iwl_tx_init(trans))
862 return -ENOMEM; 862 return -ENOMEM;
863 863
864 if (cfg(trans)->base_params->shadow_reg_enable) { 864 if (trans->cfg->base_params->shadow_reg_enable) {
865 /* enable shadow regs in HW */ 865 /* enable shadow regs in HW */
866 iwl_set_bit(trans, CSR_MAC_SHADOW_REG_CTRL, 866 iwl_set_bit(trans, CSR_MAC_SHADOW_REG_CTRL,
867 0x800FFFFF); 867 0x800FFFFF);
@@ -1080,7 +1080,7 @@ static void iwl_tx_start(struct iwl_trans *trans)
1080 iwl_write_targ_mem(trans, a, 0); 1080 iwl_write_targ_mem(trans, a, 0);
1081 for (; a < trans_pcie->scd_base_addr + 1081 for (; a < trans_pcie->scd_base_addr +
1082 SCD_TRANS_TBL_OFFSET_QUEUE( 1082 SCD_TRANS_TBL_OFFSET_QUEUE(
1083 cfg(trans)->base_params->num_of_queues); 1083 trans->cfg->base_params->num_of_queues);
1084 a += 4) 1084 a += 4)
1085 iwl_write_targ_mem(trans, a, 0); 1085 iwl_write_targ_mem(trans, a, 0);
1086 1086
@@ -1103,7 +1103,7 @@ static void iwl_tx_start(struct iwl_trans *trans)
1103 iwl_write_prph(trans, SCD_AGGR_SEL, 0); 1103 iwl_write_prph(trans, SCD_AGGR_SEL, 0);
1104 1104
1105 /* initiate the queues */ 1105 /* initiate the queues */
1106 for (i = 0; i < cfg(trans)->base_params->num_of_queues; i++) { 1106 for (i = 0; i < trans->cfg->base_params->num_of_queues; i++) {
1107 iwl_write_prph(trans, SCD_QUEUE_RDPTR(i), 0); 1107 iwl_write_prph(trans, SCD_QUEUE_RDPTR(i), 0);
1108 iwl_write_direct32(trans, HBUS_TARG_WRPTR, 0 | (i << 8)); 1108 iwl_write_direct32(trans, HBUS_TARG_WRPTR, 0 | (i << 8));
1109 iwl_write_targ_mem(trans, trans_pcie->scd_base_addr + 1109 iwl_write_targ_mem(trans, trans_pcie->scd_base_addr +
@@ -1120,7 +1120,7 @@ static void iwl_tx_start(struct iwl_trans *trans)
1120 } 1120 }
1121 1121
1122 iwl_write_prph(trans, SCD_INTERRUPT_MASK, 1122 iwl_write_prph(trans, SCD_INTERRUPT_MASK,
1123 IWL_MASK(0, cfg(trans)->base_params->num_of_queues)); 1123 IWL_MASK(0, trans->cfg->base_params->num_of_queues));
1124 1124
1125 /* Activate all Tx DMA/FIFO channels */ 1125 /* Activate all Tx DMA/FIFO channels */
1126 iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7)); 1126 iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7));
@@ -1188,7 +1188,7 @@ static int iwl_trans_tx_stop(struct iwl_trans *trans)
1188 } 1188 }
1189 1189
1190 /* Unmap DMA from host system and free skb's */ 1190 /* Unmap DMA from host system and free skb's */
1191 for (txq_id = 0; txq_id < cfg(trans)->base_params->num_of_queues; 1191 for (txq_id = 0; txq_id < trans->cfg->base_params->num_of_queues;
1192 txq_id++) 1192 txq_id++)
1193 iwl_tx_queue_unmap(trans, txq_id); 1193 iwl_tx_queue_unmap(trans, txq_id);
1194 1194
@@ -1617,7 +1617,7 @@ static int iwl_trans_pcie_wait_tx_queue_empty(struct iwl_trans *trans)
1617 int ret = 0; 1617 int ret = 0;
1618 1618
1619 /* waiting for all the tx frames complete might take a while */ 1619 /* waiting for all the tx frames complete might take a while */
1620 for (cnt = 0; cnt < cfg(trans)->base_params->num_of_queues; cnt++) { 1620 for (cnt = 0; cnt < trans->cfg->base_params->num_of_queues; cnt++) {
1621 if (cnt == trans_pcie->cmd_queue) 1621 if (cnt == trans_pcie->cmd_queue)
1622 continue; 1622 continue;
1623 txq = &trans_pcie->txq[cnt]; 1623 txq = &trans_pcie->txq[cnt];
@@ -1829,7 +1829,7 @@ static ssize_t iwl_dbgfs_tx_queue_read(struct file *file,
1829 int ret; 1829 int ret;
1830 size_t bufsz; 1830 size_t bufsz;
1831 1831
1832 bufsz = sizeof(char) * 64 * cfg(trans)->base_params->num_of_queues; 1832 bufsz = sizeof(char) * 64 * trans->cfg->base_params->num_of_queues;
1833 1833
1834 if (!trans_pcie->txq) { 1834 if (!trans_pcie->txq) {
1835 IWL_ERR(trans, "txq not ready\n"); 1835 IWL_ERR(trans, "txq not ready\n");
@@ -1839,7 +1839,7 @@ static ssize_t iwl_dbgfs_tx_queue_read(struct file *file,
1839 if (!buf) 1839 if (!buf)
1840 return -ENOMEM; 1840 return -ENOMEM;
1841 1841
1842 for (cnt = 0; cnt < cfg(trans)->base_params->num_of_queues; cnt++) { 1842 for (cnt = 0; cnt < trans->cfg->base_params->num_of_queues; cnt++) {
1843 txq = &trans_pcie->txq[cnt]; 1843 txq = &trans_pcie->txq[cnt];
1844 q = &txq->q; 1844 q = &txq->q;
1845 pos += scnprintf(buf + pos, bufsz - pos, 1845 pos += scnprintf(buf + pos, bufsz - pos,
@@ -2085,7 +2085,8 @@ const struct iwl_trans_ops trans_ops_pcie = {
2085 2085
2086struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd, 2086struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd,
2087 struct pci_dev *pdev, 2087 struct pci_dev *pdev,
2088 const struct pci_device_id *ent) 2088 const struct pci_device_id *ent,
2089 const struct iwl_cfg *cfg)
2089{ 2090{
2090 struct iwl_trans_pcie *trans_pcie; 2091 struct iwl_trans_pcie *trans_pcie;
2091 struct iwl_trans *trans; 2092 struct iwl_trans *trans;
@@ -2102,6 +2103,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd,
2102 2103
2103 trans->ops = &trans_ops_pcie; 2104 trans->ops = &trans_ops_pcie;
2104 trans->shrd = shrd; 2105 trans->shrd = shrd;
2106 trans->cfg = cfg;
2105 trans_pcie->trans = trans; 2107 trans_pcie->trans = trans;
2106 spin_lock_init(&trans_pcie->irq_lock); 2108 spin_lock_init(&trans_pcie->irq_lock);
2107 init_waitqueue_head(&trans_pcie->ucode_write_waitq); 2109 init_waitqueue_head(&trans_pcie->ucode_write_waitq);
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index f3496a0490f0..80e33997a9e1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -429,6 +429,7 @@ enum iwl_trans_state {
429 * @ops - pointer to iwl_trans_ops 429 * @ops - pointer to iwl_trans_ops
430 * @op_mode - pointer to the op_mode 430 * @op_mode - pointer to the op_mode
431 * @shrd - pointer to iwl_shared which holds shared data from the upper layer 431 * @shrd - pointer to iwl_shared which holds shared data from the upper layer
432 * @cfg - pointer to the configuration
432 * @reg_lock - protect hw register access 433 * @reg_lock - protect hw register access
433 * @dev - pointer to struct device * that represents the device 434 * @dev - pointer to struct device * that represents the device
434 * @hw_id: a u32 with the ID of the device / subdevice. 435 * @hw_id: a u32 with the ID of the device / subdevice.
@@ -441,6 +442,7 @@ struct iwl_trans {
441 const struct iwl_trans_ops *ops; 442 const struct iwl_trans_ops *ops;
442 struct iwl_op_mode *op_mode; 443 struct iwl_op_mode *op_mode;
443 struct iwl_shared *shrd; 444 struct iwl_shared *shrd;
445 const struct iwl_cfg *cfg;
444 enum iwl_trans_state state; 446 enum iwl_trans_state state;
445 spinlock_t reg_lock; 447 spinlock_t reg_lock;
446 448
@@ -625,12 +627,14 @@ struct pci_device_id;
625extern const struct iwl_trans_ops trans_ops_pcie; 627extern const struct iwl_trans_ops trans_ops_pcie;
626struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd, 628struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd,
627 struct pci_dev *pdev, 629 struct pci_dev *pdev,
628 const struct pci_device_id *ent); 630 const struct pci_device_id *ent,
631 const struct iwl_cfg *cfg);
629int __must_check iwl_pci_register_driver(void); 632int __must_check iwl_pci_register_driver(void);
630void iwl_pci_unregister_driver(void); 633void iwl_pci_unregister_driver(void);
631 634
632extern const struct iwl_trans_ops trans_ops_idi; 635extern const struct iwl_trans_ops trans_ops_idi;
633struct iwl_trans *iwl_trans_idi_alloc(struct iwl_shared *shrd, 636struct iwl_trans *iwl_trans_idi_alloc(struct iwl_shared *shrd,
634 void *pdev_void, 637 void *pdev_void,
635 const void *ent_void); 638 const void *ent_void,
639 const struct iwl_cfg *cfg);
636#endif /* __iwl_trans_h__ */ 640#endif /* __iwl_trans_h__ */