diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-pci.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 23 |
4 files changed, 10 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index 49d2b1886f2f..e80e9aa80883 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c | |||
@@ -285,7 +285,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
285 | return 0; | 285 | return 0; |
286 | 286 | ||
287 | out_free_trans: | 287 | out_free_trans: |
288 | iwl_trans_free(iwl_trans); | 288 | iwl_trans_pcie_free(iwl_trans); |
289 | pci_set_drvdata(pdev, NULL); | 289 | pci_set_drvdata(pdev, NULL); |
290 | return -EFAULT; | 290 | return -EFAULT; |
291 | } | 291 | } |
@@ -296,7 +296,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) | |||
296 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 296 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
297 | 297 | ||
298 | iwl_drv_stop(trans_pcie->drv); | 298 | iwl_drv_stop(trans_pcie->drv); |
299 | iwl_trans_free(trans); | 299 | iwl_trans_pcie_free(trans); |
300 | 300 | ||
301 | pci_set_drvdata(pdev, NULL); | 301 | pci_set_drvdata(pdev, NULL); |
302 | } | 302 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h index 8a175e01f483..6213c05a4b52 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | |||
@@ -301,6 +301,11 @@ iwl_trans_pcie_get_trans(struct iwl_trans_pcie *trans_pcie) | |||
301 | trans_specific); | 301 | trans_specific); |
302 | } | 302 | } |
303 | 303 | ||
304 | struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, | ||
305 | const struct pci_device_id *ent, | ||
306 | const struct iwl_cfg *cfg); | ||
307 | void iwl_trans_pcie_free(struct iwl_trans *trans); | ||
308 | |||
304 | /***************************************************** | 309 | /***************************************************** |
305 | * RX | 310 | * RX |
306 | ******************************************************/ | 311 | ******************************************************/ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index b6522ca2d879..3eab7d52f8ba 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |||
@@ -1549,7 +1549,7 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans, | |||
1549 | trans_pcie->command_names = trans_cfg->command_names; | 1549 | trans_pcie->command_names = trans_cfg->command_names; |
1550 | } | 1550 | } |
1551 | 1551 | ||
1552 | static void iwl_trans_pcie_free(struct iwl_trans *trans) | 1552 | void iwl_trans_pcie_free(struct iwl_trans *trans) |
1553 | { | 1553 | { |
1554 | struct iwl_trans_pcie *trans_pcie = | 1554 | struct iwl_trans_pcie *trans_pcie = |
1555 | IWL_TRANS_GET_PCIE_TRANS(trans); | 1555 | IWL_TRANS_GET_PCIE_TRANS(trans); |
@@ -2044,7 +2044,7 @@ static int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans, | |||
2044 | 2044 | ||
2045 | #endif /*CONFIG_IWLWIFI_DEBUGFS */ | 2045 | #endif /*CONFIG_IWLWIFI_DEBUGFS */ |
2046 | 2046 | ||
2047 | const struct iwl_trans_ops trans_ops_pcie = { | 2047 | static const struct iwl_trans_ops trans_ops_pcie = { |
2048 | .start_hw = iwl_trans_pcie_start_hw, | 2048 | .start_hw = iwl_trans_pcie_start_hw, |
2049 | .stop_hw = iwl_trans_pcie_stop_hw, | 2049 | .stop_hw = iwl_trans_pcie_stop_hw, |
2050 | .fw_alive = iwl_trans_pcie_fw_alive, | 2050 | .fw_alive = iwl_trans_pcie_fw_alive, |
@@ -2061,8 +2061,6 @@ const struct iwl_trans_ops trans_ops_pcie = { | |||
2061 | .tx_agg_disable = iwl_trans_pcie_tx_agg_disable, | 2061 | .tx_agg_disable = iwl_trans_pcie_tx_agg_disable, |
2062 | .tx_agg_setup = iwl_trans_pcie_tx_agg_setup, | 2062 | .tx_agg_setup = iwl_trans_pcie_tx_agg_setup, |
2063 | 2063 | ||
2064 | .free = iwl_trans_pcie_free, | ||
2065 | |||
2066 | .dbgfs_register = iwl_trans_pcie_dbgfs_register, | 2064 | .dbgfs_register = iwl_trans_pcie_dbgfs_register, |
2067 | 2065 | ||
2068 | .wait_tx_queue_empty = iwl_trans_pcie_wait_tx_queue_empty, | 2066 | .wait_tx_queue_empty = iwl_trans_pcie_wait_tx_queue_empty, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index ba3c09d5472e..7018d313a4e0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -354,10 +354,6 @@ struct iwl_trans; | |||
354 | * May sleep | 354 | * May sleep |
355 | * @tx_agg_disable: de-configure a Tx queue to send AMPDUs | 355 | * @tx_agg_disable: de-configure a Tx queue to send AMPDUs |
356 | * Must be atomic | 356 | * Must be atomic |
357 | * @free: release all the ressource for the transport layer itself such as | ||
358 | * irq, tasklet etc... From this point on, the device may not issue | ||
359 | * any interrupt (incl. RFKILL). | ||
360 | * May sleep | ||
361 | * @wait_tx_queue_empty: wait until all tx queues are empty | 357 | * @wait_tx_queue_empty: wait until all tx queues are empty |
362 | * May sleep | 358 | * May sleep |
363 | * @dbgfs_register: add the dbgfs files under this directory. Files will be | 359 | * @dbgfs_register: add the dbgfs files under this directory. Files will be |
@@ -393,8 +389,6 @@ struct iwl_trans_ops { | |||
393 | int sta_id, int tid, int frame_limit, u16 ssn); | 389 | int sta_id, int tid, int frame_limit, u16 ssn); |
394 | void (*tx_agg_disable)(struct iwl_trans *trans, int queue); | 390 | void (*tx_agg_disable)(struct iwl_trans *trans, int queue); |
395 | 391 | ||
396 | void (*free)(struct iwl_trans *trans); | ||
397 | |||
398 | int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir); | 392 | int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir); |
399 | int (*wait_tx_queue_empty)(struct iwl_trans *trans); | 393 | int (*wait_tx_queue_empty)(struct iwl_trans *trans); |
400 | #ifdef CONFIG_PM_SLEEP | 394 | #ifdef CONFIG_PM_SLEEP |
@@ -564,11 +558,6 @@ static inline void iwl_trans_tx_agg_setup(struct iwl_trans *trans, int queue, | |||
564 | frame_limit, ssn); | 558 | frame_limit, ssn); |
565 | } | 559 | } |
566 | 560 | ||
567 | static inline void iwl_trans_free(struct iwl_trans *trans) | ||
568 | { | ||
569 | trans->ops->free(trans); | ||
570 | } | ||
571 | |||
572 | static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans) | 561 | static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans) |
573 | { | 562 | { |
574 | WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE, | 563 | WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE, |
@@ -616,19 +605,9 @@ static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state) | |||
616 | } | 605 | } |
617 | 606 | ||
618 | /***************************************************** | 607 | /***************************************************** |
619 | * Transport layers implementations + their allocation function | 608 | * driver (transport) register/unregister functions |
620 | ******************************************************/ | 609 | ******************************************************/ |
621 | struct pci_dev; | ||
622 | struct pci_device_id; | ||
623 | extern const struct iwl_trans_ops trans_ops_pcie; | ||
624 | struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, | ||
625 | const struct pci_device_id *ent, | ||
626 | const struct iwl_cfg *cfg); | ||
627 | int __must_check iwl_pci_register_driver(void); | 610 | int __must_check iwl_pci_register_driver(void); |
628 | void iwl_pci_unregister_driver(void); | 611 | void iwl_pci_unregister_driver(void); |
629 | 612 | ||
630 | extern const struct iwl_trans_ops trans_ops_idi; | ||
631 | struct iwl_trans *iwl_trans_idi_alloc(void *pdev_void, | ||
632 | const void *ent_void, | ||
633 | const struct iwl_cfg *cfg); | ||
634 | #endif /* __iwl_trans_h__ */ | 613 | #endif /* __iwl_trans_h__ */ |